Annotate and organize Figma design references directly in VS Code. Connect to Figma in real-time, capture design frames with notes, link them to code selections, and export structured prompts for AI-assisted implementation.
Built to work with cursor-talk-to-figma-mcp — the same WebSocket relay powers both this extension and the MCP server.
- Real-time Figma connection via WebSocket relay — select frames in Figma, load them into VS Code
- Collections — organize design frames and code annotations into named groups
- Design frame viewer — view cached Figma frames in a webview panel with node overlay
- Code annotations — select code in the editor, attach it to a collection with notes
- Design notes — annotate specific nodes within a design frame
- XML export — copy collections as structured XML for AI agents
- Markdown prompt export — multi-select collections, include channel ID and MCP tools reference for AI workflows
- Claude Code skill —
/talk-to-figma-designenriches exported prompts via Figma MCP, explores your codebase, and generates a design spec
- VS Code >= 1.85.0
- Node.js >= 18
- cursor-talk-to-figma-mcp relay running — setup guide
- Go to Releases
- Download the
.vsixfile - Install in VS Code:
code --install-extension figma-annotations-*.vsixOr open VS Code > Extensions sidebar > ... menu > Install from VSIX... > select the downloaded file.
git clone https://github.com/richardplg2/figma-annotations.git
cd figma-annotations
npm install
npm run compileThen press F5 in VS Code to launch the extension in debug mode.
npm install -g @vscode/vsce
vsce package
code --install-extension figma-annotations-0.0.1.vsixThe extension communicates with Figma through the cursor-talk-to-figma-mcp WebSocket relay.
# Clone the MCP server
git clone https://github.com/grab/cursor-talk-to-figma-mcp.git
cd cursor-talk-to-figma-mcp
# Install and start the relay
bun install
bun socketThe relay runs on ws://localhost:3055.
Install the Cursor Talk To Figma plugin in Figma:
- Open Figma
- Go to Plugins > Manage plugins
- Search for "Cursor Talk To Figma" or install from the Figma Community
- Run the plugin — it will show a channel ID
- Open the Figma Annotations sidebar (bookmark icon in the activity bar)
- Click the plug icon or run
Figma Annotations: Connect to Figma - Enter the channel ID from the Figma plugin
- Status bar shows
Figma: Connectedwhen ready
- Create a collection — click
+in the sidebar header - Load Figma frames — select frames in Figma, right-click a collection > "Load Figma Selection"
- Add code annotations — select code in the editor, right-click > "Add Code to Collection"
- Add design notes — open the Figma viewer, click nodes to add notes
Right-click a collection > Copy Collection as XML or Insert Collection to Claude Code
<collection name="Login Flow">
<design-frame node="LoginForm" type="COMPONENT" dimensions="320x480">
<design-note node="EmailInput" type="COMPONENT" dimensions="280x44">Form validation logic</design-note>
</design-frame>
<code-annotation file="src/auth.ts" language="typescript" lines="42-51">
<note>Handles OAuth redirect</note>
</code-annotation>
</collection>Click the export icon in the sidebar header > select collections > enter channel ID > choose clipboard or terminal.
The markdown prompt includes:
- Figma connection info (channel ID, relay URL)
- All design frames with node IDs and notes
- All code references with snippets
- MCP tools reference guide
- Instructions for the
/talk-to-figma-designskill
This repo ships a Claude Code skill that turns exported prompts into enriched design specs.
# Clone this repo (if you haven't already)
git clone https://github.com/richardplg2/figma-annotations.git
cd figma-annotations
# Option 1: Install globally (available in all projects)
./install-skill.sh --global
# Option 2: Install into a specific project
./install-skill.sh --project /path/to/your-project
# Option 3: Install into current directory
./install-skill.sh --project .This copies skills/talk-to-figma-design/ into the appropriate .claude/skills/ directory.
If you prefer, copy the skill directory manually:
# Global install
cp -r skills/talk-to-figma-design ~/.claude/skills/
# Project install
cp -r skills/talk-to-figma-design /path/to/your-project/.claude/skills/The skill uses MCP tools from cursor-talk-to-figma-mcp. Make sure:
- The MCP server is configured in your Claude Code settings (
.mcp.jsonor Claude Code MCP config) - The WebSocket relay is running (
bun socketon port 3055) - The Figma plugin is active with a channel ID
Optional: GitNexus for codebase exploration (the skill degrades gracefully without it).
After exporting the markdown prompt from the VS Code extension into Claude Code, invoke:
/talk-to-figma-design
The skill will:
- Parse the exported prompt (detect
<!-- talk-to-figma-design -->marker) - Enrich via Figma MCP —
get_node_info,scan_text_nodes,get_stylesfor each frame - Explore the codebase via GitNexus — find existing components that match the design
- Generate a design spec file with requirements, existing component matches, and design tokens
- Invoke
/superpowers:brainstormingto refine requirements and plan implementation
Optional arguments:
--channel <id>— override channel ID--collection "<name>"— process only specific collection<topic>— name for the spec file
| Command | Description |
|---|---|
Figma Annotations: Create Collection |
Create a new named collection |
Figma Annotations: Connect to Figma |
Connect to relay with channel ID |
Figma Annotations: Load Figma Selection |
Import selected frames into collection |
Figma Annotations: Add Code to Collection |
Add editor selection as annotation |
Figma Annotations: Copy Collection as XML |
Copy single collection as XML |
Figma Annotations: Insert Collection to Claude Code |
Insert XML into terminal |
Figma Annotations: Export Collections as Prompt |
Multi-select markdown export |
Figma Annotations: Open Figma Viewer |
View design frame in webview |
Figma Annotations: Edit Note |
Edit annotation note |
Figma Annotations: Reload Design Frame |
Re-fetch frame from Figma |
Annotations are stored in .annotations.json at the workspace root. This file is auto-created and should be added to .gitignore (it contains cached image data).
# Install dependencies
npm install
# Compile (type-check + bundle)
npm run compile
# Watch mode (auto-rebuild)
npm run watch
# Debug in VS Code
# Press F5 — launches Extension Development Hostsrc/
extension.ts — Entry point, all command registrations
types.ts — TypeScript interfaces and data models
storageService.ts — File I/O for .annotations.json
collectionProvider.ts — VS Code TreeView provider
figmaService.ts — WebSocket client for Figma relay
figmaViewerPanel.ts — Webview panel for design viewer
rangeResolver.ts — Code range tracking and relocation
xmlFormatter.ts — XML serialization
markdownFormatter.ts — Markdown prompt formatting
webview/viewer.html — Figma viewer webview
- cursor-talk-to-figma-mcp — MCP server + Figma plugin + WebSocket relay that this extension connects to
- Claude Code — AI coding assistant that can use the exported prompts and
/talk-to-figma-designskill
MIT
