create-anatomy
Generate a visual anatomy annotation in Figma showing numbered markers on a component…
Generate color annotation specifications mapping UI elements to design tokens. Use when the user mentions "color", "color annotation", "color spec", "tokens", "design tokens", or wants to document which color tokens a component uses.
$ npx -y skills add redongreen/uSpec --skill create-color --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/create-colorContext preview
The summary Claude sees to decide when to auto-load this skill.
Generate color annotation specifications mapping UI elements to design tokens. Use when the user mentions "color", "color annotation", "color spec", "tokens", "design tokens", or wants to document which color tokens a component uses.
name: create-color description: Generate color annotation specifications mapping UI elements to design tokens. Use when the user mentions "color", "color annotation", "color spec", "tokens", "design tokens", or wants to document which color tokens a component uses.
Generate a color annotation directly in Figma — tables mapping each visual element to its design token, organized by variant (Strategy A) or by section with per-state columns (Strategy B). This skill **renders the Color section from the component `.md`**; it does NOT re-extract token bindings from Figma.
**Execution contract (read first).**
Read `uspecs.config.json` → `mcpProvider`. Follow the matching column for every MCP call in this skill.
| Operation | `figma-console` | `figma-mcp` | |-----------|-----------------|-------------| | Verify connection | `figma_get_status` | Skip — implicit. If first `use_figma` call fails, guide user to check MCP setup. | | Navigate to file | `figma_navigate` with URL | Extract `fileKey` from URL (`figma.com/design/:fileKey/...`). No navigate needed. | | Take screenshot | `figma_take_screenshot` | `get_screenshot` with `fileKey` + `nodeId` | | Execute Plugin JS | `figma_execute` with `code` | `use_figma` with `fileKey`, `code`, `description`. **JS code is identical** — no wrapper changes. | | Search components | `figma_search_components` | `search_design_system` with `query` + `fileKey` + `includeComponents: true` | | Get file/component data | `figma_get_file_data` / `figma_get_component` | `get_metadata` or `get_design_context` with `fileKey` + `nodeId` | | Get variables (file-wide) | `figma_get_variables` | `use_figma` script: `return await figma.variables.getLocalVariableCollectionsAsync();` | | Get token values | `figma_get_token_values` | `use_figma` script reading variable values per mode/collection | | Get styles | `figma_get_styles` | `search_design_system` with `includeStyles: true`, or `use_figma`: `return figma.getLocalPaintStyles();` | | Get selection | `figma_get_selection` | `use_figma` script: `return figma.currentPage.selection.map(n => ({id: n.id, name: n.name, type: n.type}));` |
**`figma-mcp` requires `fileKey` on every call.** Extract it once from the user's Figma URL at the start of the workflow. For branch URLs (`figma.com/design/:fileKey/branch/:branchKey/:fileName`), use `:branchKey` as the fileKey.
**`figma-mcp` page context:** `use_figma` resets `figma.currentPage` to the first page on every call. When a script accesses a node from a previous step via `getNodeByIdAsync(ID)`, the page content may not be loaded — `findAll`, `findOne`, and `characters` will fail with `TypeError` until the page is activated. Insert this page-loading block immediately after `getNodeByIdAsync`:
let _p = node; while (_p.parent && _p.parent.type !== 'DOCUMENT') _p = _p.parent; if (_p.type === 'PAGE') await figma.setCurrentPageAsync(_p);
This walks up to the PAGE ancestor and loads its content. Console MCP does not need this — `figma_execute` inherits the Desktop page context.
There is no screenshot-only path and no live token-extraction path. Without the component `.md` there is nothing to render — see Step 0's fail-fast contract.
Copy this checklist and update as you progress:
Task Progress: - [ ] Step 0: Require + parse the component `.md` (Color body + render-meta). Detect Strategy A vs B. FAIL FAST if missing. - [ ] Step 1: Read instruction file (only as needed — NOT for re-extracting tokens) - [ ] Step 2: Verify MCP connection (rendering requires a live Figma session) - [ ] Step 3: Read template key from uspecs.config.json - [ ] Step 4: Build render inputs from the parsed .md (tables verbatim, COMP_SET_ID, BOOLEAN_UNHIDES) — NO extraction - [ ] Step 5: Re-derive per-section variantProps; for Strategy B, zip relabeled headers back to raw Figma state values - [ ] Step 6: (Strategy B mode-controlled only) ONE whitelisted getLocalVariableCollectionsAsync() read to resolve COLLECTION_ID / MODE_ID - [ ] Step 7: Audit the assembled render inputs against the .md - [ ] Step 8: Import and detach the Color Annotation template - [ ] Step 9: Fill header fields - [ ] Step 10: Render variants/sections (Strategy A or B, one figma_execute per variant/section) - [ ] Step 11: Visual validation
Generate design system documentation for your UI components, directly from your AI agent. Describe a component to your agent.
Repo: redongreen/uSpec
Generate a visual anatomy annotation in Figma showing numbered markers on a component…
Generate API overview specifications documenting component properties, values, defaults, and…
Generate a canonical JSON contract and a self-contained implementation Markdown specification…
Generate motion specification annotations from After Effects timeline data. Use when the user…
Generate a visual property annotation in Figma showing each configurable property axis with…
Generate structure specifications documenting component dimensions, spacing, padding, and how…