[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-openai-figma-generate-library":3,"mdc-e02pz4-key":39,"related-repo-openai-figma-generate-library":3744,"related-org-openai-figma-generate-library":3862},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":28,"repoUrl":29,"updatedAt":30,"license":31,"forks":32,"topics":33,"repo":34,"sourceUrl":37,"mdContent":38},"figma-generate-library","build Figma design systems from code","Build or update a professional-grade design system in Figma from a codebase. Use when the user wants to create variables\u002Ftokens, build component libraries, create individual components with proper variant sets and variable bindings, set up theming (light\u002Fdark modes), document foundations, or reconcile gaps between code and Figma. Also use when the user asks to create or generate any component in Figma — even a single one — since components require proper variable foundations, variant states, and design token bindings to be production-quality. This skill teaches WHAT to build and in WHAT ORDER — it complements the `figma-use` skill which teaches HOW to call the Plugin API. Both skills should be loaded together.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"openai","OpenAI","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fopenai.png",[12,16,19,22,25],{"name":13,"slug":14,"type":15},"Design System","design-system","tag",{"name":17,"slug":18,"type":15},"UI Components","ui-components",{"name":20,"slug":21,"type":15},"Frontend","frontend",{"name":23,"slug":24,"type":15},"Figma","figma",{"name":26,"slug":27,"type":15},"Design","design",3992,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins","2026-04-06T18:40:14.673598",null,465,[],{"repoUrl":29,"stars":28,"forks":32,"topics":35,"description":36},[],"OpenAI Plugins","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins\u002Ftree\u002FHEAD\u002Fplugins\u002Ffigma\u002Fskills\u002Ffigma-generate-library","---\nname: figma-generate-library\ndescription: \"Build or update a professional-grade design system in Figma from a codebase. Use when the user wants to create variables\u002Ftokens, build component libraries, create individual components with proper variant sets and variable bindings, set up theming (light\u002Fdark modes), document foundations, or reconcile gaps between code and Figma. Also use when the user asks to create or generate any component in Figma — even a single one — since components require proper variable foundations, variant states, and design token bindings to be production-quality. This skill teaches WHAT to build and in WHAT ORDER — it complements the `figma-use` skill which teaches HOW to call the Plugin API. Both skills should be loaded together.\"\ndisable-model-invocation: false\n---\n\n# Design System Builder — Figma MCP Skill\n\nBuild professional-grade design systems in Figma that match code. This skill orchestrates multi-phase workflows across 20–100+ `use_figma` calls, enforcing quality patterns from real-world design systems (Material 3, Polaris, Figma UI3, Simple DS).\n\n**Prerequisites**: The `figma-use` skill MUST also be loaded for every `use_figma` call. It provides Plugin API syntax rules (return pattern, page reset, ID return, font loading, color range). This skill provides design system domain knowledge and workflow orchestration.\n\n**Always include `figma-generate-library` in the comma-separated `skillNames` parameter when calling `use_figma` as part of this skill. If this skill was loaded via an MCP resource, you MUST prefix the name with `resource:` (e.g. `resource:figma-generate-library`).** This is a logging parameter — it does not affect execution.\n\n---\n\n## 1. The One Rule That Matters Most\n\nFor every phase, follow this communication contract.\n\nBefore starting a phase:\n- Post a user-facing checklist titled `Phase N Checklist`.\n- Include every task\u002Fsubtask that will be attempted in that phase.\n- Include the phase exit criteria.\n- Do not begin mutating work for the phase until this checklist has been posted.\n- If the phase requires explicit approval, ask for approval after the checklist and wait.\n\nDuring execution:\n- Before each major subsection, post a short update naming the exact section being worked on, using this format:\n  `Working on Phase N.X: \u003Csection name>`\n- Keep updates concise, but make the current work visible.\n- When a subsection completes, mark it as completed in the running checklist if the interface supports checklist\u002Fstatus updates; otherwise mention completion in the next progress update.\n\nAt the end of each phase:\n- Post a `Phase N Summary` with:\n  - Completed tasks\n  - Created or changed Figma objects\n  - Validations performed\n  - Decisions or conflicts resolved\n  - Remaining risks or follow-ups\n- Then show the required phase artifact for that phase and continue automatically.\n- Only ask for explicit approval after Phase 0 or if a genuine decision fork arises (see [Section 6](#6-decision-forks)). For Phases 1–4, the default is to continue automatically after the summary.\n\n### Stable Task IDs\n\nUse one task ID format everywhere: `P{phase}.{step}`.\n\nRules:\n- Use lettered step IDs only: `P0.a`, `P0.b`, `P1.a`, `P3.d`.\n- Do not use plain bullet points for task lists.\n- Every phase checklist, progress update, validation note, and phase summary MUST reference the same task IDs\n\n**No setup exception:** Creating a new Figma file, importing a library, creating pages, variables, collections, styles, or components all count as creation\u002Fmutation. Do not treat any of them as harmless setup.\n\n**This is NEVER a one-shot task.** Building a design system requires 20–100+ `use_figma` calls across multiple phases, with mandatory progress between them. Any attempt to create everything in one call WILL produce broken, incomplete, or unrecoverable results. Break every operation to the smallest useful unit, validate, get feedback, proceed.\n\n---\n\n## 2. Mandatory Workflow\n\nWork through the phases in order. Do not move to the next phase until the current phase's required actions and acceptance checks are complete. If a phase cannot pass, stop and report the blocker. Do not approximate, skip, or defer a failed phase unless the user explicitly approves the limitation. No best-effort substitutions. No quiet approximations. No handoff with missing source truth, missing visual truth, fake assets, approximate typography, broken interactions, or unverified states.\n\n### Phase 0: DISCOVERY (always first — no `use_figma` writes yet)\n\n- [ ] 0a. Analyze codebase → extract tokens, components, naming conventions\n- [ ] 0b. Inspect Figma file → pages, variables, components, styles, existing conventions\n- [ ] 0c. Search subscribed libraries → use `search_design_system` for reusable assets\n- [ ] 0d. Lock v1 scope → exact token set + component list recorded before any creation\n- [ ] 0e. Map code → Figma → every conflict (code disagrees with Figma) resolved and recorded\n- [ ] 0f. Print a **gap analysis** to chat: what exists in code but not Figma, what exists in Figma but not code, and every conflict from 0e with its resolution\n\n### Phase 1: FOUNDATIONS (tokens first — always before components)\n\n- [ ] 1a. Create variable collections and modes\n- [ ] 1b. Create primitive variables (raw values, 1 mode)\n- [ ] 1c. Create semantic variables (aliased to primitives, mode-aware)\n- [ ] 1d. Set scopes on ALL variables (never `ALL_SCOPES`)\n- [ ] 1e. Set code syntax on ALL variables\n- [ ] 1f. Create effect styles (shadows) and text styles (typography)\n- [ ] 1g. Print a **variable summary** to chat: N collections, M variables, K modes, broken down by collection\n- [ ] 1h. Print the **style list** to chat: every effect style and text style created, with names\n- [ ] Exit criteria met: every token from the agreed plan exists, all scopes set, all code syntax set\n\n### Phase 2: FILE STRUCTURE (before components)\n\n- [ ] 2a. Create page skeleton: Cover → Getting Started → Foundations → --- → Components → --- → Utilities\n- [ ] 2b. Create foundations documentation pages (color swatches, type specimens, spacing bars)\n- [ ] 2c. Capture a `get_screenshot` of every foundations page and print the **page list** to chat alongside the screenshots\n- [ ] Exit criteria met: all planned pages exist, foundations docs are navigable\n\n### Phase 3: COMPONENTS (one at a time — never batch)\n\nFor EACH component (in dependency order: atoms before molecules), run the checklist below. Finish the current component before starting the next.\n\n- [ ] 3a. Create dedicated page\n- [ ] 3b. Build base component with auto-layout + full variable bindings\n- [ ] 3c. Create all variant combinations (`combineAsVariants` + grid layout)\n- [ ] 3d. Add component properties (TEXT, BOOLEAN, INSTANCE_SWAP)\n- [ ] 3e. Link properties to child nodes\n- [ ] 3f. Add page documentation (title, description, usage notes)\n- [ ] 3g. Validate: `get_metadata` (structure) + `get_screenshot` (visual)\n- [ ] 3h. Optional: lightweight Code Connect mapping while context is fresh\n- [ ] Exit criteria met: variant count correct, all bindings verified, screenshot looks right\n\n### Phase 4: INTEGRATION + QA (final pass)\n\n- [ ] 4a. Finalize all Code Connect mappings\n- [ ] 4b. Accessibility audit (contrast, min touch targets, focus visibility)\n- [ ] 4c. Naming audit (no duplicates, no unnamed nodes, consistent casing)\n- [ ] 4d. Unresolved bindings audit (no hardcoded fills\u002Fstrokes remaining)\n- [ ] 4e. Final review screenshots of every page\n\n---\n\n## 3. Critical Rules\n\n**Plugin API basics** (from use_figma skill — enforced here too):\n- Use `return` to send data back (auto-serialized). Do NOT wrap in IIFE or call closePlugin.\n- Return ALL created\u002Fmutated node IDs in every return value\n- Page context resets each call — always `await figma.setCurrentPageAsync(page)` at start. **Call it at most once per script**: each component or doc page is its own `use_figma` call. Never loop over `figma.root.children` and switch pages inside a mutating script — split that work into one focused call per target page (see [figma-use → gotchas.md → Set current page once per `use_figma` call](..\u002Ffigma-use\u002Freferences\u002Fgotchas.md#set-current-page-once-per-use_figma-call--split-multi-page-work-across-calls))\n- `figma.notify()` throws — never use it\n- Colors are 0–1 range, not 0–255\n- Font MUST be loaded before any text write: `await figma.loadFontAsync({family, style})`. Use `await figma.listAvailableFontsAsync()` to discover available fonts and verify exact style strings — if a load fails, query available fonts to find the correct name or a fallback.\n\n**Design system rules**:\n1. **Variables BEFORE components** — components bind to variables. No token = no component.\n2. **Inspect before creating** — run read-only `use_figma` to discover existing conventions. Match them.\n3. **One page per component** *(default)* — exception: tightly related families (e.g., Input + helpers) may share a page with clear section separation.\n4. **Bind visual properties to variables** *(default)* — fills, strokes, padding, radius, gap. Exceptions: intentionally fixed geometry (icon pixel-grid sizes, static dividers).\n5. **Scopes on every variable** — NEVER leave as `ALL_SCOPES`. Background: `FRAME_FILL, SHAPE_FILL`. Text: `TEXT_FILL`. Border: `STROKE_COLOR`. Spacing: `GAP`. Radii: `CORNER_RADIUS`. Primitives: `[]` (hidden).\n6. **Code syntax on every variable** — WEB syntax MUST use the `var()` wrapper: `var(--color-bg-primary)`, not `--color-bg-primary`. Use the actual CSS variable name from the codebase. ANDROID\u002FiOS do NOT use a wrapper.\n7. **Alias semantics to primitives** — `{ type: 'VARIABLE_ALIAS', id: primitiveVar.id }`. Never duplicate raw values in semantic layer.\n8. **Position variants after combineAsVariants** — they stack at (0,0). Manually grid-layout + resize.\n9. **INSTANCE_SWAP for icons** — never create a variant per icon. Cap variant matrices: if Size × Style × State > 30 combinations, split into sub-component.\n10. **Deterministic naming** — use consistent, unique node names for idempotent cleanup and resumability. Track created node IDs via return values and the state ledger.\n11. **No destructive cleanup** — cleanup scripts identify nodes by name convention or returned IDs, not by guessing.\n12. **Validate before proceeding** — never build on unvalidated work. `get_metadata` after every create, `get_screenshot` after each component.\n13. **NEVER parallelize `use_figma` calls** — Figma state mutations must be strictly sequential. Even if your tool supports parallel calls, never run two use_figma calls simultaneously.\n14. **Never hallucinate Node IDs** — always read IDs from the state ledger returned by previous calls. Never reconstruct or guess an ID from memory.\n15. **Use the helper scripts** — embed scripts from `scripts\u002F` into your use_figma calls. Don't write 200-line inline scripts from scratch.\n\n---\n\n## 4. State Management (Required for Long Workflows)\n\n> **`getPluginData()` \u002F `setPluginData()` are NOT supported in `use_figma`.** Use `getSharedPluginData()` \u002F `setSharedPluginData()` instead (these ARE supported), or use name-based lookups and the state ledger (returned IDs).\n\n| Entity type | Idempotency key | How to check existence |\n|-------------|----------------|----------------------|\n| Scene nodes (pages, frames, components) | `setSharedPluginData('dsb', 'key', value)` or unique name | `node.getSharedPluginData('dsb', 'key')` or `page.findOne(n => n.name === 'Button')` |\n| Variables | Name within collection | `(await figma.variables.getLocalVariablesAsync()).find(v => v.name === name && v.variableCollectionId === collId)` |\n| Styles | Name | `getLocalTextStyles().find(s => s.name === name)` |\n\nTag every created **scene node** immediately after creation:\n```javascript\nnode.setSharedPluginData('dsb', 'run_id', RUN_ID);        \u002F\u002F identifies this build run\nnode.setSharedPluginData('dsb', 'phase', 'phase3');        \u002F\u002F which phase created it\nnode.setSharedPluginData('dsb', 'key', 'component\u002Fbutton');\u002F\u002F unique logical key\n```\n\n**State persistence**: Do NOT rely solely on conversation context for the state ledger. Write it to disk:\n```\n\u002Ftmp\u002Fdsb-state-{RUN_ID}.json\n```\nRe-read this file at the start of every turn. In long workflows, conversation context will be truncated — the file is the source of truth.\n\nMaintain a state ledger tracking:\n```json\n{\n  \"runId\": \"ds-build-2024-001\",\n  \"phase\": \"phase3\",\n  \"step\": \"component-button\",\n  \"entities\": {\n    \"collections\": { \"primitives\": \"id:...\", \"color\": \"id:...\" },\n    \"variables\": { \"color\u002Fbg\u002Fprimary\": \"id:...\", \"spacing\u002Fsm\": \"id:...\" },\n    \"pages\": { \"Cover\": \"id:...\", \"Button\": \"id:...\" },\n    \"components\": { \"Button\": \"id:...\" }\n  },\n  \"pendingValidations\": [\"Button:screenshot\"],\n  \"completedSteps\": [\"phase0\", \"phase1\", \"phase2\", \"component-avatar\"]\n}\n```\n\n**Idempotency check** before every create: query by name + state ledger ID. If exists, skip or update — never duplicate.\n\n**Resume protocol**: at session start or after context truncation, run a read-only `use_figma` to scan all pages, components, variables, and styles by name to reconstruct the `{key → id}` map. Then re-read the state file from disk if available.\n\n**Continuation prompt** (give this to the user when resuming in a new chat):\n> \"I'm continuing a design system build. Run ID: {RUN_ID}. Load the figma-generate-library skill and resume from the last completed step.\"\n\n---\n\n## 5. Library Discovery and search_design_system — Reuse Decision Matrix\n\nSearch FIRST in Phase 0, then again immediately before each component creation.\n\n**Start with `get_libraries`** to understand what libraries are available before searching blindly:\n\n```\n\u002F\u002F Discover all libraries accessible to the file\nget_libraries({ fileKey })\n\u002F\u002F Returns:\n\u002F\u002F   libraries_added_to_file: [{ name, libraryKey, description, source }, ...]\n\u002F\u002F   libraries_available_to_add: [{ name, libraryKey, description, source }, ...]\n\u002F\u002F   libraries_available_to_add_next_offset: number | null\n```\n\nUse the returned `libraryKey` values to scope searches to specific libraries via `includeLibraryKeys`. This avoids noisy results when many libraries are available.\n\nIf `libraries_available_to_add_next_offset` is non-null, more org libraries are available — call `get_libraries` again with `offset` set to that value. Org libraries page in batches of 20; community UI kits only appear on the first page.\n\n```\n\u002F\u002F Search across all libraries (default)\nsearch_design_system({ query, fileKey, includeComponents: true, includeVariables: true, includeStyles: true })\n\n\u002F\u002F Search within a specific library only\nsearch_design_system({ query, fileKey, includeLibraryKeys: [\"lk-abc123...\"], includeComponents: true })\n```\n\n**Reuse if** all of these are true:\n- Component property API matches your needs (same variant axes, compatible types)\n- Token binding model is compatible (uses same or aliasable variables)\n- Naming conventions match the target file\n- Component is editable (not locked in a remote library you don't own)\n\n**Rebuild if** any of these:\n- API incompatibility (different property names, wrong variant model)\n- Token model incompatible (hardcoded values, different variable schema)\n- Ownership issue (can't modify the library)\n\n**Wrap if** visual match but API incompatible:\n- Import the library component as a nested instance inside a new wrapper component\n- Expose a clean API on the wrapper\n\n**Priority order**: local existing → subscribed library import → unsubscribed UI Kit library from `libraries_available_to_add` (icons especially) → create new.\n\n---\n\n## 6. Decision Forks\n\nAsk the user when paths fork — when two or more reasonable answers exist and no clear winner comes from the codebase, the Figma file, or the locked plan. Don't silently default. Present each option with its tradeoff and your recommendation; pick only after the user steers.\n\n**When NOT to ask:** if exactly one path is clearly correct from the source of truth (code, Figma file, agreed plan), take it. This section is for genuine ambiguity, not for offloading every decision.\n\n| Fork situation | What to surface | Example ask |\n|---|---|---|\n| Code ≠ Figma on a token, component, or value | Both versions side by side, with provenance (file\u002Fline vs node) | \"Code says `--color-bg-primary = #FFFFFF`, Figma has `color\u002Fbg\u002Fprimary = #FAFAFA`. Which wins?\" |\n| Subscribed library has a close-but-not-exact match | Library component summary + gap list | \"Library has `Button` with no `loading` state. Reuse + wrap locally, or rebuild from scratch?\" |\n| Scope ambiguity at plan-lock (0d) | What's clearly in, what's clearly out, what's ambiguous | \"Spec lists `Button` and `Input`; `Field` is referenced but not defined. In or out of v1?\" |\n\n**If the user rejects an option you already built on:** fix before moving on. Never build on rejected work.\n\n---\n\n## 7. Naming Conventions\n\nMatch existing file conventions. If starting fresh:\n\n**Variables** (slash-separated):\n```\ncolor\u002Fbg\u002Fprimary     color\u002Ftext\u002Fsecondary    color\u002Fborder\u002Fdefault\nspacing\u002Fxs  spacing\u002Fsm  spacing\u002Fmd  spacing\u002Flg  spacing\u002Fxl  spacing\u002F2xl\nradius\u002Fnone  radius\u002Fsm  radius\u002Fmd  radius\u002Flg  radius\u002Ffull\ntypography\u002Fbody\u002Ffont-size    typography\u002Fheading\u002Fline-height\n```\n\n**Primitives**: `blue\u002F50` → `blue\u002F900`, `gray\u002F50` → `gray\u002F900`\n\n**Component names**: `Button`, `Input`, `Card`, `Avatar`, `Badge`, `Checkbox`, `Toggle`\n\n**Variant names**: `Property=Value, Property=Value` — e.g., `Size=Medium, Style=Primary, State=Default`\n\n**Page separators**: `---` (most common) or `——— COMPONENTS ———`\n\n> Full naming reference: [naming-conventions.md](references\u002Fnaming-conventions.md)\n\n---\n\n## 8. Token Architecture\n\n| Complexity | Pattern |\n|-----------|---------|\n| \u003C 50 tokens | Single collection, 2 modes (Light\u002FDark) |\n| 50–200 tokens | **Standard**: Primitives (1 mode) + Color semantic (Light\u002FDark) + Spacing (1 mode) + Typography (1 mode) |\n| 200+ tokens | **Advanced**: Multiple semantic collections, 4–8 modes (Light\u002FDark × Contrast × Brand). See M3 pattern in [token-creation.md](references\u002Ftoken-creation.md) |\n\nStandard pattern (recommended starting point):\n```\nCollection: \"Primitives\"    modes: [\"Value\"]\n  blue\u002F500 = #3B82F6, gray\u002F900 = #111827, ...\n\nCollection: \"Color\"         modes: [\"Light\", \"Dark\"]\n  color\u002Fbg\u002Fprimary → Light: alias Primitives\u002Fwhite, Dark: alias Primitives\u002Fgray-900\n  color\u002Ftext\u002Fprimary → Light: alias Primitives\u002Fgray-900, Dark: alias Primitives\u002Fwhite\n\nCollection: \"Spacing\"       modes: [\"Value\"]\n  spacing\u002Fxs = 4, spacing\u002Fsm = 8, spacing\u002Fmd = 16, ...\n```\n\n---\n\n## 9. Per-Phase Anti-Patterns\n\n**Phase 0 anti-patterns:**\n- ❌ Starting to create anything before scope is locked with user\n- ❌ Ignoring existing file conventions and imposing new ones\n- ❌ Skipping `search_design_system` before planning component creation\n\n**Phase 1 anti-patterns:**\n- ❌ Using `ALL_SCOPES` on any variable\n- ❌ Duplicating raw values in semantic layer instead of aliasing\n- ❌ Not setting code syntax (breaks Dev Mode and round-tripping)\n- ❌ Creating component tokens before agreeing on token taxonomy\n\n**Phase 2 anti-patterns:**\n- ❌ Skipping the cover page or foundations docs\n- ❌ Putting multiple unrelated components on one page\n\n**Phase 3 anti-patterns:**\n- ❌ Creating components before foundations exist\n- ❌ Hardcoding any fill\u002Fstroke\u002Fspacing\u002Fradius value in a component\n- ❌ Creating a variant per icon (use INSTANCE_SWAP instead)\n- ❌ Not positioning variants after combineAsVariants (they all stack at 0,0)\n- ❌ Building variant matrix > 30 without splitting (variant explosion)\n- ❌ Importing remote components then immediately detaching them\n\n**General anti-patterns:**\n- ❌ Retrying a failed script without understanding the error first\n- ❌ Using name-prefix matching for cleanup (deletes user-owned nodes)\n- ❌ Building on unvalidated work from the previous step\n- ❌ Parallelizing use_figma calls (always sequential)\n- ❌ Guessing\u002Fhallucinating node IDs from memory (always read from state ledger)\n- ❌ Writing massive inline scripts instead of using the provided helper scripts\n- ❌ Starting Phase 3 because the user said \"build the button\" without completing Phases 0-2\n\n---\n\n## 10. Reference Docs\n\nLoad on demand — each reference is authoritative for its phase:\n\nUse your file reading tool to read these docs when needed. Do not assume their contents from the filename.\n\n| Doc | Phase | Required \u002F Optional | Load when |\n|-----|-------|---------------------|-----------|\n| [discovery-phase.md](references\u002Fdiscovery-phase.md) | 0 | **Required** | Starting any build — codebase analysis + Figma inspection |\n| [token-creation.md](references\u002Ftoken-creation.md) | 1 | **Required** | Creating variables, collections, modes, styles |\n| [documentation-creation.md](references\u002Fdocumentation-creation.md) | 2 | Required | Creating cover page, foundations docs, swatches |\n| [component-creation.md](references\u002Fcomponent-creation.md) | 3 | **Required** | Creating any component or variant |\n| [code-connect-setup.md](references\u002Fcode-connect-setup.md) | 3–4 | Required | Setting up Code Connect or variable code syntax |\n| [naming-conventions.md](references\u002Fnaming-conventions.md) | Any | Optional | Naming anything — variables, pages, variants, styles |\n| [error-recovery.md](references\u002Ferror-recovery.md) | Any | **Required on error** | Script fails, multi-step workflow recovery, cleanup of abandoned workflow state |\n\n---\n\n## 11. Scripts\n\nReusable Plugin API helper functions. Embed in `use_figma` calls:\n\n| Script | Purpose |\n|--------|---------|\n| [inspectFileStructure.js](scripts\u002FinspectFileStructure.js) | Discover all pages, components, variables, styles; returns full inventory |\n| [createVariableCollection.js](scripts\u002FcreateVariableCollection.js) | Create a named collection with modes; returns `{collectionId, modeIds}` |\n| [createSemanticTokens.js](scripts\u002FcreateSemanticTokens.js) | Create aliased semantic variables from a token map |\n| [createComponentWithVariants.js](scripts\u002FcreateComponentWithVariants.js) | Build a component set from a variant matrix; handles grid layout |\n| [bindVariablesToComponent.js](scripts\u002FbindVariablesToComponent.js) | Bind design tokens to all component visual properties |\n| [createDocumentationPage.js](scripts\u002FcreateDocumentationPage.js) | Create a page with title + description + section structure |\n| [validateCreation.js](scripts\u002FvalidateCreation.js) | Verify created nodes match expected counts, names, structure |\n| [cleanupOrphans.js](scripts\u002FcleanupOrphans.js) | Remove orphaned nodes by name convention or state ledger IDs |\n| [rehydrateState.js](scripts\u002FrehydrateState.js) | Scan file for all pages, components, variables by name; returns full `{key → nodeId}` map for state reconstruction |\n",{"data":40,"body":42},{"name":4,"description":6,"disable-model-invocation":41},false,{"type":43,"children":44},"root",[45,54,69,95,143,147,154,159,164,202,207,231,236,299,306,318,323,370,380,397,400,406,411,424,502,508,615,621,676,682,687,795,801,850,853,859,869,976,986,1276,1279,1285,1334,1447,1459,1710,1720,1730,1735,1740,2391,2401,2426,2436,2444,2447,2453,2458,2474,2483,2504,2532,2541,2551,2574,2584,2602,2612,2625,2643,2646,2652,2657,2667,2802,2812,2815,2821,2826,2835,2844,2882,2937,2960,2983,2997,3000,3006,3083,3088,3097,3100,3106,3114,3139,3147,3177,3185,3198,3206,3239,3247,3285,3288,3294,3299,3304,3528,3531,3537,3549,3738],{"type":46,"tag":47,"props":48,"children":50},"element","h1",{"id":49},"design-system-builder-figma-mcp-skill",[51],{"type":52,"value":53},"text","Design System Builder — Figma MCP Skill",{"type":46,"tag":55,"props":56,"children":57},"p",{},[58,60,67],{"type":52,"value":59},"Build professional-grade design systems in Figma that match code. This skill orchestrates multi-phase workflows across 20–100+ ",{"type":46,"tag":61,"props":62,"children":64},"code",{"className":63},[],[65],{"type":52,"value":66},"use_figma",{"type":52,"value":68}," calls, enforcing quality patterns from real-world design systems (Material 3, Polaris, Figma UI3, Simple DS).",{"type":46,"tag":55,"props":70,"children":71},{},[72,78,80,86,88,93],{"type":46,"tag":73,"props":74,"children":75},"strong",{},[76],{"type":52,"value":77},"Prerequisites",{"type":52,"value":79},": The ",{"type":46,"tag":61,"props":81,"children":83},{"className":82},[],[84],{"type":52,"value":85},"figma-use",{"type":52,"value":87}," skill MUST also be loaded for every ",{"type":46,"tag":61,"props":89,"children":91},{"className":90},[],[92],{"type":52,"value":66},{"type":52,"value":94}," call. It provides Plugin API syntax rules (return pattern, page reset, ID return, font loading, color range). This skill provides design system domain knowledge and workflow orchestration.",{"type":46,"tag":55,"props":96,"children":97},{},[98,141],{"type":46,"tag":73,"props":99,"children":100},{},[101,103,108,110,116,118,123,125,131,133,139],{"type":52,"value":102},"Always include ",{"type":46,"tag":61,"props":104,"children":106},{"className":105},[],[107],{"type":52,"value":4},{"type":52,"value":109}," in the comma-separated ",{"type":46,"tag":61,"props":111,"children":113},{"className":112},[],[114],{"type":52,"value":115},"skillNames",{"type":52,"value":117}," parameter when calling ",{"type":46,"tag":61,"props":119,"children":121},{"className":120},[],[122],{"type":52,"value":66},{"type":52,"value":124}," as part of this skill. If this skill was loaded via an MCP resource, you MUST prefix the name with ",{"type":46,"tag":61,"props":126,"children":128},{"className":127},[],[129],{"type":52,"value":130},"resource:",{"type":52,"value":132}," (e.g. ",{"type":46,"tag":61,"props":134,"children":136},{"className":135},[],[137],{"type":52,"value":138},"resource:figma-generate-library",{"type":52,"value":140},").",{"type":52,"value":142}," This is a logging parameter — it does not affect execution.",{"type":46,"tag":144,"props":145,"children":146},"hr",{},[],{"type":46,"tag":148,"props":149,"children":151},"h2",{"id":150},"_1-the-one-rule-that-matters-most",[152],{"type":52,"value":153},"1. The One Rule That Matters Most",{"type":46,"tag":55,"props":155,"children":156},{},[157],{"type":52,"value":158},"For every phase, follow this communication contract.",{"type":46,"tag":55,"props":160,"children":161},{},[162],{"type":52,"value":163},"Before starting a phase:",{"type":46,"tag":165,"props":166,"children":167},"ul",{},[168,182,187,192,197],{"type":46,"tag":169,"props":170,"children":171},"li",{},[172,174,180],{"type":52,"value":173},"Post a user-facing checklist titled ",{"type":46,"tag":61,"props":175,"children":177},{"className":176},[],[178],{"type":52,"value":179},"Phase N Checklist",{"type":52,"value":181},".",{"type":46,"tag":169,"props":183,"children":184},{},[185],{"type":52,"value":186},"Include every task\u002Fsubtask that will be attempted in that phase.",{"type":46,"tag":169,"props":188,"children":189},{},[190],{"type":52,"value":191},"Include the phase exit criteria.",{"type":46,"tag":169,"props":193,"children":194},{},[195],{"type":52,"value":196},"Do not begin mutating work for the phase until this checklist has been posted.",{"type":46,"tag":169,"props":198,"children":199},{},[200],{"type":52,"value":201},"If the phase requires explicit approval, ask for approval after the checklist and wait.",{"type":46,"tag":55,"props":203,"children":204},{},[205],{"type":52,"value":206},"During execution:",{"type":46,"tag":165,"props":208,"children":209},{},[210,221,226],{"type":46,"tag":169,"props":211,"children":212},{},[213,215],{"type":52,"value":214},"Before each major subsection, post a short update naming the exact section being worked on, using this format:\n",{"type":46,"tag":61,"props":216,"children":218},{"className":217},[],[219],{"type":52,"value":220},"Working on Phase N.X: \u003Csection name>",{"type":46,"tag":169,"props":222,"children":223},{},[224],{"type":52,"value":225},"Keep updates concise, but make the current work visible.",{"type":46,"tag":169,"props":227,"children":228},{},[229],{"type":52,"value":230},"When a subsection completes, mark it as completed in the running checklist if the interface supports checklist\u002Fstatus updates; otherwise mention completion in the next progress update.",{"type":46,"tag":55,"props":232,"children":233},{},[234],{"type":52,"value":235},"At the end of each phase:",{"type":46,"tag":165,"props":237,"children":238},{},[239,280,285],{"type":46,"tag":169,"props":240,"children":241},{},[242,244,250,252],{"type":52,"value":243},"Post a ",{"type":46,"tag":61,"props":245,"children":247},{"className":246},[],[248],{"type":52,"value":249},"Phase N Summary",{"type":52,"value":251}," with:\n",{"type":46,"tag":165,"props":253,"children":254},{},[255,260,265,270,275],{"type":46,"tag":169,"props":256,"children":257},{},[258],{"type":52,"value":259},"Completed tasks",{"type":46,"tag":169,"props":261,"children":262},{},[263],{"type":52,"value":264},"Created or changed Figma objects",{"type":46,"tag":169,"props":266,"children":267},{},[268],{"type":52,"value":269},"Validations performed",{"type":46,"tag":169,"props":271,"children":272},{},[273],{"type":52,"value":274},"Decisions or conflicts resolved",{"type":46,"tag":169,"props":276,"children":277},{},[278],{"type":52,"value":279},"Remaining risks or follow-ups",{"type":46,"tag":169,"props":281,"children":282},{},[283],{"type":52,"value":284},"Then show the required phase artifact for that phase and continue automatically.",{"type":46,"tag":169,"props":286,"children":287},{},[288,290,297],{"type":52,"value":289},"Only ask for explicit approval after Phase 0 or if a genuine decision fork arises (see ",{"type":46,"tag":291,"props":292,"children":294},"a",{"href":293},"#6-decision-forks",[295],{"type":52,"value":296},"Section 6",{"type":52,"value":298},"). For Phases 1–4, the default is to continue automatically after the summary.",{"type":46,"tag":300,"props":301,"children":303},"h3",{"id":302},"stable-task-ids",[304],{"type":52,"value":305},"Stable Task IDs",{"type":46,"tag":55,"props":307,"children":308},{},[309,311,317],{"type":52,"value":310},"Use one task ID format everywhere: ",{"type":46,"tag":61,"props":312,"children":314},{"className":313},[],[315],{"type":52,"value":316},"P{phase}.{step}",{"type":52,"value":181},{"type":46,"tag":55,"props":319,"children":320},{},[321],{"type":52,"value":322},"Rules:",{"type":46,"tag":165,"props":324,"children":325},{},[326,360,365],{"type":46,"tag":169,"props":327,"children":328},{},[329,331,337,339,345,346,352,353,359],{"type":52,"value":330},"Use lettered step IDs only: ",{"type":46,"tag":61,"props":332,"children":334},{"className":333},[],[335],{"type":52,"value":336},"P0.a",{"type":52,"value":338},", ",{"type":46,"tag":61,"props":340,"children":342},{"className":341},[],[343],{"type":52,"value":344},"P0.b",{"type":52,"value":338},{"type":46,"tag":61,"props":347,"children":349},{"className":348},[],[350],{"type":52,"value":351},"P1.a",{"type":52,"value":338},{"type":46,"tag":61,"props":354,"children":356},{"className":355},[],[357],{"type":52,"value":358},"P3.d",{"type":52,"value":181},{"type":46,"tag":169,"props":361,"children":362},{},[363],{"type":52,"value":364},"Do not use plain bullet points for task lists.",{"type":46,"tag":169,"props":366,"children":367},{},[368],{"type":52,"value":369},"Every phase checklist, progress update, validation note, and phase summary MUST reference the same task IDs",{"type":46,"tag":55,"props":371,"children":372},{},[373,378],{"type":46,"tag":73,"props":374,"children":375},{},[376],{"type":52,"value":377},"No setup exception:",{"type":52,"value":379}," Creating a new Figma file, importing a library, creating pages, variables, collections, styles, or components all count as creation\u002Fmutation. Do not treat any of them as harmless setup.",{"type":46,"tag":55,"props":381,"children":382},{},[383,388,390,395],{"type":46,"tag":73,"props":384,"children":385},{},[386],{"type":52,"value":387},"This is NEVER a one-shot task.",{"type":52,"value":389}," Building a design system requires 20–100+ ",{"type":46,"tag":61,"props":391,"children":393},{"className":392},[],[394],{"type":52,"value":66},{"type":52,"value":396}," calls across multiple phases, with mandatory progress between them. Any attempt to create everything in one call WILL produce broken, incomplete, or unrecoverable results. Break every operation to the smallest useful unit, validate, get feedback, proceed.",{"type":46,"tag":144,"props":398,"children":399},{},[],{"type":46,"tag":148,"props":401,"children":403},{"id":402},"_2-mandatory-workflow",[404],{"type":52,"value":405},"2. Mandatory Workflow",{"type":46,"tag":55,"props":407,"children":408},{},[409],{"type":52,"value":410},"Work through the phases in order. Do not move to the next phase until the current phase's required actions and acceptance checks are complete. If a phase cannot pass, stop and report the blocker. Do not approximate, skip, or defer a failed phase unless the user explicitly approves the limitation. No best-effort substitutions. No quiet approximations. No handoff with missing source truth, missing visual truth, fake assets, approximate typography, broken interactions, or unverified states.",{"type":46,"tag":300,"props":412,"children":414},{"id":413},"phase-0-discovery-always-first-no-use_figma-writes-yet",[415,417,422],{"type":52,"value":416},"Phase 0: DISCOVERY (always first — no ",{"type":46,"tag":61,"props":418,"children":420},{"className":419},[],[421],{"type":52,"value":66},{"type":52,"value":423}," writes yet)",{"type":46,"tag":165,"props":425,"children":428},{"className":426},[427],"contains-task-list",[429,442,451,468,477,486],{"type":46,"tag":169,"props":430,"children":433},{"className":431},[432],"task-list-item",[434,440],{"type":46,"tag":435,"props":436,"children":439},"input",{"disabled":437,"type":438},true,"checkbox",[],{"type":52,"value":441}," 0a. Analyze codebase → extract tokens, components, naming conventions",{"type":46,"tag":169,"props":443,"children":445},{"className":444},[432],[446,449],{"type":46,"tag":435,"props":447,"children":448},{"disabled":437,"type":438},[],{"type":52,"value":450}," 0b. Inspect Figma file → pages, variables, components, styles, existing conventions",{"type":46,"tag":169,"props":452,"children":454},{"className":453},[432],[455,458,460,466],{"type":46,"tag":435,"props":456,"children":457},{"disabled":437,"type":438},[],{"type":52,"value":459}," 0c. Search subscribed libraries → use ",{"type":46,"tag":61,"props":461,"children":463},{"className":462},[],[464],{"type":52,"value":465},"search_design_system",{"type":52,"value":467}," for reusable assets",{"type":46,"tag":169,"props":469,"children":471},{"className":470},[432],[472,475],{"type":46,"tag":435,"props":473,"children":474},{"disabled":437,"type":438},[],{"type":52,"value":476}," 0d. Lock v1 scope → exact token set + component list recorded before any creation",{"type":46,"tag":169,"props":478,"children":480},{"className":479},[432],[481,484],{"type":46,"tag":435,"props":482,"children":483},{"disabled":437,"type":438},[],{"type":52,"value":485}," 0e. Map code → Figma → every conflict (code disagrees with Figma) resolved and recorded",{"type":46,"tag":169,"props":487,"children":489},{"className":488},[432],[490,493,495,500],{"type":46,"tag":435,"props":491,"children":492},{"disabled":437,"type":438},[],{"type":52,"value":494}," 0f. Print a ",{"type":46,"tag":73,"props":496,"children":497},{},[498],{"type":52,"value":499},"gap analysis",{"type":52,"value":501}," to chat: what exists in code but not Figma, what exists in Figma but not code, and every conflict from 0e with its resolution",{"type":46,"tag":300,"props":503,"children":505},{"id":504},"phase-1-foundations-tokens-first-always-before-components",[506],{"type":52,"value":507},"Phase 1: FOUNDATIONS (tokens first — always before components)",{"type":46,"tag":165,"props":509,"children":511},{"className":510},[427],[512,521,530,539,556,565,574,590,606],{"type":46,"tag":169,"props":513,"children":515},{"className":514},[432],[516,519],{"type":46,"tag":435,"props":517,"children":518},{"disabled":437,"type":438},[],{"type":52,"value":520}," 1a. Create variable collections and modes",{"type":46,"tag":169,"props":522,"children":524},{"className":523},[432],[525,528],{"type":46,"tag":435,"props":526,"children":527},{"disabled":437,"type":438},[],{"type":52,"value":529}," 1b. Create primitive variables (raw values, 1 mode)",{"type":46,"tag":169,"props":531,"children":533},{"className":532},[432],[534,537],{"type":46,"tag":435,"props":535,"children":536},{"disabled":437,"type":438},[],{"type":52,"value":538}," 1c. Create semantic variables (aliased to primitives, mode-aware)",{"type":46,"tag":169,"props":540,"children":542},{"className":541},[432],[543,546,548,554],{"type":46,"tag":435,"props":544,"children":545},{"disabled":437,"type":438},[],{"type":52,"value":547}," 1d. Set scopes on ALL variables (never ",{"type":46,"tag":61,"props":549,"children":551},{"className":550},[],[552],{"type":52,"value":553},"ALL_SCOPES",{"type":52,"value":555},")",{"type":46,"tag":169,"props":557,"children":559},{"className":558},[432],[560,563],{"type":46,"tag":435,"props":561,"children":562},{"disabled":437,"type":438},[],{"type":52,"value":564}," 1e. Set code syntax on ALL variables",{"type":46,"tag":169,"props":566,"children":568},{"className":567},[432],[569,572],{"type":46,"tag":435,"props":570,"children":571},{"disabled":437,"type":438},[],{"type":52,"value":573}," 1f. Create effect styles (shadows) and text styles (typography)",{"type":46,"tag":169,"props":575,"children":577},{"className":576},[432],[578,581,583,588],{"type":46,"tag":435,"props":579,"children":580},{"disabled":437,"type":438},[],{"type":52,"value":582}," 1g. Print a ",{"type":46,"tag":73,"props":584,"children":585},{},[586],{"type":52,"value":587},"variable summary",{"type":52,"value":589}," to chat: N collections, M variables, K modes, broken down by collection",{"type":46,"tag":169,"props":591,"children":593},{"className":592},[432],[594,597,599,604],{"type":46,"tag":435,"props":595,"children":596},{"disabled":437,"type":438},[],{"type":52,"value":598}," 1h. Print the ",{"type":46,"tag":73,"props":600,"children":601},{},[602],{"type":52,"value":603},"style list",{"type":52,"value":605}," to chat: every effect style and text style created, with names",{"type":46,"tag":169,"props":607,"children":609},{"className":608},[432],[610,613],{"type":46,"tag":435,"props":611,"children":612},{"disabled":437,"type":438},[],{"type":52,"value":614}," Exit criteria met: every token from the agreed plan exists, all scopes set, all code syntax set",{"type":46,"tag":300,"props":616,"children":618},{"id":617},"phase-2-file-structure-before-components",[619],{"type":52,"value":620},"Phase 2: FILE STRUCTURE (before components)",{"type":46,"tag":165,"props":622,"children":624},{"className":623},[427],[625,634,643,667],{"type":46,"tag":169,"props":626,"children":628},{"className":627},[432],[629,632],{"type":46,"tag":435,"props":630,"children":631},{"disabled":437,"type":438},[],{"type":52,"value":633}," 2a. Create page skeleton: Cover → Getting Started → Foundations → --- → Components → --- → Utilities",{"type":46,"tag":169,"props":635,"children":637},{"className":636},[432],[638,641],{"type":46,"tag":435,"props":639,"children":640},{"disabled":437,"type":438},[],{"type":52,"value":642}," 2b. Create foundations documentation pages (color swatches, type specimens, spacing bars)",{"type":46,"tag":169,"props":644,"children":646},{"className":645},[432],[647,650,652,658,660,665],{"type":46,"tag":435,"props":648,"children":649},{"disabled":437,"type":438},[],{"type":52,"value":651}," 2c. Capture a ",{"type":46,"tag":61,"props":653,"children":655},{"className":654},[],[656],{"type":52,"value":657},"get_screenshot",{"type":52,"value":659}," of every foundations page and print the ",{"type":46,"tag":73,"props":661,"children":662},{},[663],{"type":52,"value":664},"page list",{"type":52,"value":666}," to chat alongside the screenshots",{"type":46,"tag":169,"props":668,"children":670},{"className":669},[432],[671,674],{"type":46,"tag":435,"props":672,"children":673},{"disabled":437,"type":438},[],{"type":52,"value":675}," Exit criteria met: all planned pages exist, foundations docs are navigable",{"type":46,"tag":300,"props":677,"children":679},{"id":678},"phase-3-components-one-at-a-time-never-batch",[680],{"type":52,"value":681},"Phase 3: COMPONENTS (one at a time — never batch)",{"type":46,"tag":55,"props":683,"children":684},{},[685],{"type":52,"value":686},"For EACH component (in dependency order: atoms before molecules), run the checklist below. Finish the current component before starting the next.",{"type":46,"tag":165,"props":688,"children":690},{"className":689},[427],[691,700,709,726,735,744,753,777,786],{"type":46,"tag":169,"props":692,"children":694},{"className":693},[432],[695,698],{"type":46,"tag":435,"props":696,"children":697},{"disabled":437,"type":438},[],{"type":52,"value":699}," 3a. Create dedicated page",{"type":46,"tag":169,"props":701,"children":703},{"className":702},[432],[704,707],{"type":46,"tag":435,"props":705,"children":706},{"disabled":437,"type":438},[],{"type":52,"value":708}," 3b. Build base component with auto-layout + full variable bindings",{"type":46,"tag":169,"props":710,"children":712},{"className":711},[432],[713,716,718,724],{"type":46,"tag":435,"props":714,"children":715},{"disabled":437,"type":438},[],{"type":52,"value":717}," 3c. Create all variant combinations (",{"type":46,"tag":61,"props":719,"children":721},{"className":720},[],[722],{"type":52,"value":723},"combineAsVariants",{"type":52,"value":725}," + grid layout)",{"type":46,"tag":169,"props":727,"children":729},{"className":728},[432],[730,733],{"type":46,"tag":435,"props":731,"children":732},{"disabled":437,"type":438},[],{"type":52,"value":734}," 3d. Add component properties (TEXT, BOOLEAN, INSTANCE_SWAP)",{"type":46,"tag":169,"props":736,"children":738},{"className":737},[432],[739,742],{"type":46,"tag":435,"props":740,"children":741},{"disabled":437,"type":438},[],{"type":52,"value":743}," 3e. Link properties to child nodes",{"type":46,"tag":169,"props":745,"children":747},{"className":746},[432],[748,751],{"type":46,"tag":435,"props":749,"children":750},{"disabled":437,"type":438},[],{"type":52,"value":752}," 3f. Add page documentation (title, description, usage notes)",{"type":46,"tag":169,"props":754,"children":756},{"className":755},[432],[757,760,762,768,770,775],{"type":46,"tag":435,"props":758,"children":759},{"disabled":437,"type":438},[],{"type":52,"value":761}," 3g. Validate: ",{"type":46,"tag":61,"props":763,"children":765},{"className":764},[],[766],{"type":52,"value":767},"get_metadata",{"type":52,"value":769}," (structure) + ",{"type":46,"tag":61,"props":771,"children":773},{"className":772},[],[774],{"type":52,"value":657},{"type":52,"value":776}," (visual)",{"type":46,"tag":169,"props":778,"children":780},{"className":779},[432],[781,784],{"type":46,"tag":435,"props":782,"children":783},{"disabled":437,"type":438},[],{"type":52,"value":785}," 3h. Optional: lightweight Code Connect mapping while context is fresh",{"type":46,"tag":169,"props":787,"children":789},{"className":788},[432],[790,793],{"type":46,"tag":435,"props":791,"children":792},{"disabled":437,"type":438},[],{"type":52,"value":794}," Exit criteria met: variant count correct, all bindings verified, screenshot looks right",{"type":46,"tag":300,"props":796,"children":798},{"id":797},"phase-4-integration-qa-final-pass",[799],{"type":52,"value":800},"Phase 4: INTEGRATION + QA (final pass)",{"type":46,"tag":165,"props":802,"children":804},{"className":803},[427],[805,814,823,832,841],{"type":46,"tag":169,"props":806,"children":808},{"className":807},[432],[809,812],{"type":46,"tag":435,"props":810,"children":811},{"disabled":437,"type":438},[],{"type":52,"value":813}," 4a. Finalize all Code Connect mappings",{"type":46,"tag":169,"props":815,"children":817},{"className":816},[432],[818,821],{"type":46,"tag":435,"props":819,"children":820},{"disabled":437,"type":438},[],{"type":52,"value":822}," 4b. Accessibility audit (contrast, min touch targets, focus visibility)",{"type":46,"tag":169,"props":824,"children":826},{"className":825},[432],[827,830],{"type":46,"tag":435,"props":828,"children":829},{"disabled":437,"type":438},[],{"type":52,"value":831}," 4c. Naming audit (no duplicates, no unnamed nodes, consistent casing)",{"type":46,"tag":169,"props":833,"children":835},{"className":834},[432],[836,839],{"type":46,"tag":435,"props":837,"children":838},{"disabled":437,"type":438},[],{"type":52,"value":840}," 4d. Unresolved bindings audit (no hardcoded fills\u002Fstrokes remaining)",{"type":46,"tag":169,"props":842,"children":844},{"className":843},[432],[845,848],{"type":46,"tag":435,"props":846,"children":847},{"disabled":437,"type":438},[],{"type":52,"value":849}," 4e. Final review screenshots of every page",{"type":46,"tag":144,"props":851,"children":852},{},[],{"type":46,"tag":148,"props":854,"children":856},{"id":855},"_3-critical-rules",[857],{"type":52,"value":858},"3. Critical Rules",{"type":46,"tag":55,"props":860,"children":861},{},[862,867],{"type":46,"tag":73,"props":863,"children":864},{},[865],{"type":52,"value":866},"Plugin API basics",{"type":52,"value":868}," (from use_figma skill — enforced here too):",{"type":46,"tag":165,"props":870,"children":871},{},[872,885,890,939,950,955],{"type":46,"tag":169,"props":873,"children":874},{},[875,877,883],{"type":52,"value":876},"Use ",{"type":46,"tag":61,"props":878,"children":880},{"className":879},[],[881],{"type":52,"value":882},"return",{"type":52,"value":884}," to send data back (auto-serialized). Do NOT wrap in IIFE or call closePlugin.",{"type":46,"tag":169,"props":886,"children":887},{},[888],{"type":52,"value":889},"Return ALL created\u002Fmutated node IDs in every return value",{"type":46,"tag":169,"props":891,"children":892},{},[893,895,901,903,908,910,915,917,923,925,938],{"type":52,"value":894},"Page context resets each call — always ",{"type":46,"tag":61,"props":896,"children":898},{"className":897},[],[899],{"type":52,"value":900},"await figma.setCurrentPageAsync(page)",{"type":52,"value":902}," at start. ",{"type":46,"tag":73,"props":904,"children":905},{},[906],{"type":52,"value":907},"Call it at most once per script",{"type":52,"value":909},": each component or doc page is its own ",{"type":46,"tag":61,"props":911,"children":913},{"className":912},[],[914],{"type":52,"value":66},{"type":52,"value":916}," call. Never loop over ",{"type":46,"tag":61,"props":918,"children":920},{"className":919},[],[921],{"type":52,"value":922},"figma.root.children",{"type":52,"value":924}," and switch pages inside a mutating script — split that work into one focused call per target page (see ",{"type":46,"tag":291,"props":926,"children":928},{"href":927},"..\u002Ffigma-use\u002Freferences\u002Fgotchas.md#set-current-page-once-per-use_figma-call--split-multi-page-work-across-calls",[929,931,936],{"type":52,"value":930},"figma-use → gotchas.md → Set current page once per ",{"type":46,"tag":61,"props":932,"children":934},{"className":933},[],[935],{"type":52,"value":66},{"type":52,"value":937}," call",{"type":52,"value":555},{"type":46,"tag":169,"props":940,"children":941},{},[942,948],{"type":46,"tag":61,"props":943,"children":945},{"className":944},[],[946],{"type":52,"value":947},"figma.notify()",{"type":52,"value":949}," throws — never use it",{"type":46,"tag":169,"props":951,"children":952},{},[953],{"type":52,"value":954},"Colors are 0–1 range, not 0–255",{"type":46,"tag":169,"props":956,"children":957},{},[958,960,966,968,974],{"type":52,"value":959},"Font MUST be loaded before any text write: ",{"type":46,"tag":61,"props":961,"children":963},{"className":962},[],[964],{"type":52,"value":965},"await figma.loadFontAsync({family, style})",{"type":52,"value":967},". Use ",{"type":46,"tag":61,"props":969,"children":971},{"className":970},[],[972],{"type":52,"value":973},"await figma.listAvailableFontsAsync()",{"type":52,"value":975}," to discover available fonts and verify exact style strings — if a load fails, query available fonts to find the correct name or a fallback.",{"type":46,"tag":55,"props":977,"children":978},{},[979,984],{"type":46,"tag":73,"props":980,"children":981},{},[982],{"type":52,"value":983},"Design system rules",{"type":52,"value":985},":",{"type":46,"tag":987,"props":988,"children":989},"ol",{},[990,1000,1017,1035,1050,1115,1149,1167,1177,1187,1197,1207,1231,1248,1258],{"type":46,"tag":169,"props":991,"children":992},{},[993,998],{"type":46,"tag":73,"props":994,"children":995},{},[996],{"type":52,"value":997},"Variables BEFORE components",{"type":52,"value":999}," — components bind to variables. No token = no component.",{"type":46,"tag":169,"props":1001,"children":1002},{},[1003,1008,1010,1015],{"type":46,"tag":73,"props":1004,"children":1005},{},[1006],{"type":52,"value":1007},"Inspect before creating",{"type":52,"value":1009}," — run read-only ",{"type":46,"tag":61,"props":1011,"children":1013},{"className":1012},[],[1014],{"type":52,"value":66},{"type":52,"value":1016}," to discover existing conventions. Match them.",{"type":46,"tag":169,"props":1018,"children":1019},{},[1020,1025,1027,1033],{"type":46,"tag":73,"props":1021,"children":1022},{},[1023],{"type":52,"value":1024},"One page per component",{"type":52,"value":1026}," ",{"type":46,"tag":1028,"props":1029,"children":1030},"em",{},[1031],{"type":52,"value":1032},"(default)",{"type":52,"value":1034}," — exception: tightly related families (e.g., Input + helpers) may share a page with clear section separation.",{"type":46,"tag":169,"props":1036,"children":1037},{},[1038,1043,1044,1048],{"type":46,"tag":73,"props":1039,"children":1040},{},[1041],{"type":52,"value":1042},"Bind visual properties to variables",{"type":52,"value":1026},{"type":46,"tag":1028,"props":1045,"children":1046},{},[1047],{"type":52,"value":1032},{"type":52,"value":1049}," — fills, strokes, padding, radius, gap. Exceptions: intentionally fixed geometry (icon pixel-grid sizes, static dividers).",{"type":46,"tag":169,"props":1051,"children":1052},{},[1053,1058,1060,1065,1067,1073,1075,1081,1083,1089,1091,1097,1099,1105,1107,1113],{"type":46,"tag":73,"props":1054,"children":1055},{},[1056],{"type":52,"value":1057},"Scopes on every variable",{"type":52,"value":1059}," — NEVER leave as ",{"type":46,"tag":61,"props":1061,"children":1063},{"className":1062},[],[1064],{"type":52,"value":553},{"type":52,"value":1066},". Background: ",{"type":46,"tag":61,"props":1068,"children":1070},{"className":1069},[],[1071],{"type":52,"value":1072},"FRAME_FILL, SHAPE_FILL",{"type":52,"value":1074},". Text: ",{"type":46,"tag":61,"props":1076,"children":1078},{"className":1077},[],[1079],{"type":52,"value":1080},"TEXT_FILL",{"type":52,"value":1082},". Border: ",{"type":46,"tag":61,"props":1084,"children":1086},{"className":1085},[],[1087],{"type":52,"value":1088},"STROKE_COLOR",{"type":52,"value":1090},". Spacing: ",{"type":46,"tag":61,"props":1092,"children":1094},{"className":1093},[],[1095],{"type":52,"value":1096},"GAP",{"type":52,"value":1098},". Radii: ",{"type":46,"tag":61,"props":1100,"children":1102},{"className":1101},[],[1103],{"type":52,"value":1104},"CORNER_RADIUS",{"type":52,"value":1106},". Primitives: ",{"type":46,"tag":61,"props":1108,"children":1110},{"className":1109},[],[1111],{"type":52,"value":1112},"[]",{"type":52,"value":1114}," (hidden).",{"type":46,"tag":169,"props":1116,"children":1117},{},[1118,1123,1125,1131,1133,1139,1141,1147],{"type":46,"tag":73,"props":1119,"children":1120},{},[1121],{"type":52,"value":1122},"Code syntax on every variable",{"type":52,"value":1124}," — WEB syntax MUST use the ",{"type":46,"tag":61,"props":1126,"children":1128},{"className":1127},[],[1129],{"type":52,"value":1130},"var()",{"type":52,"value":1132}," wrapper: ",{"type":46,"tag":61,"props":1134,"children":1136},{"className":1135},[],[1137],{"type":52,"value":1138},"var(--color-bg-primary)",{"type":52,"value":1140},", not ",{"type":46,"tag":61,"props":1142,"children":1144},{"className":1143},[],[1145],{"type":52,"value":1146},"--color-bg-primary",{"type":52,"value":1148},". Use the actual CSS variable name from the codebase. ANDROID\u002FiOS do NOT use a wrapper.",{"type":46,"tag":169,"props":1150,"children":1151},{},[1152,1157,1159,1165],{"type":46,"tag":73,"props":1153,"children":1154},{},[1155],{"type":52,"value":1156},"Alias semantics to primitives",{"type":52,"value":1158}," — ",{"type":46,"tag":61,"props":1160,"children":1162},{"className":1161},[],[1163],{"type":52,"value":1164},"{ type: 'VARIABLE_ALIAS', id: primitiveVar.id }",{"type":52,"value":1166},". Never duplicate raw values in semantic layer.",{"type":46,"tag":169,"props":1168,"children":1169},{},[1170,1175],{"type":46,"tag":73,"props":1171,"children":1172},{},[1173],{"type":52,"value":1174},"Position variants after combineAsVariants",{"type":52,"value":1176}," — they stack at (0,0). Manually grid-layout + resize.",{"type":46,"tag":169,"props":1178,"children":1179},{},[1180,1185],{"type":46,"tag":73,"props":1181,"children":1182},{},[1183],{"type":52,"value":1184},"INSTANCE_SWAP for icons",{"type":52,"value":1186}," — never create a variant per icon. Cap variant matrices: if Size × Style × State > 30 combinations, split into sub-component.",{"type":46,"tag":169,"props":1188,"children":1189},{},[1190,1195],{"type":46,"tag":73,"props":1191,"children":1192},{},[1193],{"type":52,"value":1194},"Deterministic naming",{"type":52,"value":1196}," — use consistent, unique node names for idempotent cleanup and resumability. Track created node IDs via return values and the state ledger.",{"type":46,"tag":169,"props":1198,"children":1199},{},[1200,1205],{"type":46,"tag":73,"props":1201,"children":1202},{},[1203],{"type":52,"value":1204},"No destructive cleanup",{"type":52,"value":1206}," — cleanup scripts identify nodes by name convention or returned IDs, not by guessing.",{"type":46,"tag":169,"props":1208,"children":1209},{},[1210,1215,1217,1222,1224,1229],{"type":46,"tag":73,"props":1211,"children":1212},{},[1213],{"type":52,"value":1214},"Validate before proceeding",{"type":52,"value":1216}," — never build on unvalidated work. ",{"type":46,"tag":61,"props":1218,"children":1220},{"className":1219},[],[1221],{"type":52,"value":767},{"type":52,"value":1223}," after every create, ",{"type":46,"tag":61,"props":1225,"children":1227},{"className":1226},[],[1228],{"type":52,"value":657},{"type":52,"value":1230}," after each component.",{"type":46,"tag":169,"props":1232,"children":1233},{},[1234,1246],{"type":46,"tag":73,"props":1235,"children":1236},{},[1237,1239,1244],{"type":52,"value":1238},"NEVER parallelize ",{"type":46,"tag":61,"props":1240,"children":1242},{"className":1241},[],[1243],{"type":52,"value":66},{"type":52,"value":1245}," calls",{"type":52,"value":1247}," — Figma state mutations must be strictly sequential. Even if your tool supports parallel calls, never run two use_figma calls simultaneously.",{"type":46,"tag":169,"props":1249,"children":1250},{},[1251,1256],{"type":46,"tag":73,"props":1252,"children":1253},{},[1254],{"type":52,"value":1255},"Never hallucinate Node IDs",{"type":52,"value":1257}," — always read IDs from the state ledger returned by previous calls. Never reconstruct or guess an ID from memory.",{"type":46,"tag":169,"props":1259,"children":1260},{},[1261,1266,1268,1274],{"type":46,"tag":73,"props":1262,"children":1263},{},[1264],{"type":52,"value":1265},"Use the helper scripts",{"type":52,"value":1267}," — embed scripts from ",{"type":46,"tag":61,"props":1269,"children":1271},{"className":1270},[],[1272],{"type":52,"value":1273},"scripts\u002F",{"type":52,"value":1275}," into your use_figma calls. Don't write 200-line inline scripts from scratch.",{"type":46,"tag":144,"props":1277,"children":1278},{},[],{"type":46,"tag":148,"props":1280,"children":1282},{"id":1281},"_4-state-management-required-for-long-workflows",[1283],{"type":52,"value":1284},"4. State Management (Required for Long Workflows)",{"type":46,"tag":1286,"props":1287,"children":1288},"blockquote",{},[1289],{"type":46,"tag":55,"props":1290,"children":1291},{},[1292,1317,1319,1325,1326,1332],{"type":46,"tag":73,"props":1293,"children":1294},{},[1295,1301,1303,1309,1311,1316],{"type":46,"tag":61,"props":1296,"children":1298},{"className":1297},[],[1299],{"type":52,"value":1300},"getPluginData()",{"type":52,"value":1302}," \u002F ",{"type":46,"tag":61,"props":1304,"children":1306},{"className":1305},[],[1307],{"type":52,"value":1308},"setPluginData()",{"type":52,"value":1310}," are NOT supported in ",{"type":46,"tag":61,"props":1312,"children":1314},{"className":1313},[],[1315],{"type":52,"value":66},{"type":52,"value":181},{"type":52,"value":1318}," Use ",{"type":46,"tag":61,"props":1320,"children":1322},{"className":1321},[],[1323],{"type":52,"value":1324},"getSharedPluginData()",{"type":52,"value":1302},{"type":46,"tag":61,"props":1327,"children":1329},{"className":1328},[],[1330],{"type":52,"value":1331},"setSharedPluginData()",{"type":52,"value":1333}," instead (these ARE supported), or use name-based lookups and the state ledger (returned IDs).",{"type":46,"tag":1335,"props":1336,"children":1337},"table",{},[1338,1362],{"type":46,"tag":1339,"props":1340,"children":1341},"thead",{},[1342],{"type":46,"tag":1343,"props":1344,"children":1345},"tr",{},[1346,1352,1357],{"type":46,"tag":1347,"props":1348,"children":1349},"th",{},[1350],{"type":52,"value":1351},"Entity type",{"type":46,"tag":1347,"props":1353,"children":1354},{},[1355],{"type":52,"value":1356},"Idempotency key",{"type":46,"tag":1347,"props":1358,"children":1359},{},[1360],{"type":52,"value":1361},"How to check existence",{"type":46,"tag":1363,"props":1364,"children":1365},"tbody",{},[1366,1403,1425],{"type":46,"tag":1343,"props":1367,"children":1368},{},[1369,1375,1386],{"type":46,"tag":1370,"props":1371,"children":1372},"td",{},[1373],{"type":52,"value":1374},"Scene nodes (pages, frames, components)",{"type":46,"tag":1370,"props":1376,"children":1377},{},[1378,1384],{"type":46,"tag":61,"props":1379,"children":1381},{"className":1380},[],[1382],{"type":52,"value":1383},"setSharedPluginData('dsb', 'key', value)",{"type":52,"value":1385}," or unique name",{"type":46,"tag":1370,"props":1387,"children":1388},{},[1389,1395,1397],{"type":46,"tag":61,"props":1390,"children":1392},{"className":1391},[],[1393],{"type":52,"value":1394},"node.getSharedPluginData('dsb', 'key')",{"type":52,"value":1396}," or ",{"type":46,"tag":61,"props":1398,"children":1400},{"className":1399},[],[1401],{"type":52,"value":1402},"page.findOne(n => n.name === 'Button')",{"type":46,"tag":1343,"props":1404,"children":1405},{},[1406,1411,1416],{"type":46,"tag":1370,"props":1407,"children":1408},{},[1409],{"type":52,"value":1410},"Variables",{"type":46,"tag":1370,"props":1412,"children":1413},{},[1414],{"type":52,"value":1415},"Name within collection",{"type":46,"tag":1370,"props":1417,"children":1418},{},[1419],{"type":46,"tag":61,"props":1420,"children":1422},{"className":1421},[],[1423],{"type":52,"value":1424},"(await figma.variables.getLocalVariablesAsync()).find(v => v.name === name && v.variableCollectionId === collId)",{"type":46,"tag":1343,"props":1426,"children":1427},{},[1428,1433,1438],{"type":46,"tag":1370,"props":1429,"children":1430},{},[1431],{"type":52,"value":1432},"Styles",{"type":46,"tag":1370,"props":1434,"children":1435},{},[1436],{"type":52,"value":1437},"Name",{"type":46,"tag":1370,"props":1439,"children":1440},{},[1441],{"type":46,"tag":61,"props":1442,"children":1444},{"className":1443},[],[1445],{"type":52,"value":1446},"getLocalTextStyles().find(s => s.name === name)",{"type":46,"tag":55,"props":1448,"children":1449},{},[1450,1452,1457],{"type":52,"value":1451},"Tag every created ",{"type":46,"tag":73,"props":1453,"children":1454},{},[1455],{"type":52,"value":1456},"scene node",{"type":52,"value":1458}," immediately after creation:",{"type":46,"tag":1460,"props":1461,"children":1466},"pre",{"className":1462,"code":1463,"language":1464,"meta":1465,"style":1465},"language-javascript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","node.setSharedPluginData('dsb', 'run_id', RUN_ID);        \u002F\u002F identifies this build run\nnode.setSharedPluginData('dsb', 'phase', 'phase3');        \u002F\u002F which phase created it\nnode.setSharedPluginData('dsb', 'key', 'component\u002Fbutton');\u002F\u002F unique logical key\n","javascript","",[1467],{"type":46,"tag":61,"props":1468,"children":1469},{"__ignoreMap":1465},[1470,1552,1631],{"type":46,"tag":1471,"props":1472,"children":1475},"span",{"class":1473,"line":1474},"line",1,[1476,1482,1487,1493,1498,1503,1509,1513,1518,1523,1528,1532,1536,1541,1546],{"type":46,"tag":1471,"props":1477,"children":1479},{"style":1478},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[1480],{"type":52,"value":1481},"node",{"type":46,"tag":1471,"props":1483,"children":1485},{"style":1484},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[1486],{"type":52,"value":181},{"type":46,"tag":1471,"props":1488,"children":1490},{"style":1489},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[1491],{"type":52,"value":1492},"setSharedPluginData",{"type":46,"tag":1471,"props":1494,"children":1495},{"style":1478},[1496],{"type":52,"value":1497},"(",{"type":46,"tag":1471,"props":1499,"children":1500},{"style":1484},[1501],{"type":52,"value":1502},"'",{"type":46,"tag":1471,"props":1504,"children":1506},{"style":1505},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[1507],{"type":52,"value":1508},"dsb",{"type":46,"tag":1471,"props":1510,"children":1511},{"style":1484},[1512],{"type":52,"value":1502},{"type":46,"tag":1471,"props":1514,"children":1515},{"style":1484},[1516],{"type":52,"value":1517},",",{"type":46,"tag":1471,"props":1519,"children":1520},{"style":1484},[1521],{"type":52,"value":1522}," '",{"type":46,"tag":1471,"props":1524,"children":1525},{"style":1505},[1526],{"type":52,"value":1527},"run_id",{"type":46,"tag":1471,"props":1529,"children":1530},{"style":1484},[1531],{"type":52,"value":1502},{"type":46,"tag":1471,"props":1533,"children":1534},{"style":1484},[1535],{"type":52,"value":1517},{"type":46,"tag":1471,"props":1537,"children":1538},{"style":1478},[1539],{"type":52,"value":1540}," RUN_ID)",{"type":46,"tag":1471,"props":1542,"children":1543},{"style":1484},[1544],{"type":52,"value":1545},";",{"type":46,"tag":1471,"props":1547,"children":1549},{"style":1548},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[1550],{"type":52,"value":1551},"        \u002F\u002F identifies this build run\n",{"type":46,"tag":1471,"props":1553,"children":1555},{"class":1473,"line":1554},2,[1556,1560,1564,1568,1572,1576,1580,1584,1588,1592,1597,1601,1605,1609,1614,1618,1622,1626],{"type":46,"tag":1471,"props":1557,"children":1558},{"style":1478},[1559],{"type":52,"value":1481},{"type":46,"tag":1471,"props":1561,"children":1562},{"style":1484},[1563],{"type":52,"value":181},{"type":46,"tag":1471,"props":1565,"children":1566},{"style":1489},[1567],{"type":52,"value":1492},{"type":46,"tag":1471,"props":1569,"children":1570},{"style":1478},[1571],{"type":52,"value":1497},{"type":46,"tag":1471,"props":1573,"children":1574},{"style":1484},[1575],{"type":52,"value":1502},{"type":46,"tag":1471,"props":1577,"children":1578},{"style":1505},[1579],{"type":52,"value":1508},{"type":46,"tag":1471,"props":1581,"children":1582},{"style":1484},[1583],{"type":52,"value":1502},{"type":46,"tag":1471,"props":1585,"children":1586},{"style":1484},[1587],{"type":52,"value":1517},{"type":46,"tag":1471,"props":1589,"children":1590},{"style":1484},[1591],{"type":52,"value":1522},{"type":46,"tag":1471,"props":1593,"children":1594},{"style":1505},[1595],{"type":52,"value":1596},"phase",{"type":46,"tag":1471,"props":1598,"children":1599},{"style":1484},[1600],{"type":52,"value":1502},{"type":46,"tag":1471,"props":1602,"children":1603},{"style":1484},[1604],{"type":52,"value":1517},{"type":46,"tag":1471,"props":1606,"children":1607},{"style":1484},[1608],{"type":52,"value":1522},{"type":46,"tag":1471,"props":1610,"children":1611},{"style":1505},[1612],{"type":52,"value":1613},"phase3",{"type":46,"tag":1471,"props":1615,"children":1616},{"style":1484},[1617],{"type":52,"value":1502},{"type":46,"tag":1471,"props":1619,"children":1620},{"style":1478},[1621],{"type":52,"value":555},{"type":46,"tag":1471,"props":1623,"children":1624},{"style":1484},[1625],{"type":52,"value":1545},{"type":46,"tag":1471,"props":1627,"children":1628},{"style":1548},[1629],{"type":52,"value":1630},"        \u002F\u002F which phase created it\n",{"type":46,"tag":1471,"props":1632,"children":1634},{"class":1473,"line":1633},3,[1635,1639,1643,1647,1651,1655,1659,1663,1667,1671,1676,1680,1684,1688,1693,1697,1701,1705],{"type":46,"tag":1471,"props":1636,"children":1637},{"style":1478},[1638],{"type":52,"value":1481},{"type":46,"tag":1471,"props":1640,"children":1641},{"style":1484},[1642],{"type":52,"value":181},{"type":46,"tag":1471,"props":1644,"children":1645},{"style":1489},[1646],{"type":52,"value":1492},{"type":46,"tag":1471,"props":1648,"children":1649},{"style":1478},[1650],{"type":52,"value":1497},{"type":46,"tag":1471,"props":1652,"children":1653},{"style":1484},[1654],{"type":52,"value":1502},{"type":46,"tag":1471,"props":1656,"children":1657},{"style":1505},[1658],{"type":52,"value":1508},{"type":46,"tag":1471,"props":1660,"children":1661},{"style":1484},[1662],{"type":52,"value":1502},{"type":46,"tag":1471,"props":1664,"children":1665},{"style":1484},[1666],{"type":52,"value":1517},{"type":46,"tag":1471,"props":1668,"children":1669},{"style":1484},[1670],{"type":52,"value":1522},{"type":46,"tag":1471,"props":1672,"children":1673},{"style":1505},[1674],{"type":52,"value":1675},"key",{"type":46,"tag":1471,"props":1677,"children":1678},{"style":1484},[1679],{"type":52,"value":1502},{"type":46,"tag":1471,"props":1681,"children":1682},{"style":1484},[1683],{"type":52,"value":1517},{"type":46,"tag":1471,"props":1685,"children":1686},{"style":1484},[1687],{"type":52,"value":1522},{"type":46,"tag":1471,"props":1689,"children":1690},{"style":1505},[1691],{"type":52,"value":1692},"component\u002Fbutton",{"type":46,"tag":1471,"props":1694,"children":1695},{"style":1484},[1696],{"type":52,"value":1502},{"type":46,"tag":1471,"props":1698,"children":1699},{"style":1478},[1700],{"type":52,"value":555},{"type":46,"tag":1471,"props":1702,"children":1703},{"style":1484},[1704],{"type":52,"value":1545},{"type":46,"tag":1471,"props":1706,"children":1707},{"style":1548},[1708],{"type":52,"value":1709},"\u002F\u002F unique logical key\n",{"type":46,"tag":55,"props":1711,"children":1712},{},[1713,1718],{"type":46,"tag":73,"props":1714,"children":1715},{},[1716],{"type":52,"value":1717},"State persistence",{"type":52,"value":1719},": Do NOT rely solely on conversation context for the state ledger. Write it to disk:",{"type":46,"tag":1460,"props":1721,"children":1725},{"className":1722,"code":1724,"language":52},[1723],"language-text","\u002Ftmp\u002Fdsb-state-{RUN_ID}.json\n",[1726],{"type":46,"tag":61,"props":1727,"children":1728},{"__ignoreMap":1465},[1729],{"type":52,"value":1724},{"type":46,"tag":55,"props":1731,"children":1732},{},[1733],{"type":52,"value":1734},"Re-read this file at the start of every turn. In long workflows, conversation context will be truncated — the file is the source of truth.",{"type":46,"tag":55,"props":1736,"children":1737},{},[1738],{"type":52,"value":1739},"Maintain a state ledger tracking:",{"type":46,"tag":1460,"props":1741,"children":1745},{"className":1742,"code":1743,"language":1744,"meta":1465,"style":1465},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"runId\": \"ds-build-2024-001\",\n  \"phase\": \"phase3\",\n  \"step\": \"component-button\",\n  \"entities\": {\n    \"collections\": { \"primitives\": \"id:...\", \"color\": \"id:...\" },\n    \"variables\": { \"color\u002Fbg\u002Fprimary\": \"id:...\", \"spacing\u002Fsm\": \"id:...\" },\n    \"pages\": { \"Cover\": \"id:...\", \"Button\": \"id:...\" },\n    \"components\": { \"Button\": \"id:...\" }\n  },\n  \"pendingValidations\": [\"Button:screenshot\"],\n  \"completedSteps\": [\"phase0\", \"phase1\", \"phase2\", \"component-avatar\"]\n}\n","json",[1746],{"type":46,"tag":61,"props":1747,"children":1748},{"__ignoreMap":1465},[1749,1757,1799,1834,1872,1898,1995,2086,2177,2235,2244,2288,2382],{"type":46,"tag":1471,"props":1750,"children":1751},{"class":1473,"line":1474},[1752],{"type":46,"tag":1471,"props":1753,"children":1754},{"style":1484},[1755],{"type":52,"value":1756},"{\n",{"type":46,"tag":1471,"props":1758,"children":1759},{"class":1473,"line":1554},[1760,1765,1771,1776,1780,1785,1790,1794],{"type":46,"tag":1471,"props":1761,"children":1762},{"style":1484},[1763],{"type":52,"value":1764},"  \"",{"type":46,"tag":1471,"props":1766,"children":1768},{"style":1767},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[1769],{"type":52,"value":1770},"runId",{"type":46,"tag":1471,"props":1772,"children":1773},{"style":1484},[1774],{"type":52,"value":1775},"\"",{"type":46,"tag":1471,"props":1777,"children":1778},{"style":1484},[1779],{"type":52,"value":985},{"type":46,"tag":1471,"props":1781,"children":1782},{"style":1484},[1783],{"type":52,"value":1784}," \"",{"type":46,"tag":1471,"props":1786,"children":1787},{"style":1505},[1788],{"type":52,"value":1789},"ds-build-2024-001",{"type":46,"tag":1471,"props":1791,"children":1792},{"style":1484},[1793],{"type":52,"value":1775},{"type":46,"tag":1471,"props":1795,"children":1796},{"style":1484},[1797],{"type":52,"value":1798},",\n",{"type":46,"tag":1471,"props":1800,"children":1801},{"class":1473,"line":1633},[1802,1806,1810,1814,1818,1822,1826,1830],{"type":46,"tag":1471,"props":1803,"children":1804},{"style":1484},[1805],{"type":52,"value":1764},{"type":46,"tag":1471,"props":1807,"children":1808},{"style":1767},[1809],{"type":52,"value":1596},{"type":46,"tag":1471,"props":1811,"children":1812},{"style":1484},[1813],{"type":52,"value":1775},{"type":46,"tag":1471,"props":1815,"children":1816},{"style":1484},[1817],{"type":52,"value":985},{"type":46,"tag":1471,"props":1819,"children":1820},{"style":1484},[1821],{"type":52,"value":1784},{"type":46,"tag":1471,"props":1823,"children":1824},{"style":1505},[1825],{"type":52,"value":1613},{"type":46,"tag":1471,"props":1827,"children":1828},{"style":1484},[1829],{"type":52,"value":1775},{"type":46,"tag":1471,"props":1831,"children":1832},{"style":1484},[1833],{"type":52,"value":1798},{"type":46,"tag":1471,"props":1835,"children":1837},{"class":1473,"line":1836},4,[1838,1842,1847,1851,1855,1859,1864,1868],{"type":46,"tag":1471,"props":1839,"children":1840},{"style":1484},[1841],{"type":52,"value":1764},{"type":46,"tag":1471,"props":1843,"children":1844},{"style":1767},[1845],{"type":52,"value":1846},"step",{"type":46,"tag":1471,"props":1848,"children":1849},{"style":1484},[1850],{"type":52,"value":1775},{"type":46,"tag":1471,"props":1852,"children":1853},{"style":1484},[1854],{"type":52,"value":985},{"type":46,"tag":1471,"props":1856,"children":1857},{"style":1484},[1858],{"type":52,"value":1784},{"type":46,"tag":1471,"props":1860,"children":1861},{"style":1505},[1862],{"type":52,"value":1863},"component-button",{"type":46,"tag":1471,"props":1865,"children":1866},{"style":1484},[1867],{"type":52,"value":1775},{"type":46,"tag":1471,"props":1869,"children":1870},{"style":1484},[1871],{"type":52,"value":1798},{"type":46,"tag":1471,"props":1873,"children":1875},{"class":1473,"line":1874},5,[1876,1880,1885,1889,1893],{"type":46,"tag":1471,"props":1877,"children":1878},{"style":1484},[1879],{"type":52,"value":1764},{"type":46,"tag":1471,"props":1881,"children":1882},{"style":1767},[1883],{"type":52,"value":1884},"entities",{"type":46,"tag":1471,"props":1886,"children":1887},{"style":1484},[1888],{"type":52,"value":1775},{"type":46,"tag":1471,"props":1890,"children":1891},{"style":1484},[1892],{"type":52,"value":985},{"type":46,"tag":1471,"props":1894,"children":1895},{"style":1484},[1896],{"type":52,"value":1897}," {\n",{"type":46,"tag":1471,"props":1899,"children":1901},{"class":1473,"line":1900},6,[1902,1907,1913,1917,1921,1926,1930,1936,1940,1944,1948,1953,1957,1961,1965,1970,1974,1978,1982,1986,1990],{"type":46,"tag":1471,"props":1903,"children":1904},{"style":1484},[1905],{"type":52,"value":1906},"    \"",{"type":46,"tag":1471,"props":1908,"children":1910},{"style":1909},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[1911],{"type":52,"value":1912},"collections",{"type":46,"tag":1471,"props":1914,"children":1915},{"style":1484},[1916],{"type":52,"value":1775},{"type":46,"tag":1471,"props":1918,"children":1919},{"style":1484},[1920],{"type":52,"value":985},{"type":46,"tag":1471,"props":1922,"children":1923},{"style":1484},[1924],{"type":52,"value":1925}," {",{"type":46,"tag":1471,"props":1927,"children":1928},{"style":1484},[1929],{"type":52,"value":1784},{"type":46,"tag":1471,"props":1931,"children":1933},{"style":1932},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1934],{"type":52,"value":1935},"primitives",{"type":46,"tag":1471,"props":1937,"children":1938},{"style":1484},[1939],{"type":52,"value":1775},{"type":46,"tag":1471,"props":1941,"children":1942},{"style":1484},[1943],{"type":52,"value":985},{"type":46,"tag":1471,"props":1945,"children":1946},{"style":1484},[1947],{"type":52,"value":1784},{"type":46,"tag":1471,"props":1949,"children":1950},{"style":1505},[1951],{"type":52,"value":1952},"id:...",{"type":46,"tag":1471,"props":1954,"children":1955},{"style":1484},[1956],{"type":52,"value":1775},{"type":46,"tag":1471,"props":1958,"children":1959},{"style":1484},[1960],{"type":52,"value":1517},{"type":46,"tag":1471,"props":1962,"children":1963},{"style":1484},[1964],{"type":52,"value":1784},{"type":46,"tag":1471,"props":1966,"children":1967},{"style":1932},[1968],{"type":52,"value":1969},"color",{"type":46,"tag":1471,"props":1971,"children":1972},{"style":1484},[1973],{"type":52,"value":1775},{"type":46,"tag":1471,"props":1975,"children":1976},{"style":1484},[1977],{"type":52,"value":985},{"type":46,"tag":1471,"props":1979,"children":1980},{"style":1484},[1981],{"type":52,"value":1784},{"type":46,"tag":1471,"props":1983,"children":1984},{"style":1505},[1985],{"type":52,"value":1952},{"type":46,"tag":1471,"props":1987,"children":1988},{"style":1484},[1989],{"type":52,"value":1775},{"type":46,"tag":1471,"props":1991,"children":1992},{"style":1484},[1993],{"type":52,"value":1994}," },\n",{"type":46,"tag":1471,"props":1996,"children":1998},{"class":1473,"line":1997},7,[1999,2003,2008,2012,2016,2020,2024,2029,2033,2037,2041,2045,2049,2053,2057,2062,2066,2070,2074,2078,2082],{"type":46,"tag":1471,"props":2000,"children":2001},{"style":1484},[2002],{"type":52,"value":1906},{"type":46,"tag":1471,"props":2004,"children":2005},{"style":1909},[2006],{"type":52,"value":2007},"variables",{"type":46,"tag":1471,"props":2009,"children":2010},{"style":1484},[2011],{"type":52,"value":1775},{"type":46,"tag":1471,"props":2013,"children":2014},{"style":1484},[2015],{"type":52,"value":985},{"type":46,"tag":1471,"props":2017,"children":2018},{"style":1484},[2019],{"type":52,"value":1925},{"type":46,"tag":1471,"props":2021,"children":2022},{"style":1484},[2023],{"type":52,"value":1784},{"type":46,"tag":1471,"props":2025,"children":2026},{"style":1932},[2027],{"type":52,"value":2028},"color\u002Fbg\u002Fprimary",{"type":46,"tag":1471,"props":2030,"children":2031},{"style":1484},[2032],{"type":52,"value":1775},{"type":46,"tag":1471,"props":2034,"children":2035},{"style":1484},[2036],{"type":52,"value":985},{"type":46,"tag":1471,"props":2038,"children":2039},{"style":1484},[2040],{"type":52,"value":1784},{"type":46,"tag":1471,"props":2042,"children":2043},{"style":1505},[2044],{"type":52,"value":1952},{"type":46,"tag":1471,"props":2046,"children":2047},{"style":1484},[2048],{"type":52,"value":1775},{"type":46,"tag":1471,"props":2050,"children":2051},{"style":1484},[2052],{"type":52,"value":1517},{"type":46,"tag":1471,"props":2054,"children":2055},{"style":1484},[2056],{"type":52,"value":1784},{"type":46,"tag":1471,"props":2058,"children":2059},{"style":1932},[2060],{"type":52,"value":2061},"spacing\u002Fsm",{"type":46,"tag":1471,"props":2063,"children":2064},{"style":1484},[2065],{"type":52,"value":1775},{"type":46,"tag":1471,"props":2067,"children":2068},{"style":1484},[2069],{"type":52,"value":985},{"type":46,"tag":1471,"props":2071,"children":2072},{"style":1484},[2073],{"type":52,"value":1784},{"type":46,"tag":1471,"props":2075,"children":2076},{"style":1505},[2077],{"type":52,"value":1952},{"type":46,"tag":1471,"props":2079,"children":2080},{"style":1484},[2081],{"type":52,"value":1775},{"type":46,"tag":1471,"props":2083,"children":2084},{"style":1484},[2085],{"type":52,"value":1994},{"type":46,"tag":1471,"props":2087,"children":2089},{"class":1473,"line":2088},8,[2090,2094,2099,2103,2107,2111,2115,2120,2124,2128,2132,2136,2140,2144,2148,2153,2157,2161,2165,2169,2173],{"type":46,"tag":1471,"props":2091,"children":2092},{"style":1484},[2093],{"type":52,"value":1906},{"type":46,"tag":1471,"props":2095,"children":2096},{"style":1909},[2097],{"type":52,"value":2098},"pages",{"type":46,"tag":1471,"props":2100,"children":2101},{"style":1484},[2102],{"type":52,"value":1775},{"type":46,"tag":1471,"props":2104,"children":2105},{"style":1484},[2106],{"type":52,"value":985},{"type":46,"tag":1471,"props":2108,"children":2109},{"style":1484},[2110],{"type":52,"value":1925},{"type":46,"tag":1471,"props":2112,"children":2113},{"style":1484},[2114],{"type":52,"value":1784},{"type":46,"tag":1471,"props":2116,"children":2117},{"style":1932},[2118],{"type":52,"value":2119},"Cover",{"type":46,"tag":1471,"props":2121,"children":2122},{"style":1484},[2123],{"type":52,"value":1775},{"type":46,"tag":1471,"props":2125,"children":2126},{"style":1484},[2127],{"type":52,"value":985},{"type":46,"tag":1471,"props":2129,"children":2130},{"style":1484},[2131],{"type":52,"value":1784},{"type":46,"tag":1471,"props":2133,"children":2134},{"style":1505},[2135],{"type":52,"value":1952},{"type":46,"tag":1471,"props":2137,"children":2138},{"style":1484},[2139],{"type":52,"value":1775},{"type":46,"tag":1471,"props":2141,"children":2142},{"style":1484},[2143],{"type":52,"value":1517},{"type":46,"tag":1471,"props":2145,"children":2146},{"style":1484},[2147],{"type":52,"value":1784},{"type":46,"tag":1471,"props":2149,"children":2150},{"style":1932},[2151],{"type":52,"value":2152},"Button",{"type":46,"tag":1471,"props":2154,"children":2155},{"style":1484},[2156],{"type":52,"value":1775},{"type":46,"tag":1471,"props":2158,"children":2159},{"style":1484},[2160],{"type":52,"value":985},{"type":46,"tag":1471,"props":2162,"children":2163},{"style":1484},[2164],{"type":52,"value":1784},{"type":46,"tag":1471,"props":2166,"children":2167},{"style":1505},[2168],{"type":52,"value":1952},{"type":46,"tag":1471,"props":2170,"children":2171},{"style":1484},[2172],{"type":52,"value":1775},{"type":46,"tag":1471,"props":2174,"children":2175},{"style":1484},[2176],{"type":52,"value":1994},{"type":46,"tag":1471,"props":2178,"children":2180},{"class":1473,"line":2179},9,[2181,2185,2190,2194,2198,2202,2206,2210,2214,2218,2222,2226,2230],{"type":46,"tag":1471,"props":2182,"children":2183},{"style":1484},[2184],{"type":52,"value":1906},{"type":46,"tag":1471,"props":2186,"children":2187},{"style":1909},[2188],{"type":52,"value":2189},"components",{"type":46,"tag":1471,"props":2191,"children":2192},{"style":1484},[2193],{"type":52,"value":1775},{"type":46,"tag":1471,"props":2195,"children":2196},{"style":1484},[2197],{"type":52,"value":985},{"type":46,"tag":1471,"props":2199,"children":2200},{"style":1484},[2201],{"type":52,"value":1925},{"type":46,"tag":1471,"props":2203,"children":2204},{"style":1484},[2205],{"type":52,"value":1784},{"type":46,"tag":1471,"props":2207,"children":2208},{"style":1932},[2209],{"type":52,"value":2152},{"type":46,"tag":1471,"props":2211,"children":2212},{"style":1484},[2213],{"type":52,"value":1775},{"type":46,"tag":1471,"props":2215,"children":2216},{"style":1484},[2217],{"type":52,"value":985},{"type":46,"tag":1471,"props":2219,"children":2220},{"style":1484},[2221],{"type":52,"value":1784},{"type":46,"tag":1471,"props":2223,"children":2224},{"style":1505},[2225],{"type":52,"value":1952},{"type":46,"tag":1471,"props":2227,"children":2228},{"style":1484},[2229],{"type":52,"value":1775},{"type":46,"tag":1471,"props":2231,"children":2232},{"style":1484},[2233],{"type":52,"value":2234}," }\n",{"type":46,"tag":1471,"props":2236,"children":2238},{"class":1473,"line":2237},10,[2239],{"type":46,"tag":1471,"props":2240,"children":2241},{"style":1484},[2242],{"type":52,"value":2243},"  },\n",{"type":46,"tag":1471,"props":2245,"children":2247},{"class":1473,"line":2246},11,[2248,2252,2257,2261,2265,2270,2274,2279,2283],{"type":46,"tag":1471,"props":2249,"children":2250},{"style":1484},[2251],{"type":52,"value":1764},{"type":46,"tag":1471,"props":2253,"children":2254},{"style":1767},[2255],{"type":52,"value":2256},"pendingValidations",{"type":46,"tag":1471,"props":2258,"children":2259},{"style":1484},[2260],{"type":52,"value":1775},{"type":46,"tag":1471,"props":2262,"children":2263},{"style":1484},[2264],{"type":52,"value":985},{"type":46,"tag":1471,"props":2266,"children":2267},{"style":1484},[2268],{"type":52,"value":2269}," [",{"type":46,"tag":1471,"props":2271,"children":2272},{"style":1484},[2273],{"type":52,"value":1775},{"type":46,"tag":1471,"props":2275,"children":2276},{"style":1505},[2277],{"type":52,"value":2278},"Button:screenshot",{"type":46,"tag":1471,"props":2280,"children":2281},{"style":1484},[2282],{"type":52,"value":1775},{"type":46,"tag":1471,"props":2284,"children":2285},{"style":1484},[2286],{"type":52,"value":2287},"],\n",{"type":46,"tag":1471,"props":2289,"children":2291},{"class":1473,"line":2290},12,[2292,2296,2301,2305,2309,2313,2317,2322,2326,2330,2334,2339,2343,2347,2351,2356,2360,2364,2368,2373,2377],{"type":46,"tag":1471,"props":2293,"children":2294},{"style":1484},[2295],{"type":52,"value":1764},{"type":46,"tag":1471,"props":2297,"children":2298},{"style":1767},[2299],{"type":52,"value":2300},"completedSteps",{"type":46,"tag":1471,"props":2302,"children":2303},{"style":1484},[2304],{"type":52,"value":1775},{"type":46,"tag":1471,"props":2306,"children":2307},{"style":1484},[2308],{"type":52,"value":985},{"type":46,"tag":1471,"props":2310,"children":2311},{"style":1484},[2312],{"type":52,"value":2269},{"type":46,"tag":1471,"props":2314,"children":2315},{"style":1484},[2316],{"type":52,"value":1775},{"type":46,"tag":1471,"props":2318,"children":2319},{"style":1505},[2320],{"type":52,"value":2321},"phase0",{"type":46,"tag":1471,"props":2323,"children":2324},{"style":1484},[2325],{"type":52,"value":1775},{"type":46,"tag":1471,"props":2327,"children":2328},{"style":1484},[2329],{"type":52,"value":1517},{"type":46,"tag":1471,"props":2331,"children":2332},{"style":1484},[2333],{"type":52,"value":1784},{"type":46,"tag":1471,"props":2335,"children":2336},{"style":1505},[2337],{"type":52,"value":2338},"phase1",{"type":46,"tag":1471,"props":2340,"children":2341},{"style":1484},[2342],{"type":52,"value":1775},{"type":46,"tag":1471,"props":2344,"children":2345},{"style":1484},[2346],{"type":52,"value":1517},{"type":46,"tag":1471,"props":2348,"children":2349},{"style":1484},[2350],{"type":52,"value":1784},{"type":46,"tag":1471,"props":2352,"children":2353},{"style":1505},[2354],{"type":52,"value":2355},"phase2",{"type":46,"tag":1471,"props":2357,"children":2358},{"style":1484},[2359],{"type":52,"value":1775},{"type":46,"tag":1471,"props":2361,"children":2362},{"style":1484},[2363],{"type":52,"value":1517},{"type":46,"tag":1471,"props":2365,"children":2366},{"style":1484},[2367],{"type":52,"value":1784},{"type":46,"tag":1471,"props":2369,"children":2370},{"style":1505},[2371],{"type":52,"value":2372},"component-avatar",{"type":46,"tag":1471,"props":2374,"children":2375},{"style":1484},[2376],{"type":52,"value":1775},{"type":46,"tag":1471,"props":2378,"children":2379},{"style":1484},[2380],{"type":52,"value":2381},"]\n",{"type":46,"tag":1471,"props":2383,"children":2385},{"class":1473,"line":2384},13,[2386],{"type":46,"tag":1471,"props":2387,"children":2388},{"style":1484},[2389],{"type":52,"value":2390},"}\n",{"type":46,"tag":55,"props":2392,"children":2393},{},[2394,2399],{"type":46,"tag":73,"props":2395,"children":2396},{},[2397],{"type":52,"value":2398},"Idempotency check",{"type":52,"value":2400}," before every create: query by name + state ledger ID. If exists, skip or update — never duplicate.",{"type":46,"tag":55,"props":2402,"children":2403},{},[2404,2409,2411,2416,2418,2424],{"type":46,"tag":73,"props":2405,"children":2406},{},[2407],{"type":52,"value":2408},"Resume protocol",{"type":52,"value":2410},": at session start or after context truncation, run a read-only ",{"type":46,"tag":61,"props":2412,"children":2414},{"className":2413},[],[2415],{"type":52,"value":66},{"type":52,"value":2417}," to scan all pages, components, variables, and styles by name to reconstruct the ",{"type":46,"tag":61,"props":2419,"children":2421},{"className":2420},[],[2422],{"type":52,"value":2423},"{key → id}",{"type":52,"value":2425}," map. Then re-read the state file from disk if available.",{"type":46,"tag":55,"props":2427,"children":2428},{},[2429,2434],{"type":46,"tag":73,"props":2430,"children":2431},{},[2432],{"type":52,"value":2433},"Continuation prompt",{"type":52,"value":2435}," (give this to the user when resuming in a new chat):",{"type":46,"tag":1286,"props":2437,"children":2438},{},[2439],{"type":46,"tag":55,"props":2440,"children":2441},{},[2442],{"type":52,"value":2443},"\"I'm continuing a design system build. Run ID: {RUN_ID}. Load the figma-generate-library skill and resume from the last completed step.\"",{"type":46,"tag":144,"props":2445,"children":2446},{},[],{"type":46,"tag":148,"props":2448,"children":2450},{"id":2449},"_5-library-discovery-and-search_design_system-reuse-decision-matrix",[2451],{"type":52,"value":2452},"5. Library Discovery and search_design_system — Reuse Decision Matrix",{"type":46,"tag":55,"props":2454,"children":2455},{},[2456],{"type":52,"value":2457},"Search FIRST in Phase 0, then again immediately before each component creation.",{"type":46,"tag":55,"props":2459,"children":2460},{},[2461,2472],{"type":46,"tag":73,"props":2462,"children":2463},{},[2464,2466],{"type":52,"value":2465},"Start with ",{"type":46,"tag":61,"props":2467,"children":2469},{"className":2468},[],[2470],{"type":52,"value":2471},"get_libraries",{"type":52,"value":2473}," to understand what libraries are available before searching blindly:",{"type":46,"tag":1460,"props":2475,"children":2478},{"className":2476,"code":2477,"language":52},[1723],"\u002F\u002F Discover all libraries accessible to the file\nget_libraries({ fileKey })\n\u002F\u002F Returns:\n\u002F\u002F   libraries_added_to_file: [{ name, libraryKey, description, source }, ...]\n\u002F\u002F   libraries_available_to_add: [{ name, libraryKey, description, source }, ...]\n\u002F\u002F   libraries_available_to_add_next_offset: number | null\n",[2479],{"type":46,"tag":61,"props":2480,"children":2481},{"__ignoreMap":1465},[2482],{"type":52,"value":2477},{"type":46,"tag":55,"props":2484,"children":2485},{},[2486,2488,2494,2496,2502],{"type":52,"value":2487},"Use the returned ",{"type":46,"tag":61,"props":2489,"children":2491},{"className":2490},[],[2492],{"type":52,"value":2493},"libraryKey",{"type":52,"value":2495}," values to scope searches to specific libraries via ",{"type":46,"tag":61,"props":2497,"children":2499},{"className":2498},[],[2500],{"type":52,"value":2501},"includeLibraryKeys",{"type":52,"value":2503},". This avoids noisy results when many libraries are available.",{"type":46,"tag":55,"props":2505,"children":2506},{},[2507,2509,2515,2517,2522,2524,2530],{"type":52,"value":2508},"If ",{"type":46,"tag":61,"props":2510,"children":2512},{"className":2511},[],[2513],{"type":52,"value":2514},"libraries_available_to_add_next_offset",{"type":52,"value":2516}," is non-null, more org libraries are available — call ",{"type":46,"tag":61,"props":2518,"children":2520},{"className":2519},[],[2521],{"type":52,"value":2471},{"type":52,"value":2523}," again with ",{"type":46,"tag":61,"props":2525,"children":2527},{"className":2526},[],[2528],{"type":52,"value":2529},"offset",{"type":52,"value":2531}," set to that value. Org libraries page in batches of 20; community UI kits only appear on the first page.",{"type":46,"tag":1460,"props":2533,"children":2536},{"className":2534,"code":2535,"language":52},[1723],"\u002F\u002F Search across all libraries (default)\nsearch_design_system({ query, fileKey, includeComponents: true, includeVariables: true, includeStyles: true })\n\n\u002F\u002F Search within a specific library only\nsearch_design_system({ query, fileKey, includeLibraryKeys: [\"lk-abc123...\"], includeComponents: true })\n",[2537],{"type":46,"tag":61,"props":2538,"children":2539},{"__ignoreMap":1465},[2540],{"type":52,"value":2535},{"type":46,"tag":55,"props":2542,"children":2543},{},[2544,2549],{"type":46,"tag":73,"props":2545,"children":2546},{},[2547],{"type":52,"value":2548},"Reuse if",{"type":52,"value":2550}," all of these are true:",{"type":46,"tag":165,"props":2552,"children":2553},{},[2554,2559,2564,2569],{"type":46,"tag":169,"props":2555,"children":2556},{},[2557],{"type":52,"value":2558},"Component property API matches your needs (same variant axes, compatible types)",{"type":46,"tag":169,"props":2560,"children":2561},{},[2562],{"type":52,"value":2563},"Token binding model is compatible (uses same or aliasable variables)",{"type":46,"tag":169,"props":2565,"children":2566},{},[2567],{"type":52,"value":2568},"Naming conventions match the target file",{"type":46,"tag":169,"props":2570,"children":2571},{},[2572],{"type":52,"value":2573},"Component is editable (not locked in a remote library you don't own)",{"type":46,"tag":55,"props":2575,"children":2576},{},[2577,2582],{"type":46,"tag":73,"props":2578,"children":2579},{},[2580],{"type":52,"value":2581},"Rebuild if",{"type":52,"value":2583}," any of these:",{"type":46,"tag":165,"props":2585,"children":2586},{},[2587,2592,2597],{"type":46,"tag":169,"props":2588,"children":2589},{},[2590],{"type":52,"value":2591},"API incompatibility (different property names, wrong variant model)",{"type":46,"tag":169,"props":2593,"children":2594},{},[2595],{"type":52,"value":2596},"Token model incompatible (hardcoded values, different variable schema)",{"type":46,"tag":169,"props":2598,"children":2599},{},[2600],{"type":52,"value":2601},"Ownership issue (can't modify the library)",{"type":46,"tag":55,"props":2603,"children":2604},{},[2605,2610],{"type":46,"tag":73,"props":2606,"children":2607},{},[2608],{"type":52,"value":2609},"Wrap if",{"type":52,"value":2611}," visual match but API incompatible:",{"type":46,"tag":165,"props":2613,"children":2614},{},[2615,2620],{"type":46,"tag":169,"props":2616,"children":2617},{},[2618],{"type":52,"value":2619},"Import the library component as a nested instance inside a new wrapper component",{"type":46,"tag":169,"props":2621,"children":2622},{},[2623],{"type":52,"value":2624},"Expose a clean API on the wrapper",{"type":46,"tag":55,"props":2626,"children":2627},{},[2628,2633,2635,2641],{"type":46,"tag":73,"props":2629,"children":2630},{},[2631],{"type":52,"value":2632},"Priority order",{"type":52,"value":2634},": local existing → subscribed library import → unsubscribed UI Kit library from ",{"type":46,"tag":61,"props":2636,"children":2638},{"className":2637},[],[2639],{"type":52,"value":2640},"libraries_available_to_add",{"type":52,"value":2642}," (icons especially) → create new.",{"type":46,"tag":144,"props":2644,"children":2645},{},[],{"type":46,"tag":148,"props":2647,"children":2649},{"id":2648},"_6-decision-forks",[2650],{"type":52,"value":2651},"6. Decision Forks",{"type":46,"tag":55,"props":2653,"children":2654},{},[2655],{"type":52,"value":2656},"Ask the user when paths fork — when two or more reasonable answers exist and no clear winner comes from the codebase, the Figma file, or the locked plan. Don't silently default. Present each option with its tradeoff and your recommendation; pick only after the user steers.",{"type":46,"tag":55,"props":2658,"children":2659},{},[2660,2665],{"type":46,"tag":73,"props":2661,"children":2662},{},[2663],{"type":52,"value":2664},"When NOT to ask:",{"type":52,"value":2666}," if exactly one path is clearly correct from the source of truth (code, Figma file, agreed plan), take it. This section is for genuine ambiguity, not for offloading every decision.",{"type":46,"tag":1335,"props":2668,"children":2669},{},[2670,2691],{"type":46,"tag":1339,"props":2671,"children":2672},{},[2673],{"type":46,"tag":1343,"props":2674,"children":2675},{},[2676,2681,2686],{"type":46,"tag":1347,"props":2677,"children":2678},{},[2679],{"type":52,"value":2680},"Fork situation",{"type":46,"tag":1347,"props":2682,"children":2683},{},[2684],{"type":52,"value":2685},"What to surface",{"type":46,"tag":1347,"props":2687,"children":2688},{},[2689],{"type":52,"value":2690},"Example ask",{"type":46,"tag":1363,"props":2692,"children":2693},{},[2694,2728,2761],{"type":46,"tag":1343,"props":2695,"children":2696},{},[2697,2702,2707],{"type":46,"tag":1370,"props":2698,"children":2699},{},[2700],{"type":52,"value":2701},"Code ≠ Figma on a token, component, or value",{"type":46,"tag":1370,"props":2703,"children":2704},{},[2705],{"type":52,"value":2706},"Both versions side by side, with provenance (file\u002Fline vs node)",{"type":46,"tag":1370,"props":2708,"children":2709},{},[2710,2712,2718,2720,2726],{"type":52,"value":2711},"\"Code says ",{"type":46,"tag":61,"props":2713,"children":2715},{"className":2714},[],[2716],{"type":52,"value":2717},"--color-bg-primary = #FFFFFF",{"type":52,"value":2719},", Figma has ",{"type":46,"tag":61,"props":2721,"children":2723},{"className":2722},[],[2724],{"type":52,"value":2725},"color\u002Fbg\u002Fprimary = #FAFAFA",{"type":52,"value":2727},". Which wins?\"",{"type":46,"tag":1343,"props":2729,"children":2730},{},[2731,2736,2741],{"type":46,"tag":1370,"props":2732,"children":2733},{},[2734],{"type":52,"value":2735},"Subscribed library has a close-but-not-exact match",{"type":46,"tag":1370,"props":2737,"children":2738},{},[2739],{"type":52,"value":2740},"Library component summary + gap list",{"type":46,"tag":1370,"props":2742,"children":2743},{},[2744,2746,2751,2753,2759],{"type":52,"value":2745},"\"Library has ",{"type":46,"tag":61,"props":2747,"children":2749},{"className":2748},[],[2750],{"type":52,"value":2152},{"type":52,"value":2752}," with no ",{"type":46,"tag":61,"props":2754,"children":2756},{"className":2755},[],[2757],{"type":52,"value":2758},"loading",{"type":52,"value":2760}," state. Reuse + wrap locally, or rebuild from scratch?\"",{"type":46,"tag":1343,"props":2762,"children":2763},{},[2764,2769,2774],{"type":46,"tag":1370,"props":2765,"children":2766},{},[2767],{"type":52,"value":2768},"Scope ambiguity at plan-lock (0d)",{"type":46,"tag":1370,"props":2770,"children":2771},{},[2772],{"type":52,"value":2773},"What's clearly in, what's clearly out, what's ambiguous",{"type":46,"tag":1370,"props":2775,"children":2776},{},[2777,2779,2784,2786,2792,2794,2800],{"type":52,"value":2778},"\"Spec lists ",{"type":46,"tag":61,"props":2780,"children":2782},{"className":2781},[],[2783],{"type":52,"value":2152},{"type":52,"value":2785}," and ",{"type":46,"tag":61,"props":2787,"children":2789},{"className":2788},[],[2790],{"type":52,"value":2791},"Input",{"type":52,"value":2793},"; ",{"type":46,"tag":61,"props":2795,"children":2797},{"className":2796},[],[2798],{"type":52,"value":2799},"Field",{"type":52,"value":2801}," is referenced but not defined. In or out of v1?\"",{"type":46,"tag":55,"props":2803,"children":2804},{},[2805,2810],{"type":46,"tag":73,"props":2806,"children":2807},{},[2808],{"type":52,"value":2809},"If the user rejects an option you already built on:",{"type":52,"value":2811}," fix before moving on. Never build on rejected work.",{"type":46,"tag":144,"props":2813,"children":2814},{},[],{"type":46,"tag":148,"props":2816,"children":2818},{"id":2817},"_7-naming-conventions",[2819],{"type":52,"value":2820},"7. Naming Conventions",{"type":46,"tag":55,"props":2822,"children":2823},{},[2824],{"type":52,"value":2825},"Match existing file conventions. If starting fresh:",{"type":46,"tag":55,"props":2827,"children":2828},{},[2829,2833],{"type":46,"tag":73,"props":2830,"children":2831},{},[2832],{"type":52,"value":1410},{"type":52,"value":2834}," (slash-separated):",{"type":46,"tag":1460,"props":2836,"children":2839},{"className":2837,"code":2838,"language":52},[1723],"color\u002Fbg\u002Fprimary     color\u002Ftext\u002Fsecondary    color\u002Fborder\u002Fdefault\nspacing\u002Fxs  spacing\u002Fsm  spacing\u002Fmd  spacing\u002Flg  spacing\u002Fxl  spacing\u002F2xl\nradius\u002Fnone  radius\u002Fsm  radius\u002Fmd  radius\u002Flg  radius\u002Ffull\ntypography\u002Fbody\u002Ffont-size    typography\u002Fheading\u002Fline-height\n",[2840],{"type":46,"tag":61,"props":2841,"children":2842},{"__ignoreMap":1465},[2843],{"type":52,"value":2838},{"type":46,"tag":55,"props":2845,"children":2846},{},[2847,2852,2854,2860,2862,2868,2869,2875,2876],{"type":46,"tag":73,"props":2848,"children":2849},{},[2850],{"type":52,"value":2851},"Primitives",{"type":52,"value":2853},": ",{"type":46,"tag":61,"props":2855,"children":2857},{"className":2856},[],[2858],{"type":52,"value":2859},"blue\u002F50",{"type":52,"value":2861}," → ",{"type":46,"tag":61,"props":2863,"children":2865},{"className":2864},[],[2866],{"type":52,"value":2867},"blue\u002F900",{"type":52,"value":338},{"type":46,"tag":61,"props":2870,"children":2872},{"className":2871},[],[2873],{"type":52,"value":2874},"gray\u002F50",{"type":52,"value":2861},{"type":46,"tag":61,"props":2877,"children":2879},{"className":2878},[],[2880],{"type":52,"value":2881},"gray\u002F900",{"type":46,"tag":55,"props":2883,"children":2884},{},[2885,2890,2891,2896,2897,2902,2903,2909,2910,2916,2917,2923,2924,2930,2931],{"type":46,"tag":73,"props":2886,"children":2887},{},[2888],{"type":52,"value":2889},"Component names",{"type":52,"value":2853},{"type":46,"tag":61,"props":2892,"children":2894},{"className":2893},[],[2895],{"type":52,"value":2152},{"type":52,"value":338},{"type":46,"tag":61,"props":2898,"children":2900},{"className":2899},[],[2901],{"type":52,"value":2791},{"type":52,"value":338},{"type":46,"tag":61,"props":2904,"children":2906},{"className":2905},[],[2907],{"type":52,"value":2908},"Card",{"type":52,"value":338},{"type":46,"tag":61,"props":2911,"children":2913},{"className":2912},[],[2914],{"type":52,"value":2915},"Avatar",{"type":52,"value":338},{"type":46,"tag":61,"props":2918,"children":2920},{"className":2919},[],[2921],{"type":52,"value":2922},"Badge",{"type":52,"value":338},{"type":46,"tag":61,"props":2925,"children":2927},{"className":2926},[],[2928],{"type":52,"value":2929},"Checkbox",{"type":52,"value":338},{"type":46,"tag":61,"props":2932,"children":2934},{"className":2933},[],[2935],{"type":52,"value":2936},"Toggle",{"type":46,"tag":55,"props":2938,"children":2939},{},[2940,2945,2946,2952,2954],{"type":46,"tag":73,"props":2941,"children":2942},{},[2943],{"type":52,"value":2944},"Variant names",{"type":52,"value":2853},{"type":46,"tag":61,"props":2947,"children":2949},{"className":2948},[],[2950],{"type":52,"value":2951},"Property=Value, Property=Value",{"type":52,"value":2953}," — e.g., ",{"type":46,"tag":61,"props":2955,"children":2957},{"className":2956},[],[2958],{"type":52,"value":2959},"Size=Medium, Style=Primary, State=Default",{"type":46,"tag":55,"props":2961,"children":2962},{},[2963,2968,2969,2975,2977],{"type":46,"tag":73,"props":2964,"children":2965},{},[2966],{"type":52,"value":2967},"Page separators",{"type":52,"value":2853},{"type":46,"tag":61,"props":2970,"children":2972},{"className":2971},[],[2973],{"type":52,"value":2974},"---",{"type":52,"value":2976}," (most common) or ",{"type":46,"tag":61,"props":2978,"children":2980},{"className":2979},[],[2981],{"type":52,"value":2982},"——— COMPONENTS ———",{"type":46,"tag":1286,"props":2984,"children":2985},{},[2986],{"type":46,"tag":55,"props":2987,"children":2988},{},[2989,2991],{"type":52,"value":2990},"Full naming reference: ",{"type":46,"tag":291,"props":2992,"children":2994},{"href":2993},"references\u002Fnaming-conventions.md",[2995],{"type":52,"value":2996},"naming-conventions.md",{"type":46,"tag":144,"props":2998,"children":2999},{},[],{"type":46,"tag":148,"props":3001,"children":3003},{"id":3002},"_8-token-architecture",[3004],{"type":52,"value":3005},"8. Token Architecture",{"type":46,"tag":1335,"props":3007,"children":3008},{},[3009,3025],{"type":46,"tag":1339,"props":3010,"children":3011},{},[3012],{"type":46,"tag":1343,"props":3013,"children":3014},{},[3015,3020],{"type":46,"tag":1347,"props":3016,"children":3017},{},[3018],{"type":52,"value":3019},"Complexity",{"type":46,"tag":1347,"props":3021,"children":3022},{},[3023],{"type":52,"value":3024},"Pattern",{"type":46,"tag":1363,"props":3026,"children":3027},{},[3028,3041,3059],{"type":46,"tag":1343,"props":3029,"children":3030},{},[3031,3036],{"type":46,"tag":1370,"props":3032,"children":3033},{},[3034],{"type":52,"value":3035},"\u003C 50 tokens",{"type":46,"tag":1370,"props":3037,"children":3038},{},[3039],{"type":52,"value":3040},"Single collection, 2 modes (Light\u002FDark)",{"type":46,"tag":1343,"props":3042,"children":3043},{},[3044,3049],{"type":46,"tag":1370,"props":3045,"children":3046},{},[3047],{"type":52,"value":3048},"50–200 tokens",{"type":46,"tag":1370,"props":3050,"children":3051},{},[3052,3057],{"type":46,"tag":73,"props":3053,"children":3054},{},[3055],{"type":52,"value":3056},"Standard",{"type":52,"value":3058},": Primitives (1 mode) + Color semantic (Light\u002FDark) + Spacing (1 mode) + Typography (1 mode)",{"type":46,"tag":1343,"props":3060,"children":3061},{},[3062,3067],{"type":46,"tag":1370,"props":3063,"children":3064},{},[3065],{"type":52,"value":3066},"200+ tokens",{"type":46,"tag":1370,"props":3068,"children":3069},{},[3070,3075,3077],{"type":46,"tag":73,"props":3071,"children":3072},{},[3073],{"type":52,"value":3074},"Advanced",{"type":52,"value":3076},": Multiple semantic collections, 4–8 modes (Light\u002FDark × Contrast × Brand). See M3 pattern in ",{"type":46,"tag":291,"props":3078,"children":3080},{"href":3079},"references\u002Ftoken-creation.md",[3081],{"type":52,"value":3082},"token-creation.md",{"type":46,"tag":55,"props":3084,"children":3085},{},[3086],{"type":52,"value":3087},"Standard pattern (recommended starting point):",{"type":46,"tag":1460,"props":3089,"children":3092},{"className":3090,"code":3091,"language":52},[1723],"Collection: \"Primitives\"    modes: [\"Value\"]\n  blue\u002F500 = #3B82F6, gray\u002F900 = #111827, ...\n\nCollection: \"Color\"         modes: [\"Light\", \"Dark\"]\n  color\u002Fbg\u002Fprimary → Light: alias Primitives\u002Fwhite, Dark: alias Primitives\u002Fgray-900\n  color\u002Ftext\u002Fprimary → Light: alias Primitives\u002Fgray-900, Dark: alias Primitives\u002Fwhite\n\nCollection: \"Spacing\"       modes: [\"Value\"]\n  spacing\u002Fxs = 4, spacing\u002Fsm = 8, spacing\u002Fmd = 16, ...\n",[3093],{"type":46,"tag":61,"props":3094,"children":3095},{"__ignoreMap":1465},[3096],{"type":52,"value":3091},{"type":46,"tag":144,"props":3098,"children":3099},{},[],{"type":46,"tag":148,"props":3101,"children":3103},{"id":3102},"_9-per-phase-anti-patterns",[3104],{"type":52,"value":3105},"9. Per-Phase Anti-Patterns",{"type":46,"tag":55,"props":3107,"children":3108},{},[3109],{"type":46,"tag":73,"props":3110,"children":3111},{},[3112],{"type":52,"value":3113},"Phase 0 anti-patterns:",{"type":46,"tag":165,"props":3115,"children":3116},{},[3117,3122,3127],{"type":46,"tag":169,"props":3118,"children":3119},{},[3120],{"type":52,"value":3121},"❌ Starting to create anything before scope is locked with user",{"type":46,"tag":169,"props":3123,"children":3124},{},[3125],{"type":52,"value":3126},"❌ Ignoring existing file conventions and imposing new ones",{"type":46,"tag":169,"props":3128,"children":3129},{},[3130,3132,3137],{"type":52,"value":3131},"❌ Skipping ",{"type":46,"tag":61,"props":3133,"children":3135},{"className":3134},[],[3136],{"type":52,"value":465},{"type":52,"value":3138}," before planning component creation",{"type":46,"tag":55,"props":3140,"children":3141},{},[3142],{"type":46,"tag":73,"props":3143,"children":3144},{},[3145],{"type":52,"value":3146},"Phase 1 anti-patterns:",{"type":46,"tag":165,"props":3148,"children":3149},{},[3150,3162,3167,3172],{"type":46,"tag":169,"props":3151,"children":3152},{},[3153,3155,3160],{"type":52,"value":3154},"❌ Using ",{"type":46,"tag":61,"props":3156,"children":3158},{"className":3157},[],[3159],{"type":52,"value":553},{"type":52,"value":3161}," on any variable",{"type":46,"tag":169,"props":3163,"children":3164},{},[3165],{"type":52,"value":3166},"❌ Duplicating raw values in semantic layer instead of aliasing",{"type":46,"tag":169,"props":3168,"children":3169},{},[3170],{"type":52,"value":3171},"❌ Not setting code syntax (breaks Dev Mode and round-tripping)",{"type":46,"tag":169,"props":3173,"children":3174},{},[3175],{"type":52,"value":3176},"❌ Creating component tokens before agreeing on token taxonomy",{"type":46,"tag":55,"props":3178,"children":3179},{},[3180],{"type":46,"tag":73,"props":3181,"children":3182},{},[3183],{"type":52,"value":3184},"Phase 2 anti-patterns:",{"type":46,"tag":165,"props":3186,"children":3187},{},[3188,3193],{"type":46,"tag":169,"props":3189,"children":3190},{},[3191],{"type":52,"value":3192},"❌ Skipping the cover page or foundations docs",{"type":46,"tag":169,"props":3194,"children":3195},{},[3196],{"type":52,"value":3197},"❌ Putting multiple unrelated components on one page",{"type":46,"tag":55,"props":3199,"children":3200},{},[3201],{"type":46,"tag":73,"props":3202,"children":3203},{},[3204],{"type":52,"value":3205},"Phase 3 anti-patterns:",{"type":46,"tag":165,"props":3207,"children":3208},{},[3209,3214,3219,3224,3229,3234],{"type":46,"tag":169,"props":3210,"children":3211},{},[3212],{"type":52,"value":3213},"❌ Creating components before foundations exist",{"type":46,"tag":169,"props":3215,"children":3216},{},[3217],{"type":52,"value":3218},"❌ Hardcoding any fill\u002Fstroke\u002Fspacing\u002Fradius value in a component",{"type":46,"tag":169,"props":3220,"children":3221},{},[3222],{"type":52,"value":3223},"❌ Creating a variant per icon (use INSTANCE_SWAP instead)",{"type":46,"tag":169,"props":3225,"children":3226},{},[3227],{"type":52,"value":3228},"❌ Not positioning variants after combineAsVariants (they all stack at 0,0)",{"type":46,"tag":169,"props":3230,"children":3231},{},[3232],{"type":52,"value":3233},"❌ Building variant matrix > 30 without splitting (variant explosion)",{"type":46,"tag":169,"props":3235,"children":3236},{},[3237],{"type":52,"value":3238},"❌ Importing remote components then immediately detaching them",{"type":46,"tag":55,"props":3240,"children":3241},{},[3242],{"type":46,"tag":73,"props":3243,"children":3244},{},[3245],{"type":52,"value":3246},"General anti-patterns:",{"type":46,"tag":165,"props":3248,"children":3249},{},[3250,3255,3260,3265,3270,3275,3280],{"type":46,"tag":169,"props":3251,"children":3252},{},[3253],{"type":52,"value":3254},"❌ Retrying a failed script without understanding the error first",{"type":46,"tag":169,"props":3256,"children":3257},{},[3258],{"type":52,"value":3259},"❌ Using name-prefix matching for cleanup (deletes user-owned nodes)",{"type":46,"tag":169,"props":3261,"children":3262},{},[3263],{"type":52,"value":3264},"❌ Building on unvalidated work from the previous step",{"type":46,"tag":169,"props":3266,"children":3267},{},[3268],{"type":52,"value":3269},"❌ Parallelizing use_figma calls (always sequential)",{"type":46,"tag":169,"props":3271,"children":3272},{},[3273],{"type":52,"value":3274},"❌ Guessing\u002Fhallucinating node IDs from memory (always read from state ledger)",{"type":46,"tag":169,"props":3276,"children":3277},{},[3278],{"type":52,"value":3279},"❌ Writing massive inline scripts instead of using the provided helper scripts",{"type":46,"tag":169,"props":3281,"children":3282},{},[3283],{"type":52,"value":3284},"❌ Starting Phase 3 because the user said \"build the button\" without completing Phases 0-2",{"type":46,"tag":144,"props":3286,"children":3287},{},[],{"type":46,"tag":148,"props":3289,"children":3291},{"id":3290},"_10-reference-docs",[3292],{"type":52,"value":3293},"10. Reference Docs",{"type":46,"tag":55,"props":3295,"children":3296},{},[3297],{"type":52,"value":3298},"Load on demand — each reference is authoritative for its phase:",{"type":46,"tag":55,"props":3300,"children":3301},{},[3302],{"type":52,"value":3303},"Use your file reading tool to read these docs when needed. Do not assume their contents from the filename.",{"type":46,"tag":1335,"props":3305,"children":3306},{},[3307,3333],{"type":46,"tag":1339,"props":3308,"children":3309},{},[3310],{"type":46,"tag":1343,"props":3311,"children":3312},{},[3313,3318,3323,3328],{"type":46,"tag":1347,"props":3314,"children":3315},{},[3316],{"type":52,"value":3317},"Doc",{"type":46,"tag":1347,"props":3319,"children":3320},{},[3321],{"type":52,"value":3322},"Phase",{"type":46,"tag":1347,"props":3324,"children":3325},{},[3326],{"type":52,"value":3327},"Required \u002F Optional",{"type":46,"tag":1347,"props":3329,"children":3330},{},[3331],{"type":52,"value":3332},"Load when",{"type":46,"tag":1363,"props":3334,"children":3335},{},[3336,3366,3393,3419,3448,3474,3499],{"type":46,"tag":1343,"props":3337,"children":3338},{},[3339,3348,3353,3361],{"type":46,"tag":1370,"props":3340,"children":3341},{},[3342],{"type":46,"tag":291,"props":3343,"children":3345},{"href":3344},"references\u002Fdiscovery-phase.md",[3346],{"type":52,"value":3347},"discovery-phase.md",{"type":46,"tag":1370,"props":3349,"children":3350},{},[3351],{"type":52,"value":3352},"0",{"type":46,"tag":1370,"props":3354,"children":3355},{},[3356],{"type":46,"tag":73,"props":3357,"children":3358},{},[3359],{"type":52,"value":3360},"Required",{"type":46,"tag":1370,"props":3362,"children":3363},{},[3364],{"type":52,"value":3365},"Starting any build — codebase analysis + Figma inspection",{"type":46,"tag":1343,"props":3367,"children":3368},{},[3369,3376,3381,3388],{"type":46,"tag":1370,"props":3370,"children":3371},{},[3372],{"type":46,"tag":291,"props":3373,"children":3374},{"href":3079},[3375],{"type":52,"value":3082},{"type":46,"tag":1370,"props":3377,"children":3378},{},[3379],{"type":52,"value":3380},"1",{"type":46,"tag":1370,"props":3382,"children":3383},{},[3384],{"type":46,"tag":73,"props":3385,"children":3386},{},[3387],{"type":52,"value":3360},{"type":46,"tag":1370,"props":3389,"children":3390},{},[3391],{"type":52,"value":3392},"Creating variables, collections, modes, styles",{"type":46,"tag":1343,"props":3394,"children":3395},{},[3396,3405,3410,3414],{"type":46,"tag":1370,"props":3397,"children":3398},{},[3399],{"type":46,"tag":291,"props":3400,"children":3402},{"href":3401},"references\u002Fdocumentation-creation.md",[3403],{"type":52,"value":3404},"documentation-creation.md",{"type":46,"tag":1370,"props":3406,"children":3407},{},[3408],{"type":52,"value":3409},"2",{"type":46,"tag":1370,"props":3411,"children":3412},{},[3413],{"type":52,"value":3360},{"type":46,"tag":1370,"props":3415,"children":3416},{},[3417],{"type":52,"value":3418},"Creating cover page, foundations docs, swatches",{"type":46,"tag":1343,"props":3420,"children":3421},{},[3422,3431,3436,3443],{"type":46,"tag":1370,"props":3423,"children":3424},{},[3425],{"type":46,"tag":291,"props":3426,"children":3428},{"href":3427},"references\u002Fcomponent-creation.md",[3429],{"type":52,"value":3430},"component-creation.md",{"type":46,"tag":1370,"props":3432,"children":3433},{},[3434],{"type":52,"value":3435},"3",{"type":46,"tag":1370,"props":3437,"children":3438},{},[3439],{"type":46,"tag":73,"props":3440,"children":3441},{},[3442],{"type":52,"value":3360},{"type":46,"tag":1370,"props":3444,"children":3445},{},[3446],{"type":52,"value":3447},"Creating any component or variant",{"type":46,"tag":1343,"props":3449,"children":3450},{},[3451,3460,3465,3469],{"type":46,"tag":1370,"props":3452,"children":3453},{},[3454],{"type":46,"tag":291,"props":3455,"children":3457},{"href":3456},"references\u002Fcode-connect-setup.md",[3458],{"type":52,"value":3459},"code-connect-setup.md",{"type":46,"tag":1370,"props":3461,"children":3462},{},[3463],{"type":52,"value":3464},"3–4",{"type":46,"tag":1370,"props":3466,"children":3467},{},[3468],{"type":52,"value":3360},{"type":46,"tag":1370,"props":3470,"children":3471},{},[3472],{"type":52,"value":3473},"Setting up Code Connect or variable code syntax",{"type":46,"tag":1343,"props":3475,"children":3476},{},[3477,3484,3489,3494],{"type":46,"tag":1370,"props":3478,"children":3479},{},[3480],{"type":46,"tag":291,"props":3481,"children":3482},{"href":2993},[3483],{"type":52,"value":2996},{"type":46,"tag":1370,"props":3485,"children":3486},{},[3487],{"type":52,"value":3488},"Any",{"type":46,"tag":1370,"props":3490,"children":3491},{},[3492],{"type":52,"value":3493},"Optional",{"type":46,"tag":1370,"props":3495,"children":3496},{},[3497],{"type":52,"value":3498},"Naming anything — variables, pages, variants, styles",{"type":46,"tag":1343,"props":3500,"children":3501},{},[3502,3511,3515,3523],{"type":46,"tag":1370,"props":3503,"children":3504},{},[3505],{"type":46,"tag":291,"props":3506,"children":3508},{"href":3507},"references\u002Ferror-recovery.md",[3509],{"type":52,"value":3510},"error-recovery.md",{"type":46,"tag":1370,"props":3512,"children":3513},{},[3514],{"type":52,"value":3488},{"type":46,"tag":1370,"props":3516,"children":3517},{},[3518],{"type":46,"tag":73,"props":3519,"children":3520},{},[3521],{"type":52,"value":3522},"Required on error",{"type":46,"tag":1370,"props":3524,"children":3525},{},[3526],{"type":52,"value":3527},"Script fails, multi-step workflow recovery, cleanup of abandoned workflow state",{"type":46,"tag":144,"props":3529,"children":3530},{},[],{"type":46,"tag":148,"props":3532,"children":3534},{"id":3533},"_11-scripts",[3535],{"type":52,"value":3536},"11. Scripts",{"type":46,"tag":55,"props":3538,"children":3539},{},[3540,3542,3547],{"type":52,"value":3541},"Reusable Plugin API helper functions. Embed in ",{"type":46,"tag":61,"props":3543,"children":3545},{"className":3544},[],[3546],{"type":52,"value":66},{"type":52,"value":3548}," calls:",{"type":46,"tag":1335,"props":3550,"children":3551},{},[3552,3568],{"type":46,"tag":1339,"props":3553,"children":3554},{},[3555],{"type":46,"tag":1343,"props":3556,"children":3557},{},[3558,3563],{"type":46,"tag":1347,"props":3559,"children":3560},{},[3561],{"type":52,"value":3562},"Script",{"type":46,"tag":1347,"props":3564,"children":3565},{},[3566],{"type":52,"value":3567},"Purpose",{"type":46,"tag":1363,"props":3569,"children":3570},{},[3571,3588,3611,3628,3645,3662,3679,3696,3713],{"type":46,"tag":1343,"props":3572,"children":3573},{},[3574,3583],{"type":46,"tag":1370,"props":3575,"children":3576},{},[3577],{"type":46,"tag":291,"props":3578,"children":3580},{"href":3579},"scripts\u002FinspectFileStructure.js",[3581],{"type":52,"value":3582},"inspectFileStructure.js",{"type":46,"tag":1370,"props":3584,"children":3585},{},[3586],{"type":52,"value":3587},"Discover all pages, components, variables, styles; returns full inventory",{"type":46,"tag":1343,"props":3589,"children":3590},{},[3591,3600],{"type":46,"tag":1370,"props":3592,"children":3593},{},[3594],{"type":46,"tag":291,"props":3595,"children":3597},{"href":3596},"scripts\u002FcreateVariableCollection.js",[3598],{"type":52,"value":3599},"createVariableCollection.js",{"type":46,"tag":1370,"props":3601,"children":3602},{},[3603,3605],{"type":52,"value":3604},"Create a named collection with modes; returns ",{"type":46,"tag":61,"props":3606,"children":3608},{"className":3607},[],[3609],{"type":52,"value":3610},"{collectionId, modeIds}",{"type":46,"tag":1343,"props":3612,"children":3613},{},[3614,3623],{"type":46,"tag":1370,"props":3615,"children":3616},{},[3617],{"type":46,"tag":291,"props":3618,"children":3620},{"href":3619},"scripts\u002FcreateSemanticTokens.js",[3621],{"type":52,"value":3622},"createSemanticTokens.js",{"type":46,"tag":1370,"props":3624,"children":3625},{},[3626],{"type":52,"value":3627},"Create aliased semantic variables from a token map",{"type":46,"tag":1343,"props":3629,"children":3630},{},[3631,3640],{"type":46,"tag":1370,"props":3632,"children":3633},{},[3634],{"type":46,"tag":291,"props":3635,"children":3637},{"href":3636},"scripts\u002FcreateComponentWithVariants.js",[3638],{"type":52,"value":3639},"createComponentWithVariants.js",{"type":46,"tag":1370,"props":3641,"children":3642},{},[3643],{"type":52,"value":3644},"Build a component set from a variant matrix; handles grid layout",{"type":46,"tag":1343,"props":3646,"children":3647},{},[3648,3657],{"type":46,"tag":1370,"props":3649,"children":3650},{},[3651],{"type":46,"tag":291,"props":3652,"children":3654},{"href":3653},"scripts\u002FbindVariablesToComponent.js",[3655],{"type":52,"value":3656},"bindVariablesToComponent.js",{"type":46,"tag":1370,"props":3658,"children":3659},{},[3660],{"type":52,"value":3661},"Bind design tokens to all component visual properties",{"type":46,"tag":1343,"props":3663,"children":3664},{},[3665,3674],{"type":46,"tag":1370,"props":3666,"children":3667},{},[3668],{"type":46,"tag":291,"props":3669,"children":3671},{"href":3670},"scripts\u002FcreateDocumentationPage.js",[3672],{"type":52,"value":3673},"createDocumentationPage.js",{"type":46,"tag":1370,"props":3675,"children":3676},{},[3677],{"type":52,"value":3678},"Create a page with title + description + section structure",{"type":46,"tag":1343,"props":3680,"children":3681},{},[3682,3691],{"type":46,"tag":1370,"props":3683,"children":3684},{},[3685],{"type":46,"tag":291,"props":3686,"children":3688},{"href":3687},"scripts\u002FvalidateCreation.js",[3689],{"type":52,"value":3690},"validateCreation.js",{"type":46,"tag":1370,"props":3692,"children":3693},{},[3694],{"type":52,"value":3695},"Verify created nodes match expected counts, names, structure",{"type":46,"tag":1343,"props":3697,"children":3698},{},[3699,3708],{"type":46,"tag":1370,"props":3700,"children":3701},{},[3702],{"type":46,"tag":291,"props":3703,"children":3705},{"href":3704},"scripts\u002FcleanupOrphans.js",[3706],{"type":52,"value":3707},"cleanupOrphans.js",{"type":46,"tag":1370,"props":3709,"children":3710},{},[3711],{"type":52,"value":3712},"Remove orphaned nodes by name convention or state ledger IDs",{"type":46,"tag":1343,"props":3714,"children":3715},{},[3716,3725],{"type":46,"tag":1370,"props":3717,"children":3718},{},[3719],{"type":46,"tag":291,"props":3720,"children":3722},{"href":3721},"scripts\u002FrehydrateState.js",[3723],{"type":52,"value":3724},"rehydrateState.js",{"type":46,"tag":1370,"props":3726,"children":3727},{},[3728,3730,3736],{"type":52,"value":3729},"Scan file for all pages, components, variables by name; returns full ",{"type":46,"tag":61,"props":3731,"children":3733},{"className":3732},[],[3734],{"type":52,"value":3735},"{key → nodeId}",{"type":52,"value":3737}," map for state reconstruction",{"type":46,"tag":3739,"props":3740,"children":3741},"style",{},[3742],{"type":52,"value":3743},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":3745,"total":3861},[3746,3763,3779,3791,3811,3829,3849],{"slug":3747,"name":3747,"fn":3748,"description":3749,"org":3750,"tags":3751,"stars":28,"repoUrl":29,"updatedAt":3762},"accessibility-and-inclusive-visualization","make data visualizations accessible","Make data visualizations accessible and inclusive. Use when the user needs chart or diagram accessibility guidance, text alternatives for complex visuals, color and contrast review, keyboard support, reduced-motion behavior for animation or parallax, or an accessibility QA workflow for exported figures, UML-like diagrams, and dashboards.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3752,3755,3758,3761],{"name":3753,"slug":3754,"type":15},"Accessibility","accessibility",{"name":3756,"slug":3757,"type":15},"Charts","charts",{"name":3759,"slug":3760,"type":15},"Data Visualization","data-visualization",{"name":26,"slug":27,"type":15},"2026-06-30T19:00:57.102",{"slug":3764,"name":3764,"fn":3765,"description":3766,"org":3767,"tags":3768,"stars":28,"repoUrl":29,"updatedAt":3778},"agent-browser","automate browser interactions for agents","Browser automation CLI for AI agents. Use when the user needs to interact with websites, verify dev server output, test web apps, navigate pages, fill forms, click buttons, take screenshots, extract data, or automate any browser task. Also triggers when a dev server starts so you can verify it visually.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3769,3772,3775],{"name":3770,"slug":3771,"type":15},"Agents","agents",{"name":3773,"slug":3774,"type":15},"Browser Automation","browser-automation",{"name":3776,"slug":3777,"type":15},"Testing","testing","2026-04-06T18:41:03.44016",{"slug":3780,"name":3780,"fn":3781,"description":3782,"org":3783,"tags":3784,"stars":28,"repoUrl":29,"updatedAt":3790},"agent-browser-verify","verify dev server output with automated browser","Automated browser verification for dev servers. Triggers when a dev server starts to run a visual gut-check with agent-browser — verifies the page loads, checks for console errors, validates key UI elements, and reports pass\u002Ffail before continuing.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3785,3786,3789],{"name":3773,"slug":3774,"type":15},{"name":3787,"slug":3788,"type":15},"Local Development","local-development",{"name":3776,"slug":3777,"type":15},"2026-04-06T18:41:17.526867",{"slug":3792,"name":3792,"fn":3793,"description":3794,"org":3795,"tags":3796,"stars":28,"repoUrl":29,"updatedAt":3810},"agents-sdk","build AI agents on Cloudflare Workers","Build AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, or chat applications. Covers Agent class, state management, callable RPC, Workflows integration, and React hooks. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3797,3798,3801,3804,3807],{"name":3770,"slug":3771,"type":15},{"name":3799,"slug":3800,"type":15},"Cloudflare Workers","cloudflare-workers",{"name":3802,"slug":3803,"type":15},"SDK","sdk",{"name":3805,"slug":3806,"type":15},"Serverless","serverless",{"name":3808,"slug":3809,"type":15},"WebSockets","websockets","2026-04-06T18:39:51.717063",{"slug":3812,"name":3812,"fn":3813,"description":3814,"org":3815,"tags":3816,"stars":28,"repoUrl":29,"updatedAt":3828},"ai-elements","build chat UIs with AI Elements","AI Elements component library guidance — pre-built React components for AI interfaces built on shadcn\u002Fui. Use when building chat UIs, message displays, tool call rendering, streaming responses, reasoning panels, or any AI-native interface with the AI SDK.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3817,3818,3821,3824,3825],{"name":20,"slug":21,"type":15},{"name":3819,"slug":3820,"type":15},"React","react",{"name":3822,"slug":3823,"type":15},"shadcn\u002Fui","shadcn-ui",{"name":17,"slug":18,"type":15},{"name":3826,"slug":3827,"type":15},"Vercel","vercel","2026-04-06T18:40:59.619419",{"slug":3830,"name":3830,"fn":3831,"description":3832,"org":3833,"tags":3834,"stars":28,"repoUrl":29,"updatedAt":3848},"ai-gateway","configure Vercel AI Gateway","Vercel AI Gateway expert guidance. Use when configuring model routing, provider failover, cost tracking, or managing multiple AI providers through a unified API.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3835,3838,3841,3844,3847],{"name":3836,"slug":3837,"type":15},"AI Infrastructure","ai-infrastructure",{"name":3839,"slug":3840,"type":15},"Cost Optimization","cost-optimization",{"name":3842,"slug":3843,"type":15},"LLM","llm",{"name":3845,"slug":3846,"type":15},"Performance","performance",{"name":3826,"slug":3827,"type":15},"2026-04-06T18:40:44.377464",{"slug":3850,"name":3850,"fn":3851,"description":3852,"org":3853,"tags":3854,"stars":28,"repoUrl":29,"updatedAt":3860},"ai-generation-persistence","implement persistence patterns for AI generations","AI generation persistence patterns — unique IDs, addressable URLs, database storage, and cost tracking for every LLM generation",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3855,3856,3859],{"name":3839,"slug":3840,"type":15},{"name":3857,"slug":3858,"type":15},"Database","database",{"name":3842,"slug":3843,"type":15},"2026-04-06T18:41:08.513425",600,{"items":3863,"total":4056},[3864,3885,3908,3925,3941,3958,3977,3987,3999,4013,4025,4040],{"slug":3865,"name":3865,"fn":3866,"description":3867,"org":3868,"tags":3869,"stars":3882,"repoUrl":3883,"updatedAt":3884},"prior-auth-packet-builder","build healthcare prior authorization packets","Build a concise prior authorization packet from local case files and payer policy docs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3870,3873,3876,3879],{"name":3871,"slug":3872,"type":15},"Documents","documents",{"name":3874,"slug":3875,"type":15},"Healthcare","healthcare",{"name":3877,"slug":3878,"type":15},"Insurance","insurance",{"name":3880,"slug":3881,"type":15},"Regulatory Compliance","regulatory-compliance",28169,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fopenai-agents-python","2026-04-16T05:11:39.180399",{"slug":3886,"name":3886,"fn":3887,"description":3888,"org":3889,"tags":3890,"stars":3905,"repoUrl":3906,"updatedAt":3907},"aspnet-core","build ASP.NET Core web applications","Build, review, refactor, or architect ASP.NET Core web applications using current official guidance for .NET web development. Use when working on Blazor Web Apps, Razor Pages, MVC, Minimal APIs, controller-based Web APIs, SignalR, gRPC, middleware, dependency injection, configuration, authentication, authorization, testing, performance, deployment, or ASP.NET Core upgrades.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3891,3894,3896,3899,3902],{"name":3892,"slug":3893,"type":15},".NET","dotnet",{"name":3895,"slug":3886,"type":15},"ASP.NET Core",{"name":3897,"slug":3898,"type":15},"Blazor","blazor",{"name":3900,"slug":3901,"type":15},"C#","csharp",{"name":3903,"slug":3904,"type":15},"Web Development","web-development",23787,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fskills","2026-04-12T05:07:02.819491",{"slug":3909,"name":3909,"fn":3910,"description":3911,"org":3912,"tags":3913,"stars":3905,"repoUrl":3906,"updatedAt":3924},"chatgpt-apps","build ChatGPT Apps SDK applications","Build, scaffold, refactor, and troubleshoot ChatGPT Apps SDK applications that combine an MCP server and widget UI. Use when Codex needs to design tools, register UI resources, wire the MCP Apps bridge or ChatGPT compatibility APIs, apply Apps SDK metadata or CSP or domain settings, or produce a docs-aligned project scaffold. Prefer a docs-first workflow by invoking the openai-docs skill or OpenAI developer docs MCP tools before generating code.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3914,3917,3920,3923],{"name":3915,"slug":3916,"type":15},"Apps SDK","apps-sdk",{"name":3918,"slug":3919,"type":15},"ChatGPT","chatgpt",{"name":3921,"slug":3922,"type":15},"MCP","mcp",{"name":9,"slug":8,"type":15},"2026-04-12T05:07:05.468097",{"slug":3926,"name":3926,"fn":3927,"description":3928,"org":3929,"tags":3930,"stars":3905,"repoUrl":3906,"updatedAt":3940},"cli-creator","build CLIs from API docs","Build a composable CLI for Codex from API docs, an OpenAPI spec, existing curl examples, an SDK, a web app, an admin tool, or a local script. Use when the user wants Codex to create a command-line tool that can run from any repo, expose composable read\u002Fwrite commands, return stable JSON, manage auth, and pair with a companion skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3931,3934,3937],{"name":3932,"slug":3933,"type":15},"API Development","api-development",{"name":3935,"slug":3936,"type":15},"CLI","cli",{"name":3938,"slug":3939,"type":15},"Codex","codex","2026-04-12T05:07:04.132762",{"slug":3942,"name":3942,"fn":3943,"description":3944,"org":3945,"tags":3946,"stars":3905,"repoUrl":3906,"updatedAt":3957},"cloudflare-deploy","deploy projects to Cloudflare","Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3947,3950,3953,3954],{"name":3948,"slug":3949,"type":15},"Cloudflare","cloudflare",{"name":3951,"slug":3952,"type":15},"Cloudflare Pages","cloudflare-pages",{"name":3799,"slug":3800,"type":15},{"name":3955,"slug":3956,"type":15},"Deployment","deployment","2026-04-12T05:07:14.275118",{"slug":3959,"name":3959,"fn":3960,"description":3961,"org":3962,"tags":3963,"stars":3905,"repoUrl":3906,"updatedAt":3976},"define-goal","define and set measurable project goals","Help the user define a concrete, measurable goal before starting work, especially when they ask to use the goal tool, create a goal, set an objective, clarify success criteria, or turn a fuzzy intention into a quantitative outcome. Use this skill for goal creation and goal refinement only; it does not manage durable snapshots, decision logs, or long-running execution artifacts.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3964,3967,3970,3973],{"name":3965,"slug":3966,"type":15},"Productivity","productivity",{"name":3968,"slug":3969,"type":15},"Project Management","project-management",{"name":3971,"slug":3972,"type":15},"Strategy","strategy",{"name":3974,"slug":3975,"type":15},"Task Management","task-management","2026-05-23T06:17:16.870838",{"slug":24,"name":24,"fn":3978,"description":3979,"org":3980,"tags":3981,"stars":3905,"repoUrl":3906,"updatedAt":3986},"translate Figma designs into code","Use the Figma MCP server to fetch design context, screenshots, variables, and assets from Figma, and to translate Figma nodes into production code. Trigger when a task involves Figma URLs, node IDs, design-to-code implementation, or Figma MCP setup and troubleshooting.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3982,3983,3984,3985],{"name":26,"slug":27,"type":15},{"name":23,"slug":24,"type":15},{"name":20,"slug":21,"type":15},{"name":3921,"slug":3922,"type":15},"2026-04-12T05:06:47.939943",{"slug":3988,"name":3988,"fn":3989,"description":3990,"org":3991,"tags":3992,"stars":3905,"repoUrl":3906,"updatedAt":3998},"figma-code-connect-components","connect Figma designs to code components","Connects Figma design components to code components using Code Connect mapping tools. Use when user says \"code connect\", \"connect this component to code\", \"map this component\", \"link component to code\", \"create code connect mapping\", or wants to establish mappings between Figma designs and code implementations. For canvas writes via `use_figma`, use `figma-use`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3993,3994,3995,3996,3997],{"name":26,"slug":27,"type":15},{"name":13,"slug":14,"type":15},{"name":23,"slug":24,"type":15},{"name":20,"slug":21,"type":15},{"name":17,"slug":18,"type":15},"2026-05-10T05:59:52.971881",{"slug":4000,"name":4000,"fn":4001,"description":4002,"org":4003,"tags":4004,"stars":3905,"repoUrl":3906,"updatedAt":4012},"figma-create-design-system-rules","generate design system rules from Figma","Generates custom design system rules for the user's codebase. Use when user says \"create design system rules\", \"generate rules for my project\", \"set up design rules\", \"customize design system guidelines\", or wants to establish project-specific conventions for Figma-to-code workflows. Requires Figma MCP server connection.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4005,4006,4007,4010,4011],{"name":26,"slug":27,"type":15},{"name":13,"slug":14,"type":15},{"name":4008,"slug":4009,"type":15},"Documentation","documentation",{"name":23,"slug":24,"type":15},{"name":20,"slug":21,"type":15},"2026-05-16T06:07:47.821474",{"slug":4014,"name":4014,"fn":4015,"description":4016,"org":4017,"tags":4018,"stars":3905,"repoUrl":3906,"updatedAt":4024},"figma-implement-design","translate Figma designs into application code","Translates Figma designs into production-ready application code with 1:1 visual fidelity. Use when implementing UI code from Figma files, when user mentions \"implement design\", \"generate code\", \"implement component\", provides Figma URLs, or asks to build components matching Figma specs. For Figma canvas writes via `use_figma`, use `figma-use`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4019,4020,4021,4022,4023],{"name":26,"slug":27,"type":15},{"name":23,"slug":24,"type":15},{"name":20,"slug":21,"type":15},{"name":17,"slug":18,"type":15},{"name":3903,"slug":3904,"type":15},"2026-05-16T06:07:40.583615",{"slug":4026,"name":4026,"fn":4027,"description":4028,"org":4029,"tags":4030,"stars":3905,"repoUrl":3906,"updatedAt":4039},"hatch-pet","create animated pets for Codex","Create, repair, validate, visually QA, and package Codex-compatible animated pets and pet spritesheets from character art, generated images, company or prospect brand cues, or visual references. Use when a user wants a lightweight-worker Codex pet workflow, a non-pixel custom pet style, a prospect or company mascot pet, or a full 8x9 animated pet atlas with transparent unused cells, QA contact sheets, and pet.json packaging. This skill composes the installed $imagegen system skill for visual generation and uses bundled scripts for deterministic spritesheet assembly.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4031,4034,4035,4038],{"name":4032,"slug":4033,"type":15},"Animation","animation",{"name":3938,"slug":3939,"type":15},{"name":4036,"slug":4037,"type":15},"Creative","creative",{"name":26,"slug":27,"type":15},"2026-05-02T05:31:48.48485",{"slug":4041,"name":4041,"fn":4042,"description":4043,"org":4044,"tags":4045,"stars":3905,"repoUrl":3906,"updatedAt":4055},"imagegen","generate and edit raster images","Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG\u002Fvector\u002Fcode-native assets, extending an established icon or logo system, or building the visual directly in HTML\u002FCSS\u002Fcanvas.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4046,4047,4048,4051,4054],{"name":4036,"slug":4037,"type":15},{"name":26,"slug":27,"type":15},{"name":4049,"slug":4050,"type":15},"Image Generation","image-generation",{"name":4052,"slug":4053,"type":15},"Images","images",{"name":9,"slug":8,"type":15},"2026-05-15T06:23:24.312127",675]