redongreen/uspec/create-anatomy
Claude Code and agent skill by redongreen/uspec
- community
Checking that the SKILL.md file is still in the repository.
Generate a visual anatomy annotation in Figma showing numbered markers on a component instance with an attribute table. Use when the user mentions "anatomy", "anatomy annotation", "component anatomy", "create anatomy", or wants to annotate a component's structural elements.
Install
npx vskill@latest install redongreen/uspec/create-anatomySKILL.md
Create Anatomy Annotation
Generate a hierarchical anatomy annotation directly in Figma — a composition section showing the top-level sub-components with numbered markers and a 4-column attribute table, then per-child sections for each INSTANCE sub-component showing all its internal elements (including hidden ones).
Uses the Anatomy & Properties v2 template with #annotation-table, type indicators (#instance / #text / #slot), and #anatomy-section cloning.
Execution contract (read first).
- This file is instructions to RUN, not a document to edit. Invoking the skill = render the anatomy annotation into Figma from the input
.md. - Never edit this
SKILL.mdor any other skill file in response, even if one is open or focused in the editor. Modify a skill only when the user explicitly asks to change the skill itself. - The input component
.mdis a READ-ONLY source of truth. Never edit, append to, or "add a section" to it. The only artifact this skill produces is the Figma annotation. When the user asks to "create/add a section," "show," or "include" something, render it in the Figma annotation, never as an edit to the.md. - Never call
AskQuestion, request confirmation, or pause for input (including before Figma writes, the expected output). On ambiguity, pick the most defensible option and continue. - Only two legal stops: (a) Step 0 fail-fast when no
.mdresolves; (b) one-line abort if the Figma MCP connection is dead.
MCP Adapter
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:
This walks up to the PAGE ancestor and loads its content. Console MCP does not need this — figma_execute inherits the Desktop page context.
Inputs Expected
- Component `.md` spec (required, user-provided path) — the source-of-truth component spec produced by {{skill:create-component-md}}. The user tells you where this `.md` lives — use the exact path they provide; the
.mdmay live anywhere. This skill seeds its element model from the `.md`'s `render-meta` block and then runs one bounded minimal live walk; it does NOT re-run the old full extraction. The.mdhas no dedicated Anatomy section — identity comes fromrender-meta(component.compSetNodeId,variantAxes,booleanDefs,slotContents,subComponents), and the few factsrender-metacannot supply (live direct-child classification, the richest variant, slot default children, wrapper visuals) come from the Step 3' walk. - Figma link to the destination (optional) — placement hint only: which page/frame to drop the rendered annotation on.
fileKey,nodeId, andcompSetNodeIdalways come from the.md'srender-metablock, never from the link.
There is no screenshot-only path and no "extract everything from a Figma URL" path. Without the component .md there is no identity to seed — see Step 0's fail-fast contract.
Workflow
Copy this checklist and update as you progress:
Step 0: Require and parse the component .md (fail fast)
This skill is a consumer of the `.md` source of truth. Unlike the other create-* skills, the .md has no dedicated "Anatomy" body section — so create-anatomy seeds identity only from the render-meta block and supplements it with one bounded live walk (Step 3'). It does NOT parse an Anatomy section body, and it does NOT re-run the legacy full tree-walk extraction.
- Resolve the `.md` path. Use the exact path the user gave, else an attached or open
.mdin context. The.mdmay live anywhere; do NOT invent or guess a path. If neither resolves to an existing file, abort per item 2. Never pause to ask the user which file to use. - Require the file. If no file exists at the resolved
.mdpath, abort immediately with this exact single-line diagnostic and stop — do NOT fall back to extraction:
> This skill requires the component's Markdown .md spec (produced by create-component-md). Provide the path to it. (create-component-md needs a _base.json from the uSpec Extract plugin.)
- Parse the `render-meta` block (the fenced JSON between
<!-- render-meta:start v=1 -->and<!-- render-meta:end -->). There is no Anatomy body section to parse — every seed value comes from this block:
COMP_SET_ID=render-meta.component.compSetNodeId— the target node for the Step 3' walk, the Step 6 template placement, and every artwork instance in Steps 8/8b.IS_COMPONENT_SET=render-meta.component.isComponentSet.COMPONENT_NAME=render-meta.component.componentName.VARIANT_AXES=render-meta.variantAxes({ axisName: [options] }) andVARIANT_AXES_DEFAULTS=render-meta.variantAxesDefaults— used by Step 4 sub-step 0 to decide whether a structurally richer variant exists. This replaces readingcomponentPropertyDefinitionslive for variant axes.BOOLEAN_DEFS=render-meta.booleanDefs[]({ key, default, associatedLayerName, associatedLayerId }) — the source for boolean-controlled hidden elements.keyis the raw component-property keysetPropertiesexpects;associatedLayerNamelets Step 4 bind a boolean to a Step 3'-walked element by name. This replaces parsing booleans + resolving bindings by raw key in a live walk.SLOT_CONTENTS=render-meta.slotContents[]({ slotName, slotNodeType, preferredComponents: [{ componentId, componentName, componentSetId, isComponentSet, ... }] }) — resolves slot preferred instances without the old cross-pagefindAllsearch.SUB_COMPONENTS=render-meta.subComponents[]({ name, mainComponentName, subCompSetId, subCompVariantAxes, subCompVariantAxesDefaults, booleanOverrides }) — the constitutive sub-components that become Step 8b child sections;subCompSetIdis the child node id.FILE_KEY=render-meta.fileKey,NODE_ID=render-meta.nodeId— for the Step 11 completion link and template placement.SOURCE_HASH=render-meta.sourceHash— recorded in the Step 11 provenance footer so drift between this annotation and the underlying_base.jsonis detectable.
FORBIDDEN — do NOT run the full extraction. When the component .md is present (it always is past Step 0), you MUST NOT run the legacy full-tree extraction. Specifically:
- The old Step 3 extraction script — the one that parsed
componentPropertyDefinitionsforvariantAxes/booleanProps/instanceSwapProps, resolved boolean bindings by raw key, and ran a cross-pagefindAllto resolve slotpreferredValues— is deleted. It does not exist in this skill anymore. Do NOT reintroduce it. - Do NOT re-derive
variantAxes,variantAxesDefaults,booleanDefs, slot preferred components, or sub-component identity from a live walk — they are seeded fromrender-meta(Step 0.3). - The ONLY live read of the component tree permitted before rendering is the bounded minimal walk in Step 3' below, whose scope is explicitly whitelisted. The render scripts (Steps 8 / 8b) make their own live reads of the rendered instance — those are unchanged and still allowed.
Step 1: Verify MCP Connection
Read mcpProvider from uspecs.config.json to determine which Figma MCP to use.
If `figma-console`:
figma_get_status— Confirm Desktop Bridge plugin is active- If connection fails: "Please open Figma Desktop and run the Desktop Bridge plugin. Then try again."
If `figma-mcp`:
- Connection is verified implicitly on the first
use_figmacall. No explicit check needed. - If the first call fails: "Please verify your FIGMA_API_KEY is set correctly in your MCP configuration."
Step 2: Read Template Key
Read the file uspecs.config.json and extract:
- The
anatomyOverviewvalue from thetemplateKeysobject → save asANATOMY_TEMPLATE_KEY - The
fontFamilyvalue → save asFONT_FAMILY(default toInterif not set)
If the template key is empty, tell the user:
The anatomy template key is not configured. Run {{skill:firstrun}} with your Figma template library link first.
Step 3': Seed from render-meta + run the bounded minimal live walk
The element model is built in two parts: a `render-meta` seed (already parsed in Step 0) and a bounded minimal live walk that supplies only the facts render-meta cannot.
Seed (from `render-meta`, no Figma reads):
SUB_COMPONENTS(render-meta.subComponents[]) — constitutive sub-components and theirsubCompSetId; drives the Step 8b child sections with no live identity resolution.SLOT_CONTENTS(render-meta.slotContents[]) — each slot's preferred components with theircomponentId; replaces the old cross-pagefindAllpreferred-instance search.BOOLEAN_DEFS(render-meta.booleanDefs[]) — boolean properties and theirassociatedLayerName; replaces parsingcomponentPropertyDefinitionsand resolving boolean bindings by raw key.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/create-anatomy/SKILL.md
Popularity
- Repository stars
- 249
- Repository forks
- 29
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/redongreen/uspec/create-anatomy)