/kivo-creator:figma-ingestfrom kivo-creator
Reads a Figma frame URL into neutral section specs using the official Figma MCP server. Calls get_metadata, get_design_context, get_variable_defs, get_screenshot, and get_code_connect_map. Writes exact or inferred values only.
Ships in kivo-creator. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Read a Figma frame into neutral section specs. The MCP output is a reference to read, never code to copy: its arbitrary classes and literal values are not carried into the project.
figma.com/design/... (or /file/) link with a node-id, from /creator or on its own.html-ingest) and not for writing Code Connect mappings (code-connect).node-id (a page link without it is ambiguous: ask for the frame).get_metadata, get_design_context, get_variable_defs, get_screenshot and get_code_connect_map; the prefix depends on how the server was connected..roots-stack.json, and the kivo-creator plugin root (two levels above this skill's folder; in a project copy of the skills, the hidden .kivo-creator/ folder beside the skill folders).FIGMA_TOKEN (a Figma personal access token) exported in the shell. Without it, reference images cannot be fetched: the specs are still written, but the pixel diff has nothing to compare against.Check the server. If none of the tools above is available, stop and say: the official Figma MCP server is not connected in this session; add the remote server https://mcp.figma.com/mcp (HTTP transport) in the assistant's MCP settings, or enable the local server of the Figma desktop app, sign in, and start a new session. Do not fall back to screenshots, the REST API or guessing.
Metadata. Call get_metadata with the file key and node id from the URL (node-id=1-2 means 1:2). Save the response text to .creator/figma-metadata.xml, then:
node <kivo-creator>/scripts/figma-sections.mjs --url="<figma URL>" --metadata=.creator/figma-metadata.xml --project=.
It creates .creator/<run>/ with figma-sections.json: one entry per top-level frame (id, nodeId, kind from the layer name, chrome, geometry).
Variables. Call get_variable_defs for the frame; save the result as .creator/<run>/figma-variables.json.
Code Connect. Call get_code_connect_map for the frame; save it as .creator/<run>/figma-code-connect.json. When a section's node is mapped to a block in the catalog (node <kivo-creator>/scripts/match.mjs --catalog --project=.), set "codeConnect": { "block": "<block name>", "component": "<component name>" } in that section's spec.
One spec per section. For each non-chrome entry, call get_design_context with its nodeId (and get_screenshot when you need to look at it), then write .creator/<run>/specs/<id>.json following schemas/section-spec.schema.json:
source: { "kind": "figma", "ref": "<nodeId>", "url": "<figma URL>" }; kind from figma-sections.json, corrected when the content clearly says otherwise (add a note).slots: literal texts, image and link targets that appear in the design context are exact; a repeated card becomes one list slot named items. Leave out anything that is not in the design.layout: columns, alignment, media position and repeat count from the geometry and auto layout; mark it in notes as inferred.tokens: colours, font family, size, weight, line height and padding per role (section, heading, text, link, button), exact when the design context or a variable gives the value. Write the value as CSS (#0a84ff, 56px); never copy a Tailwind class from the reference code.refs: leave {}; step 7 fills it.
Chrome entries get a spec with "chrome": true, empty slots and tokens, layout { "columns": 1, "align": "left", "media": "none", "repeat": 0 } and the note "chrome: not read". They are never matched.Validate: node <kivo-creator>/scripts/validate-spec.mjs .creator/<run>/specs.
References. The MCP screenshot reaches you, not the disk, so pixel references come from the Figma REST API and need FIGMA_TOKEN.
node <kivo-creator>/scripts/figma-ref.mjs --run=.creator/<run> saves one PNG per section at the frame's width and records it in each spec's refs.FIGMA_TOKEN is not set): say plainly that reference images cannot be fetched, so the pixel diff will report "no reference" for every section and only the style check and lint will run. Ask the person to export a token in their shell if they want the diff.Hand over to section-matching.
validate-spec.mjs prints ok for every spec.px-[…] value or var(--…) fallback from the reference code appears in any spec.figma-ref.mjs did not run.| Symptom | Cause | Fix |
|---|---|---|
| Figma tools missing | Server not connected, or running inside a subagent | Stop with the connection steps; run in the main session |
get_metadata returns one huge frame | The link points at a page or a wrapper | Ask for the frame link, or pass the inner frame's node id |
| Design context truncated | Very large section | Call it for the children of that section and merge the slots |
FIGMA_TOKEN is not set | No token in the environment | Reference images cannot be fetched; ask the person to export one, or accept a report without pixel diff |
Figma images API answered 403 | Token expired or without access to the file | Ask for a token with read access to that file; the specs stay valid |
| Values only in the screenshot | Raster image or flattened text | Leave them out; note that the source is a raster |
Ask when the frame has variants for several breakpoints (which one is canonical), when text is rasterised, or when a component mapped by Code Connect points at code that does not exist in the project.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub hekivo/kivo-wise --plugin kivo-creator7 skills in this plugin
/block-scaffolding-from-designUse when an approved kivo-creator match plan must be emitted - writing the page as block markup, scaffolding the blocks that were missing in the project's conventions (run the project's generator first, then review and copy the prepared files), turning unmatched design values into token proposals and importing media. For deciding which block a section uses use section-matching; for checking the rendered result use visual-fidelity./code-connectUse when Figma components should point at the project's blocks and Blade components through Code Connect - reading the existing map, proposing new mappings from the block catalog, flagging components with no code counterpart, and sending mappings with send_code_connect_mappings only after the person approves the exact list. For reading a frame into specs use figma-ingest./creatorUse when the person runs the creator command to turn a Figma frame, an HTML file or a URL into a WordPress page on the Roots stack - routes the source, runs the ingest, builds and checks the match plan, and stops for approval before anything is emitted. Resumes a run with --run=.creator/<run>. For one step on its own use html-ingest, figma-ingest, section-matching, block-scaffolding-from-design or visual-fidelity./html-ingestUse when an HTML file, a URL or a published page has to become kivo-creator section specs - rendering it at 390 and 1440 px with the project's own Playwright, splitting it into sections, recording text slots, links, media, computed styles and one reference screenshot per section and width under .creator/<run>/. For a Figma source use figma-ingest; for choosing blocks use section-matching./section-matchingUse when kivo-creator section specs in .creator/<run>/specs must be mapped to the project's existing blocks before anything is generated - building the match plan, applying the compatibility filter, judging the remaining candidates with the written rubric (including an explicit none), asking the person below the confidence threshold and checking the plan. For ingesting a source use html-ingest or figma-ingest; for generating missing blocks use block-scaffolding-from-design./visual-fidelityUse when a page emitted by kivo-creator must be proved against its design - rendering the block markup on the local site, screenshotting every section at 390 and 1440 px with the project's Playwright, pixel diff against the references (2 percent per section by default), style check of exact values, lint for arbitrary values and inline styles, and up to three fix rounds before handing the report to the person. For emitting the page use block-scaffolding-from-design.Other plugins' skills for the same job