annotator
Use when the user mentions "annotator", "ai-annotator", "vite-plugin-ai-annotator", "browser feedback", "select elements in browser", "capture screenshot from browser", "inject CSS/JS", or wants to act on UI feedback that arrived as a `<channel source="ai-annotator">` event. Provides REST API + channel event reference for the live browser session.
What this skill does
# vite-plugin-ai-annotator
`vite-plugin-ai-annotator` injects an annotation toolbar into the browser. The user picks UI elements, attaches comments, then either copies a prompt to clipboard or — when the channel plugin is enabled — pushes a `<channel source="ai-annotator">` event straight into your running Claude Code session.
You interact with the live browser session through a **REST API** on `http://localhost:7318` (default). The MCP `annotator_*` tools that earlier versions exposed are gone — use the REST API.
## Architecture
```
┌─────────────────┐ Socket.IO ┌──────────────────┐
│ Browser Page │◄─────────────────►│ ws-server │
│ (toolbar UI) │ │ (Express, :7318)│
└─────────────────┘ └────────┬─────────┘
│ REST /api/*
│
│ Socket.IO room "channels"
│
┌────────▼─────────────┐
│ channel.ts (this │
│ plugin's MCP server)│
└────────┬─────────────┘
│ stdio (claude/channel)
┌────────▼─────────┐
│ Claude Code │
│ session │
└──────────────────┘
```
## Channel push event
When the user clicks a "Send to Claude" button in the toolbar, the channel server pushes:
```
<channel source="ai-annotator" session_id="<uuid>" page_url="<url>" count="<N>">
User submitted <N> feedback item(s) on <url> ("<title>"). Fetch GET http://localhost:7318/api/sessions/<session_id>/feedback?fields=xpath,attributes for details, apply the changes the comments describe, then DELETE the same endpoint. Use notify_user(session_id="<session_id>", ...) to report progress.
</channel>
```
When you see this event:
1. Fetch full feedback: `GET /api/sessions/<session_id>/feedback?fields=xpath,attributes` (add `styles,children` if you need them)
2. Each item carries `componentData.componentLocation` — file path with line number — open the file at that location
3. Apply the changes the user's `comment` describes
4. Call `notify_user` to surface progress in the browser toast
5. `DELETE /api/sessions/<session_id>/feedback` after the change ships, so the same items don't fire next time
## REST API
All endpoints under `/api/`. Default base URL: `http://localhost:7318` (override with the `AI_ANNOTATOR_PORT` or `INSPECTOR_PORT` env var).
| Method | Endpoint | Body / Query | Returns |
|--------|----------|--------------|---------|
| `GET` | `/api/sessions` | — | Array of `BrowserSession` |
| `GET` | `/api/sessions/:id/page-context` | — | `{url, title, selectionCount, isInspecting}` |
| `POST` | `/api/sessions/:id/select` | `{mode?: 'inspect'\|'selector', selector?: string, selectorType?: 'css'\|'xpath'}` | `{success, count, error?}` |
| `GET` | `/api/sessions/:id/feedback` | `?fields=xpath,attributes,styles,children` | Array of `ElementData` |
| `DELETE` | `/api/sessions/:id/feedback` | — | `{success: true}` |
| `POST` | `/api/sessions/:id/screenshot` | `{type?: 'viewport'\|'element', selector?, quality?}` | `{success, filePath}` (WebP saved to tmpdir) |
| `POST` | `/api/sessions/:id/inject-css` | `{css: string}` | `{success, error?}` |
| `POST` | `/api/sessions/:id/inject-js` | `{code: string}` | `{success, result?, error?}` |
| `GET` | `/api/sessions/:id/console` | `?clear=true` | Array of `{type, args, timestamp}` |
**Session ID**: required in path. Use `GET /api/sessions` to discover. The channel event hands you `session_id` directly via `meta`.
## `notify_user` reply tool
Two-way channel exposes one MCP tool:
```
notify_user(session_id: string, message: string, status?: 'info' | 'progress' | 'done' | 'error')
```
The toolbar shows a toast prefixed by status icon (`✓` done, `✗` error, `…` progress). Call it to acknowledge receipt, report progress on long fixes, or signal completion. Pass `session_id` from the inbound channel tag verbatim.
## ElementData shape
```typescript
interface ElementData {
index: number
tagName: string
cssSelector: string
textContent: string
selectedText?: string // when user highlighted specific text
comment?: string // user's annotation — the actionable instruction
componentData?: {
componentLocation: string // "src/Foo.vue:42" — open this
componentName?: string
framework?: 'vue' | 'react' | 'angular' | 'svelte' | 'vanilla'
}
// Returned only when requested via ?fields=...
xpath?: string
attributes?: Record<string, string>
computedStyles?: { width, height, fontSize, fontFamily, color?, backgroundColor?, display?, position? }
children?: ElementData[]
}
```
## Workflows
### A — React to a channel push (channel mode)
1. Channel event arrives → read `session_id`, `page_url`, `count` from tag attributes
2. `GET /api/sessions/<session_id>/feedback?fields=xpath,attributes` → list of `ElementData`
3. For each item: open file at `componentData.componentLocation`, apply change driven by `comment`
4. `notify_user(session_id, "Applied 3 changes", status="done")`
5. `DELETE /api/sessions/<session_id>/feedback`
### B — Pull on demand (no channel; user pasted the copy-to-clipboard prompt)
1. `GET /api/sessions` → list sessions
2. `GET /api/sessions/<id>/feedback?fields=xpath,attributes` → details
3. Apply changes
4. `DELETE /api/sessions/<id>/feedback`
### C — Programmatic element selection
1. `POST /api/sessions/<id>/select` with `{mode: 'selector', selector: '.btn-primary'}` (CSS) or `{mode: 'selector', selector: '//button', selectorType: 'xpath'}`
2. `GET /api/sessions/<id>/feedback?fields=styles,attributes` to inspect
### D — Style debugging
1. `POST /api/sessions/<id>/inject-css` with `{css: '.foo { color: red }'}` to test
2. `POST /api/sessions/<id>/screenshot` with `{type: 'element', selector: '.foo'}` to verify visually
## Tips
- Always include `session_id` from the channel `meta` when calling REST. If multiple browsers connected and you call without it, you get an error listing available IDs.
- `componentData.componentLocation` ends with `:line` — use it directly in `Read` tool (`Read("src/Foo.vue", offset: 42)`) instead of grep.
- Console logs are buffered (max 1000, trimmed to 500). Use `?clear=true` after read to avoid duplicates next call.
- Screenshot files are WebP at `$TMPDIR/ai-annotator-screenshots/screenshot-<ts>.webp`.
- The vite plugin only runs during `vite serve`, never during `vite build` — no production overhead.
## Setup (for the user, not for you)
If the user is asking how to install:
```bash
bun add -d vite-plugin-ai-annotator
```
```typescript
// vite.config.ts
import { defineConfig } from 'vite'
import annotator from 'vite-plugin-ai-annotator'
export default defineConfig({
plugins: [annotator({ port: 7318 })],
})
```
Then for the channel push experience:
```bash
/plugin marketplace add nguyenvanduocit/claude-annotator-plugin
/plugin install claude-annotator-plugin@claude-annotator-plugin
# Restart Claude Code with the channel flag (research preview)
claude --dangerously-load-development-channels plugin:claude-annotator-plugin@claude-annotator-plugin
```
Channels require Claude Code v2.1.80+ and Anthropic auth (claude.ai or Console API key). Not available on Bedrock / Vertex / Foundry.
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.