Skip to content

Commit 842c8c5

Browse files
ithiria894claude
andcommitted
feat: add Claude Code plugin packaging + update Actions to Node 22
- Add .claude-plugin/ with MCP config, permissions, and annotate-ui skill - Plugin teaches AI when to auto-annotate localhost during frontend dev - Update GitHub Actions from checkout@v4/setup-node@v4/node-20 to v5/v5/22 - Bump version to 0.1.5 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 08d5f07 commit 842c8c5

5 files changed

Lines changed: 84 additions & 4 deletions

File tree

.claude-plugin/.mcp.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"mcpServers": {
3+
"ui-annotator": {
4+
"command": "npx",
5+
"args": ["-y", "@mcpware/ui-annotator"]
6+
}
7+
}
8+
}

.claude-plugin/settings.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"mcp__ui-annotator__annotate",
5+
"mcp__ui-annotator__get_elements",
6+
"mcp__ui-annotator__highlight_element",
7+
"mcp__ui-annotator__rescan_elements",
8+
"mcp__ui-annotator__inspect_mode"
9+
]
10+
}
11+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
name: annotate-ui
3+
description: Annotate a web page with hover labels so you can identify UI elements by name. Use when doing frontend development and you need to reference specific elements.
4+
argument-hint: "<localhost-url> | (no args = auto-detect)"
5+
---
6+
7+
# Annotate UI
8+
9+
When doing frontend development, use the UI Annotator to label page elements so you and the user can reference them by name.
10+
11+
## When to use
12+
13+
- User is working on frontend code and asks about specific UI elements
14+
- User says "change this", "move that", "what's this element called?"
15+
- User starts a dev server (e.g. `npm run dev`, `vite`, `next dev`) and you see a localhost URL
16+
- User asks for design feedback or wants to discuss layout changes
17+
18+
## How to use
19+
20+
### Step 1: Annotate the page
21+
22+
When you detect a localhost URL (from `npm run dev` output, user message, etc.):
23+
24+
```
25+
Use the annotate tool with the localhost URL.
26+
```
27+
28+
This returns a proxy URL (http://localhost:7077/...). Tell the user to open this URL instead of the original localhost URL.
29+
30+
### Step 2: Get elements
31+
32+
Once the user has the page open in the proxy URL:
33+
34+
```
35+
Use get_elements to see all labeled UI elements on the page.
36+
```
37+
38+
This returns element names, CSS selectors, positions, and sizes.
39+
40+
### Step 3: Reference by name
41+
42+
Now you and the user can reference elements by name:
43+
- User: "make the hero-card bigger"
44+
- You know exactly which element `hero-card` is, its selector, and its position
45+
- You can make the code change with confidence
46+
47+
### Step 4: Highlight to confirm
48+
49+
If unsure which element the user means:
50+
51+
```
52+
Use highlight_element with the element name to flash it on the page.
53+
```
54+
55+
The user sees a red flash around the element and can confirm yes/no.
56+
57+
## Tips
58+
59+
- After code changes that affect the DOM, use `rescan_elements` to refresh the element list
60+
- Use `inspect_mode` to let the user click elements and copy their names
61+
- The proxy strips CSP headers, so it works even on strict sites

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ jobs:
77
publish:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v4
11-
- uses: actions/setup-node@v4
10+
- uses: actions/checkout@v5
11+
- uses: actions/setup-node@v5
1212
with:
13-
node-version: 20
13+
node-version: 22
1414
registry-url: https://registry.npmjs.org
1515
- run: npm ci
1616
- name: Check if version already published

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mcpware/ui-annotator",
3-
"version": "0.1.4",
3+
"version": "0.1.5",
44
"description": "MCP server that annotates any web page with hover labels — zero extensions, any browser",
55
"type": "module",
66
"bin": {

0 commit comments

Comments
 (0)