/kivo-creator:block-scaffolding-from-designfrom kivo-creator
Scaffolds blocks from an approved design match plan: writes block markup, generates missing blocks using the project's generator, proposes design tokens for unmatched values, and imports media.
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.
Emit an approved plan. Existing blocks are filled; missing blocks are generated with the project's own generator and then completed with files prepared from the spec.
Runner placeholders ({{runner.wp}}, {{runner.acorn}}, {{runner.cache}}) come from the kivo-wise session context. Never run wp, composer, php or npm on the host.
match-plan.md.section-matching) or judging the result (visual-fidelity)..creator/<run>/match-plan.json that passes match.mjs --check..kivo-creator/ folder beside the skill folders).node <kivo-creator>/scripts/emit.mjs --run=.creator/<run> --project=.. It writes page.html (block markup), scaffold/<project paths> and emitted.json (files, commands, media, gaps, proposals, notes, blockType, and the section selector verify uses). New blocks follow the project's existing block type, not the profile: ACF Composer classes when the project's blocks are ACF, block.json when they are native (blockType: type, source = override | count | asked, counts). Existing blocks keep their own markup, so one page can mix both. If emit refuses with New blocks need a block type, go back to /creator: the person chooses once and the answer is recorded with block-type.mjs --set= or passed as --blocks=. Nothing in the project changes yet. When the project's existing blocks do not print data-block, add --selector=<css> for the wrapper they do print.emitted.proposals (value, role, suggested token). Add a token to the @theme block only when the person agrees, then run step 1 again so the views use the new utility. Never put a literal value or an arbitrary class (text-[13px]) in markup to avoid this step.emitted.commands (for example {{runner.acorn}} acf:block Stats --no-interaction);scaffold/<path> as a diff;@textarea(...) when emit finds Blade::directive('textarea', …) in the project's own code; otherwise the view uses {!! nl2br(e(...)) !!} and emitted.notes says so. Keep that fallback (it is not the forbidden nl2br(esc_html())), or, if the directive comes from a Composer package emit cannot see, switch back to @textarea(...). Any other directive the view uses must exist in the project; if one does not, ask before changing the escaping;blockType.type is native, on any profile): emitted.commands is empty. If {{runner.acorn}} list shows a make:block generator, run it first and compare; otherwise copy block.json, the view and the CSS notes, then follow emitted.notes for the registration and the editor script, matching how the existing blocks do it.{{runner.acorn}} acf:cache (or {{runner.cache}}) so ACF Composer picks up the new fields.emitted.media entry, import the file ({{runner.wp}} media import <src> --porcelain) and put the attachment id in place of null for that field in page.html. Ask before importing remote files you do not recognise.visual-fidelity.git status shows only the new block files, the @theme lines the person approved and nothing else.page.html has no null image ids left, or the report lists each one.| Symptom | Cause | Fix |
|---|---|---|
the match plan is not approved yet | Open, low-confidence or invalid decisions | Go back to section-matching |
New blocks need a block type | Mixed project or no blocks yet, and no creator.blocks / --blocks | Ask the person once (recommend blockType.recommended when there are no blocks); record it with block-type.mjs --set= or pass --blocks= |
| Generator command not found | The project has no ACF Composer generator or uses its own stubs | Run {{runner.acorn}} list; use the project's generator; if there is none, ask before creating files by hand |
| New fields missing in the editor | ACF Composer manifest not rebuilt | {{runner.acorn}} acf:cache (or {{runner.cache}}) |
| A view uses a directive the project lacks | The directive is registered somewhere emit does not scan (a Composer package) or not at all | For @textarea, the fallback {!! nl2br(e(...)) !!} is safe; for anything else ask, do not swap in a different escaping on your own |
| A proposal keeps coming back | The token was added under another name or namespace | Use the suggested namespace (--color-*, --text-*) so the mapper finds it |
Ask before adding any @theme token, before importing media from an unknown host, and whenever a generated block would duplicate an existing one with a different style.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub hekivo/kivo-wise --plugin kivo-creator7 skills in this plugin
/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./figma-ingestUse when a Figma frame URL has to become kivo-creator section specs - reading the frame through the official Figma MCP server in the main session (get_metadata for the tree, get_design_context per section, get_variable_defs for tokens, get_screenshot to look, get_code_connect_map for mapped components), writing exact or inferred values only, and stopping with connection steps when the server is missing. For HTML sources use html-ingest; for creating Code Connect mappings use code-connect./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