# uSpec: component specs from Figma, written by your agent (redongreen/uSpec) — skill card for AI agents

> AgentGid skill card. Checked on 2026-11-21 against commit 1e25e9b (version 0.3.3).
> Every fact comes from the pack's own files at that commit. Numbers marked "as reported" are the author's.
> Human page: https://agentgid.com/skills/redongreen/uspec/

## Explain it to a non-programmer
Your AI assistant writes the documentation for a design system component. A free Figma plugin captures the component. The assistant turns it into one spec file: properties, sizes, colour tokens and screen reader behaviour. Other skills then draw parts of that spec back into Figma as notes next to the component.

## Who it is for
- You keep a design system in Figma and need specs for each component
- You want one Markdown spec per component that developers and AI tools can read
- You document screen reader behaviour for VoiceOver, TalkBack and ARIA
- You use Cursor, Claude Code or Codex
- Not for: Your components are not in Figma
- Not for: You want to run it on a small model: the author asks for a high-capacity model and a fresh chat for every run

## What it is
- Kind: command, scripts
- License: MIT
- Repository: https://github.com/redongreen/uSpec

## What it does
- Stage 1: the uSpec Extract plugin in Figma saves the selected component as a _base.json file
- create-component-md reads that file, runs four read-only passes (API, structure, colour, screen reader) and writes components/<name>.json and components/<name>.md
- Stage 2: each create-* skill reads its section from the .md and draws it into Figma through your Figma MCP
- create-motion is the exception: it draws a motion spec from an After Effects timeline export
- firstrun links your Figma template library once and saves the template keys in uspecs.config.json

## Skills
| Skill | Call | Changes code? | In plain words |
|---|---|---|---|
| firstrun | /firstrun (Claude Code), @firstrun (Cursor), $firstrun (Codex) | yes | One-time setup that links your Figma template library |
| create-component-md | /create-component-md baseJsonPath=<path to _base.json> | yes | Writes the full spec of one component as a .json and a .md file |
| create-anatomy | /create-anatomy ./components/<name>.md | no | Draws numbered markers on the component with a table of its parts in Figma |
| create-property | /create-property ./components/<name>.md | no | Draws each variant and toggle of the component with previews in Figma |
| create-api | /create-api ./components/<name>.md | no | Draws property tables with values, defaults and examples in Figma |
| create-color | /create-color ./components/<name>.md | no | Draws which colour token each part uses, per variant or state, in Figma |
| create-structure | /create-structure ./components/<name>.md | no | Draws sizes, spacing and padding across sizes and densities in Figma |
| create-voice | /create-voice ./components/<name>.md | no | Draws what screen readers say and the focus order, per state, in Figma |
| create-motion | /create-motion + the timeline JSON exported from After Effects | no | Draws animation timeline bars and easing details in Figma from an After Effects export |
| extract-api | run by create-component-md | no | Helper pass: reads the component's properties from the capture file |
| extract-structure | run by create-component-md | no | Helper pass: reads sizes and spacing from the capture file |
| extract-color | run by create-component-md | no | Helper pass: reads colour tokens from the capture file |
| extract-voice | run by create-component-md | no | Helper pass: works out screen reader behaviour from the capture file |

### firstrun
- Asks for: A working Figma MCP connection
- Asks for: The link to your copy of the uSpec Template library in Figma
- Gives: Template keys and the template font saved in uspecs.config.json
- Gives: A Setup complete message
- Say: "Run firstrun"

### create-component-md
- Asks for: The _base.json file saved by the uSpec Extract plugin
- Asks for: Optional notes, such as states to include or skip
- Gives: components/<name>.json, the machine contract
- Gives: components/<name>.md with Overview, API, Structure, Color and Voice / Screen reader sections
- Gives: Known gaps and follow-ups listed in the .md
- Say: "/create-component-md baseJsonPath=~/Downloads/text-field-_base.json"

### create-anatomy
- Asks for: The component .md
- Asks for: Where in Figma to place it (a link to the component)
- Gives: An anatomy frame in Figma with numbered markers and an attribute table
- Say: "/create-anatomy ./components/button.md"

### create-property
- Asks for: The component .md
- Gives: One exhibit per variant axis and toggle, with a summary table
- Say: "/create-property ./components/button.md"

### create-api
- Asks for: The component .md
- Gives: Property tables with values, defaults, required status, sub-component tables and configuration examples
- Say: "/create-api ./components/button.md"

### create-color
- Asks for: The component .md
- Gives: Tables mapping each visual element to its design token
- Say: "/create-color ./components/button.md"

### create-structure
- Asks for: The component .md
- Gives: Tables of all dimensional properties, with columns per size or density
- Say: "/create-structure ./components/button.md"

### create-voice
- Asks for: The component .md
- Asks for: A link to the component in Figma
- Asks for: Behaviour the spec cannot know, such as focus order
- Gives: Focus order, platform tables for VoiceOver, TalkBack and ARIA, and announcement patterns per state
- Say: "/create-voice ./components/text-field.md Render next to the component at <Figma link>. Focus moves label, then field, then the clear button."

### create-motion
- Asks for: Timeline JSON exported with the pack's After Effects script (pasted or as a file)
- Asks for: Optional: a Figma link for where to place it, a recording, the animation's purpose
- Gives: A motion spec frame with timeline bars and detail tables of every animated property
- Say: "/create-motion @motion-ex.json"

## Know before installing
- The render skills do not stop to ask: they write into your Figma file without asking for confirmation and pick an option on their own when unsure.
- Do not click or edit the Figma frame while a skill is drawing, and run one assistant per Figma file at a time.
- The author recommends a high-capacity model; create-component-md runs parallel helper agents and needs an even larger one.
- The Figma MCP is not installed for you: set it up in your assistant first.
- firstrun asks whether you work at Uber; answer No and paste the link to your own copy of the template library.
- The Figma plugin makes no network calls and needs no account.

## Install (official commands)
- Cursor, Claude Code or Codex: `npx uspec-skills init` — Run in your project and pick your assistant. Skills go to .cursor/skills/, .claude/skills/ or .agents/skills/, reference docs to ./references/, settings to uspecs.config.json. Then install the uSpec Extract plugin from the Figma Community, set up a Figma MCP, duplicate the uSpec Template file and run firstrun. Remove: `Delete the skill folders from the skills directory, ./references/ and uspecs.config.json (no uninstall command is documented)`.
- Another host in the same project: `npx uspec-skills install --platform claude-code` && `npx uspec-skills install --platform codex` — Installs into that host's folder without touching the others.
- Check the install: `npx uspec-skills doctor`

## What runs on the user's machine
- Code on the machine: yes (the npx installer, create-component-md and the optional After Effects export script)
- Network: True
- Install: npx downloads the uspec-skills package (Node.js 18+) from npm; it copies skills and references into your project and writes uspecs.config.json. No network calls in its own code.
- create-component-md: The assistant runs the CLI's component-md prepare, validate, contract and render steps; they write .uspec-cache/<name>/ and components/<name>.json and .md in your project.
- create-* render skills and firstrun: The assistant sends Figma plugin JavaScript through your Figma MCP to read the template library and draw annotation frames in your Figma file.
- uSpec Extract plugin (in Figma): Runs in Figma's plugin sandbox with network access set to none; you save its _base.json file.
- create-motion input (optional): You run export-timeline.jsx in After Effects; it copies the timeline JSON to the clipboard via a temp file and pbcopy or clip.

## Settings
- `uspecs.config.json mcpProvider`: figma-mcp (Figma's own MCP) or figma-console (Figma Console MCP)
- `uspecs.config.json environment`: cursor | claude-code | codex
- `uspecs.config.json templateKeys / fontFamily`: written by firstrun

## Examples (from the pack's own files)
- The component .md layout: output format defined in references/component-md/component-md-template.md

## Author's numbers (as reported, not run by AgentGid)
- A create-component-md run costs 50k to 200k tokens depending on the component. Source: redongreen/uSpec/docs/specs/component-md.mdx
- Each create-* render skill costs about 100k tokens per run. Source: redongreen/uSpec/skills/create-component-md/SKILL.md

## Steps only the person can do
- Install the uSpec Extract plugin from the Figma Community and run it on a component to save _base.json (https://www.figma.com/community/plugin/1635184425006534227/uspec-extract) Then: The assistant runs create-component-md on that file
- Install and configure a Figma MCP (Figma's own or Figma Console MCP) with your Figma access (docs/getting-started.mdx (Set up Figma MCP)) Then: The assistant can run firstrun and the render skills
- Duplicate the uSpec Template file to your Figma and publish it as a library (or keep it open) (https://www.figma.com/community/file/1603925462078533207/uspec-template) Then: firstrun reads the template keys from it
- For create-motion: run export-timeline.jsx in After Effects with scripting file access turned on (references/motion/export-timeline.jsx) Then: The assistant renders the motion spec from the pasted JSON

## Mistakes to avoid
- Not: Point a create-* render skill straight at a Figma link. Instead: Run the uSpec Extract plugin, run create-component-md, then pass the .md to the render skill. Why: Every render skill except create-motion takes the component .md as its required input
- Not: Expect npx uspec-skills init to set up the Figma connection. Instead: Install and configure a Figma MCP in the assistant yourself, then run firstrun. Why: The installer only records which MCP you use
- Not: Run several skills in one long chat, or two assistants on one Figma file. Instead: Start a fresh session for each skill and render one file at a time. Why: The author says long chats degrade output and parallel renders corrupt specs
- Not: Answer Yes to the Uber employee question without being at Uber. Instead: Answer No and paste your own template library link. Why: Yes writes the built-in Uber template keys and the Uber Move font into your config

## What leaves the machine
- Your component data and the Figma plugin code the assistant sends to draw annotation frames → Your Figma file, through the Figma MCP you configured, firstrun and every create-* render skill. Opt out: Use only create-component-md, which works from the local _base.json file
- A package download (no data of yours) → The npm registry, npx uspec-skills init / install, and when create-component-md falls back to npx uspec-skills. Opt out: No opt-out

## Lines in the pack aimed at agents (ask the person first)
- "Never call `AskQuestion`, request confirmation, or pause for input (including before Figma writes, the expected output)." (skills/create-voice/SKILL.md): Same line in every create-* render skill. Confirm the target Figma file and node with the person before the first write.
- "If missing but `packages/cli/` exists, run `npm run build:cli` from the project root once, then retry step 1." (skills/create-component-md/SKILL.md): This installs npm packages; ask the person before running it.
- "Do **not** call `AskQuestion`. Do **not** wait for input. The chain runs start-to-finish without interruption." (skills/create-component-md/SKILL.md): Tell the person the plan and expected token cost before starting the run.

## May I use it like this?
- commercial-app: yes (MIT: keep the license notice)
- client-work: yes (MIT)
- redistribute-files: yes (MIT: keep the copyright and permission notice in copies)

## Which one to pick
- If You need written specs and Figma annotation frames for existing design system components: skill:redongreen/uSpec
- If You want to generate Figma components and variables from JSON contracts, not document existing ones: skill:nvillapiano/component-contracts-figma
- If You only need guidance on using the Figma MCP server: skill:figma/mcp-server-guide

## Works well with
- agent:cursor: The installer supports Cursor (.cursor/skills/)
- agent:claude-code: The installer supports Claude Code (.claude/skills/)
- agent:openai-codex: The installer supports Codex (.agents/skills/)

## Works in and needs
- Works in Cursor: skills folder (.cursor/skills/) via npx installer
- Works in Claude Code: skills folder (.claude/skills/) via npx installer
- Works in Codex: skills folder (.agents/skills/) via npx installer
- Needs Node.js 18+: The npx installer and the component-md CLI steps
- Needs uSpec Extract Figma plugin: Produces the _base.json that create-component-md reads
- Needs Figma MCP (native Figma MCP or Figma Console MCP): firstrun and every render skill draw into Figma through it
- Needs Adobe After Effects: Only for create-motion input
- Needs A high-capacity model: The author warns smaller models truncate the long skills

## How to tell it works
Run the uSpec Extract plugin on one component in Figma, then in a fresh chat say "/create-component-md baseJsonPath=<the saved file>". It works when components/<name>.json and components/<name>.md appear in your project.

## Related
- southleft/figma-console-mcp
- figma/figma-mcp

## Safety
Install only from github.com/redongreen/uSpec or the npm package uspec-skills, and the uSpec Extract plugin from the Figma Community. The render skills write into your Figma file without asking first: run them on a copy or a branch if the file matters.
