/pica-ux-engineer:scaffolding-the-demo [the chosen direction, the screen inventory, the copy]from pica-ux-engineer
Builds interactive demos in a specific order: design tokens as structured data, then a component library, then every screen at every viewport and state. Includes mock data generation from the entity model and accessibility gates.
Ships in pica-ux-engineer. 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.
On MFO, design was 132 hours of 1416 because the token set and the components already existed as structured data when the Figma work began. That is a property of build order, not of talent.
1. Tokens first, as data. Before any component. They are the thing Figma imports later and the thing every check measures against.
2. The component library before any screen. Every variant and every state — including focus, disabled, loading and error. A component completed later is a component retrofitted into twenty screens.
3. Take the copy from the content designer, not from your head. Build with real strings from the first screen. Placeholder text approves layouts that break on the real thing, and the 40-character label should be found here rather than in production.
4. Generate mock data from the entity model. Never invent it. Invented data produces shapes the specification does not support, and a demo that shows an impossible state is a demo that will be asked for.
5. Then screens, inventory order, every viewport, every state. Not "the important ones first" — the inventory is the commitment and the order is arbitrary.
6. Wire the flows from the UX designer's user flows, including the failure branches. A demo that only walks the happy path demonstrates the third of the product that was never in doubt.
7. Run the gates against the running build, continuously. Contrast, target size, state coverage, viewport parity. They are cheap while you are in the file and expensive afterwards.
Tokens exist as JSON before any component. No screen contains a hardcoded colour. Every state in the model is reachable by URL. The whole story clicks end to end, including what happens when the integration is down.
Screens before components. Twenty screens to update when the button changes.
Lorem ipsum. Approves a layout that does not exist.
Invented mock data. Shows states the domain model forbids.
Gates at the end. Then a contrast failure is a re-theme rather than a token edit.
Write .pica/runners.json when the demo first serves, not at the end. It is how the project tells
the runner the things only the project knows — where the app runs, which selector is its dialog,
which part of the page is its own review chrome — and without it those checks abstain.
{
"serve": { "cmd": "npm run dev", "cwd": "demo", "url": "http://localhost:5173/" },
"build": { "cmd": "npm run build", "cwd": "demo", "out": "demo/dist" },
"substitutions": {
"<servedDemo>": "http://localhost:5173/",
"<everyScreenAndState>": "demo/scripts/screens.mjs",
"<knownRoute>": "scr=WL-02&state=success",
"<harnessChrome>": ".devbar",
"<targetFloor>": "48",
"<frame>": ".frame", "<primary>": "main", "<dialog>": "[role=dialog]",
"<opener>": "[data-confirm-open]", "<baselines>": "demo/.baselines", "<srcDir>": "demo/src"
}
}
Why this and not the project's own npm scripts. One finished project wired every one of those
checks into its package.json with a hardcoded localhost URL and a hardcoded path into the plugin
cache, and ran them itself — 94 routes, 376 renders, exit 0. All of it real, all of it passing, and
the closing report said twenty-one of twenty-nine design checks abstained, because the runner had no
way to fill <servedDemo> or guess a selector. Evidence that exists only in a side channel is
evidence nobody will find.
serve.url fills <servedDemo> and the build block fills <buildCmd>, <buildCwd> and
<buildOut>, so they need not be repeated under substitutions. Where the project genuinely has
none of something, no dialog, say, write it as null: "<dialog>": null. The runner leaves that
option off the check's command line and prints the decision. A placeholder left out is not the
same thing: that check does not run, and the run fails until somebody says.
<targetFloor> comes from the audience profile, not from a default. <harnessChrome> is whatever
the demo's own screen and state pickers live in — without it, target-size-check measures the review
toolbar and reports a dozen defects in chrome the client never sees.
A demo's check chain is joined with &&, so anything that exits 0 unconditionally is a gap with a
green tick beside it. One project's target-sizes.mjs printed the dimensions of seven hand-picked
selectors and returned success every time it ran.
Every script the chain calls either asserts and exits non-zero, or prints that it SKIPPED and says that a skip is not a pass. Prefer pica's own checks over a local script: a local one drifts, and nothing mutates it.
node <pica>/roles/ux-engineer/scripts/capture-html-reference.mjs --dir html --out .audit
node <pica>/core/scripts/pica-verify.mjs .pica/state.json --phase design --evidence
returns zero findings — and a human has opened every screen at every viewport and clicked the main flow, which no check can do.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
demo-build, design-tokens, component-library, mock-data, accessibility
npx claudepluginhub vqdungwork/pica --plugin pica-ux-engineer4 skills in this plugin
/generating-mock-dataGenerate the demo's data from the entity model rather than inventing it — so the demo cannot show a state the specification forbids./handing-over-as-an-artifactPublish the built demo as a Claude Artifact so the client's corrections arrive as comment threads attached to the screen they are about./reviewing-your-own-workCritique what you built, three to five times, a different question each pass, and write down what each pass found — before anyone else sees it.Other plugins' skills for the same job