[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78D08KVFBDPBK6FC49W41TK":3,"skill-same:01M78D08KVFBDPBK6FC49W41TK":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":35,"ownerHtmlUrl":36,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":37,"install":38,"resources":51},"01M78D08KVFBDPBK6FC49W41TK","design-build",null,"Use when a finished visual design has to be re-expressed in this project's stack pixel-accurately — the user says \"implement this design\", \"here's a design handoff\", \"make this screen match the mockup\", \"design-implement\", pastes a design-tool handoff prompt, or attaches an exported design HTML\u002Fzip. Runs a measured workflow: token inventory from a real headless render, reuse-vs-create recon against the project's own components, an approval gate before any code, and a pixel diff against the design as the completion criterion. NOT for ordinary styling requests (tweak a padding, change a colour, fix a hover state), NOT for building UI from a written description with no design artefact, and NOT for visual QA of an already-implemented screen.","atretyak1985\u002Fswarmery","atretyak1985","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1436737?v=4","01M78CTSX57YH0EYY9YGH0TWKX","Andrii Tretiak","01M78CTSXRPJPYQ7GNPMP45TYX",8,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Fplugins\u002Fdesign-pack\u002Fskills\u002Fdesign-build\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: design-build\ndescription: \"Use when a finished visual design has to be re-expressed in this project's stack pixel-accurately — the user says \\\"implement this design\\\", \\\"here's a design handoff\\\", \\\"make this screen match the mockup\\\", \\\"design-implement\\\", pastes a design-tool handoff prompt, or attaches an exported design HTML\u002Fzip. Runs a measured workflow: token inventory from a real headless render, reuse-vs-create recon against the project's own components, an approval gate before any code, and a pixel diff against the design as the completion criterion. NOT for ordinary styling requests (tweak a padding, change a colour, fix a hover state), NOT for building UI from a written description with no design artefact, and NOT for visual QA of an already-implemented screen.\"\nversion: \"0.1.0\"\nowner: \"swarmery-core\"\ndocs:\n  status: reviewed\n  source_sha: 8192d35c7790\n  updated: 2026-08-06\n---\n\n# Purpose\n\nSix phases that carry a screen from \"here is a design\" to \"here is a measured diff\". Each\nphase has exactly one output, and the next phase does not start until that output exists.\n\nTwo rules hold the whole workflow up: the token inventory comes from a **real headless\nrender**, never from reading the design's CSS by eye; and completion is **a number plus an\nimage**, never an impression.\n\nThis document is the procedure only. Input shapes and what each one can promise live in\n`design-acquire`; the measurement procedure lives in `design-verify`; the precision rules\nlive in `references\u002Ffidelity-checklist.md` and the named failure modes in\n`references\u002Fanti-patterns.md`. Nothing here repeats them.\n\n# Step 0 — Prerequisites\n\n**0.1 — Read `${CLAUDE_PROJECT_DIR}\u002F.claude\u002Fproject.json`, the `design` block.**\n\nRequired: `design.tokensFile`, `design.componentsRoot`, `design.routesRoot`, `design.devUrl`,\n`design.verify` (both `verify.lint` and `verify.typecheck`).\n\nIf the block is missing, or any required field is empty, **stop loudly**. Name the specific\nfields that are not filled in — not \"the config is incomplete\", but the list of them — and\nsay where the form is: the project dashboard → plugins → design-pack. Do not guess a path,\ndo not infer a components root from a directory listing, do not run on a partial block.\n\nOptional fields and their defaults:\n\n| Field | Default | Read by |\n|---|---|---|\n| `design.fontLoader` | — | Phase 3 font check (`next-font` \\| `link-tag` \\| `self-hosted` \\| `none`) |\n| `design.devCommand` | — | Phase 6, when `design.devUrl` does not answer |\n| `design.diff.threshold` | `0.5` | Phase 6 verdict |\n| `design.diff.pixelTolerance` | `0.1` | Phase 6 per-pixel comparison |\n| `design.budget.maxIterations` | `4` | Phase 5 correction loop cap |\n| `design.budget.maxFiles` | `12` | Phase 4 sanity cap on the approved file list |\n\n**0.2 — Read the project's `CLAUDE.md` in full, before any edit.** In a large repository that\nfile carries the decision history that changes how a screen is built — which layer owns\nstyling, which component library is already committed to, what is deliberately not abstracted.\nSkipping it produces work that is locally correct and architecturally wrong.\n\n**0.3 — Resolve `SCRIPTS_DIR` once, then confirm the render runtime:**\n\n```bash\n# Installed as part of the pack, CLAUDE_PLUGIN_ROOT is set; in a standalone\n# .skill bundle it is not, and the scripts sit beside this file.\nSCRIPTS_DIR=\"${CLAUDE_PLUGIN_ROOT:+${CLAUDE_PLUGIN_ROOT}\u002Fscripts}\"\nSCRIPTS_DIR=\"${SCRIPTS_DIR:-\u003Cthis skill's directory>\u002Fscripts}\"\nnode \"$SCRIPTS_DIR\u002Fensure-runtime.mjs\" --check\n```\n\nEvery later script call in this workflow goes through `$SCRIPTS_DIR`. That one\nvariable is the only difference between the pack and the bundle.\n\nExit `3` means the runtime is not prepared; the fix is to run `ensure-runtime.mjs` once while\nonline. Phases 2 and 6 both depend on it, so this is cheaper to learn now than mid-diff.\n\n# Phase 1 — acquire\n\nDelegate to `design-acquire`. It resolves whichever of the four input shapes arrived and\nreturns either a local path to a self-contained HTML export, or an explicitly recorded\ndegraded mode (for example `degraded: screenshots`).\n\n**Output:** a design path, plus the mode. A degraded mode is carried forward into the Phase 4\nplan and into the final report — it is never quietly forgotten.\n\n# Phase 2 — ground truth\n\n```bash\nnode \"$SCRIPTS_DIR\u002Fextract-computed-styles.mjs\" \\\n  --input \u003Cdesign path> --out .design-verify\u002Ftokens\u002F\u003Cslug>\n```\n\nViewport: use the one the operator gave. If they gave none, run once without `--viewport`,\nread `authoredBreakpoints` from the resulting `tokens.json`, and re-run pinned to the design's\nown authoring breakpoint (`--viewport 1440x900` for a desktop-authored screen).\n\n**Output:** `tokens.json` + `tokens.md`, plus a short chat summary — `viewport`,\n`elementsScanned`, the counts in `colors` \u002F `typography` \u002F `spacing` \u002F `radii` \u002F `borders` \u002F\n`shadows` \u002F `layout`, how many `spacing` entries are `onFourPxGrid`, and the full\n`fontFamiliesRequired` list.\n\n**Forbidden:** assembling the inventory by reading the design's CSS by eye. What renders and\nwhat the stylesheet says diverge through cascade, inheritance and unit resolution; an\neyeballed inventory carries that divergence into every later phase, where it is unfindable.\n\nExit codes: `0` ok, `1` bad arguments or unreadable input, `2` render failure, `3` runtime not\nprepared (Step 0.3).\n\n# Phase 3 — recon\n\nCompare the inventory against `design.tokensFile` and `design.componentsRoot`. Every entry\nnames the file it was resolved against — a bucket without file paths is a guess.\n\nTokens:\n- **`exists`** — the value is already a token: use that token's name, do not add a second one.\n- **`new`** — the value is not in the token layer: candidate for a new token or an arbitrary\n  value (`references\u002Ffidelity-checklist.md`, rules 1–2, decides which).\n\nComponents:\n- **`reuse`** — an existing component fits as it is.\n- **`variant`** — an existing component fits with a new variant\u002Fmodifier.\n- **`build`** — nothing comparable exists.\n\n## Font check — its own line, its own stop\n\nEvery family in `fontFamiliesRequired` is searched for in the project: in\n`design.tokensFile`, in the font-loader call sites implied by `design.fontLoader`, and in the\ndirectory holding font files. A family that is not there is a **stop**, not a warning. Report\nthe required weights and styles, and the concrete instruction for the configured loader:\n\n- `next-font` — the font-module call to add, with the exact weights\u002Fsubsets.\n- `link-tag` — the stylesheet link to add, and where the document head is.\n- `self-hosted` — the font files needed and the face declarations they need.\n- `none` — the project has no loader wired; adding one is an operator decision, not this\n  skill's.\n\n**Never substitute another family silently** — not as a placeholder, not temporarily, not\n\"just to see the layout\". The reason this is the strictest rule in the pack is in\n`references\u002Ffidelity-checklist.md`, rule 3: a swapped font changes text metrics, so the Phase 6\ndiff lights up on *every* text block and the real cause disappears among a hundred small\nregions.\n\n# Phase 4 — plan, then hard stop\n\nPresent to the operator, in one message:\n\n1. **Target** — the route and the file(s) it resolves to under `design.routesRoot`.\n2. **Reuse-vs-create table** — every component in the design against its `reuse` \u002F `variant` \u002F\n   `build` bucket and the path it matched.\n3. **Tokens to add** — each marked local or **global**; global ones are called out explicitly\n   because they change screens nobody asked about.\n4. **Font requirements** — the Phase 3 result, even when it is \"all present\".\n5. **Blast radius** — for every component and token the plan intends to modify, the other\n   screens that use it:\n   ```bash\n   grep -rn \"\u003CComponentName>\" \"\u003Cdesign.routesRoot>\" \"\u003Cdesign.componentsRoot>\"\n   ```\n   Report the actual file list, not a count. A modification with an unmeasured blast radius is\n   not a plan.\n6. **Viewport** — the authoring breakpoint, and how the other breakpoints are expected to\n   behave (derived from `authoredBreakpoints`, not invented).\n7. **Mode** — `degraded: …` from Phase 1, when applicable.\n\nThen **stop**. Do not write code, do not create files, do not start an agent, until the\noperator answers explicitly. \"Looks fine, go on\" from anyone but the operator is not an answer.\n\nThe approved plan is recorded as **the list of files that may be touched**. That list is the\nagent's autonomy boundary in Phase 5: a file outside it is not edited, it is escalated back to\nthe operator. If the list exceeds `design.budget.maxFiles`, say so before asking for approval —\nan over-budget list usually means the screen should be split, not that the budget is wrong.\n\n# Phase 5 — implement\n\nInvoke `@design-implementer` with all seven inputs. It refuses to start on a missing one — it\ndoes not infer, default, or discover them:\n\n1. the path to Phase 2's `tokens.json`;\n2. the design path — the HTML export, or the screenshot set in degraded mode;\n3. the target route;\n4. the authoring viewport, as `WxH`;\n5. the operator-approved file list, literally — this is the agent's autonomy boundary;\n6. the whole `design` block: `tokensFile`, `componentsRoot`, `routesRoot`, `fontLoader`,\n   `devCommand`, `devUrl`, `verify.lint`, `verify.typecheck`, `diff.threshold`,\n   `diff.pixelTolerance`, `budget.maxIterations`, `budget.maxFiles`;\n7. the mode — `normal` or `degraded: screenshots`.\n\nRepeat this rule to the agent verbatim, because it is the one that gets rationalised away:\n**the design is re-expressed in this project's stack; the exported design HTML is never pasted\nin as a component.** The export is a measurement reference, not a source file\n(`references\u002Fanti-patterns.md`, #1).\n\n## When the agent returns `STOPPED`\n\nControl comes back to this session — that is the design, not a failure. Show the operator the\nstop form's `Blast radius` and `What must change`, and get a decision.\n\n**Only the operator extends the approved file list.** Re-invoking the agent with the same list\njust re-fires the same trigger. Re-invoke with the extended list once the operator has said\nwhich files may be touched; the iteration and file counters carry across re-invocations,\nbecause `design.budget` bounds the run, not one dispatch.\n\n# Phase 6 — verify\n\nDelegate to `design-verify`. It starts the app if `design.devUrl` does not answer, runs the\npixel diff, reads the regions whatever the verdict says, and runs `design.verify.lint` and\n`design.verify.typecheck`.\n\nThe work is not finished until the operator has seen **the comparison image and the number**.\nNot \"it matches\", not \"looks the same\" — `side-by-side.png` and `diffPercent`.\n\n# When NOT this skill\n\n- **Ordinary styling requests** — tweak a padding, change a colour, fix a hover state. That is\n  normal UI work; the six-phase overhead buys nothing.\n- **UI from a written description** — no design artefact means there is no ground truth to\n  extract and nothing to diff against. Also normal UI work.\n- **Visual QA of an already-implemented screen** with no reference design — that is\n  `browser-verification` in `core`.\n\n# References\n\n- `references\u002Ffidelity-checklist.md` — the seven precision rules, each with its consequence.\n- `references\u002Fanti-patterns.md` — five named failure modes and what to do instead.\n- `design-acquire` — the four input shapes and what each one can honestly promise.\n- `design-verify` — the Phase 6 measurement procedure.\n\n# How to use\n\n## What it does\n\nThis skill carries a finished visual design through to working code in your project's stack, and proves the result with a number instead of an opinion. It runs six phases: acquire the design, extract a token inventory from a real headless render, check what you can reuse against your own components, present a plan and stop for your approval, implement inside the approved file list, then pixel-diff the built screen against the design.\n\n## When to use it\n\n- You have a design export (HTML\u002Fzip), a design-tool handoff prompt, or a design-system URL and need the screen built pixel-accurately.\n- A screen already exists but must be made to match a mockup, and you want a measured diff rather than a visual guess.\n- You want to know before any code is written which components get reused, which get a new variant, and which screens the change touches.\n\n## When not to use it\n\n- Ordinary styling work — a padding tweak, a colour change, a hover-state fix. Just make the edit; six phases buy nothing.\n- Building UI from a written description with no design artefact. There is no ground truth to extract and nothing to diff.\n- Visual QA of a screen with no reference design — use `browser-verification` in `core`.\n- Only resolving the design input, or only measuring an existing screen — use `design-acquire` or `design-verify` directly.\n\n## How to invoke\n\n```\nSkill(skill: \"design-pack:design-build\")\n```\n\nInvoke it once you have the design artefact in hand. The skill reads the rest of what it needs from configuration and asks you for anything it cannot resolve.\n\n## Inputs\n\n- Design artefact — an export path, a handoff prompt, a design-system URL, or a screenshot set — required.\n- Target route — which screen this becomes — required; the skill asks if you did not say.\n- Viewport as `WxH` — optional; without it the skill reads the design's own authoring breakpoint and pins to that.\n- The `design` block in `${CLAUDE_PROJECT_DIR}\u002F.claude\u002Fproject.json` — required. Missing or empty fields stop the run with the exact field names listed.\n\n## What you get back\n\nA token inventory (`tokens.json` + `tokens.md`) under `.design-verify\u002Ftokens\u002F\u003Cslug>`, a plan you approve before any file is written, code changes confined to the file list you approved, and a final verdict made of `side-by-side.png` plus a `diffPercent` number, with lint and type-check results alongside. Any degraded mode — screenshots only, missing fonts — is reported, never quietly absorbed.\n\n## Worked example\n\n```\nSkill(skill: \"design-pack:design-build\")\n\nYou: implement this design at orders\u002Fline-items — export is at .\u002Fhandoff\u002Fline-items.zip\n\nPhase 2 renders the export headless: 1440x900, 214 elements, 9 colours,\n6 type styles, 14 spacing values (11 on the 4px grid), fonts required:\nInter 400\u002F500\u002F600.\nPhase 3: 7 of 9 colours already exist as tokens; the list row maps to an\nexisting component with a new \"compact\" variant; Inter is already loaded.\nPhase 4 stops and shows you the target file, the reuse table, the two new\ntokens (one global), and the 4 other screens that use the list row.\nYou approve 5 files. Phase 5 implements only those.\nPhase 6: diffPercent 0.31 (threshold 0.5) — side-by-side.png attached,\nlint and typecheck clean.\n```\n\n## Related\n\n- `design-acquire` — use it alone when you only need to resolve a handoff into a measurable local artefact.\n- `design-verify` — use it alone when the screen is already built and you just want the diff.\n- `browser-verification` in `core` — use it for behavioural UI checks when there is no reference design.\n","# Purpose\n\nSix phases that carry a screen from \"here is a design\" to \"here is a measured diff\". Each\nphase has exactly one output, and the next phase does not start until that output exists.\n\nTwo rules hold the whole workflow up: the token inventory comes from a **real headless\nrender**, never from reading the design's CSS by eye; and completion is **a number plus an\nimage**, never an impression.\n\nThis document is the procedure only. Input shapes and what each one can promise live in\n`design-acquire`; the measurement procedure lives in `design-verify`; the precision rules\nlive in `references\u002Ffidelity-checklist.md` and the named failure modes in\n`references\u002Fanti-patterns.md`. Nothing here repeats them.\n\n# Step 0 — Prerequisites\n\n**0.1 — Read `${CLAUDE_PROJECT_DIR}\u002F.claude\u002Fproject.json`, the `design` block.**\n\nRequired: `design.tokensFile`, `design.componentsRoot`, `design.routesRoot`, `design.devUrl`,\n`design.verify` (both `verify.lint` and `verify.typecheck`).\n\nIf the block is missing, or any required field is empty, **stop loudly**. Name the specific\nfields that are not filled in — not \"the config is incomplete\", but the list of them — and\nsay where the form is: the project dashboard → plugins → design-pack. Do not guess a path,\ndo not infer a components root from a directory listing, do not run on a partial block.\n\nOptional fields and their defaults:\n\n| Field | Default | Read by |\n|---|---|---|\n| `design.fontLoader` | — | Phase 3 font check (`next-font` \\| `link-tag` \\| `self-hosted` \\| `none`) |\n| `design.devCommand` | — | Phase 6, when `design.devUrl` does not answer |\n| `design.diff.threshold` | `0.5` | Phase 6 verdict |\n| `design.diff.pixelTolerance` | `0.1` | Phase 6 per-pixel comparison |\n| `design.budget.maxIterations` | `4` | Phase 5 correction loop cap |\n| `design.budget.maxFiles` | `12` | Phase 4 sanity cap on the approved file list |\n\n**0.2 — Read the project's `CLAUDE.md` in full, before any edit.** In a large repository that\nfile carries the decision history that changes how a screen is built — which layer owns\nstyling, which component library is already committed to, what is deliberately not abstracted.\nSkipping it produces work that is locally correct and architecturally wrong.\n\n**0.3 — Resolve `SCRIPTS_DIR` once, then confirm the render runtime:**\n\n```bash\n# Installed as part of the pack, CLAUDE_PLUGIN_ROOT is set; in a standalone\n# .skill bundle it is not, and the scripts sit beside this file.\nSCRIPTS_DIR=\"${CLAUDE_PLUGIN_ROOT:+${CLAUDE_PLUGIN_ROOT}\u002Fscripts}\"\nSCRIPTS_DIR=\"${SCRIPTS_DIR:-\u003Cthis skill's directory>\u002Fscripts}\"\nnode \"$SCRIPTS_DIR\u002Fensure-runtime.mjs\" --check\n```\n\nEvery later script call in this workflow goes through `$SCRIPTS_DIR`. That one\nvariable is the only difference between the pack and the bundle.\n\nExit `3` means the runtime is not prepared; the fix is to run `ensure-runtime.mjs` once while\nonline. Phases 2 and 6 both depend on it, so this is cheaper to learn now than mid-diff.\n\n# Phase 1 — acquire\n\nDelegate to `design-acquire`. It resolves whichever of the four input shapes arrived and\nreturns either a local path to a self-contained HTML export, or an explicitly recorded\ndegraded mode (for example `degraded: screenshots`).\n\n**Output:** a design path, plus the mode. A degraded mode is carried forward into the Phase 4\nplan and into the final report — it is never quietly forgotten.\n\n# Phase 2 — ground truth\n\n```bash\nnode \"$SCRIPTS_DIR\u002Fextract-computed-styles.mjs\" \\\n  --input \u003Cdesign path> --out .design-verify\u002Ftokens\u002F\u003Cslug>\n```\n\nViewport: use the one the operator gave. If they gave none, run once without `--viewport`,\nread `authoredBreakpoints` from the resulting `tokens.json`, and re-run pinned to the design's\nown authoring breakpoint (`--viewport 1440x900` for a desktop-authored screen).\n\n**Output:** `tokens.json` + `tokens.md`, plus a short chat summary — `viewport`,\n`elementsScanned`, the counts in `colors` \u002F `typography` \u002F `spacing` \u002F `radii` \u002F `borders` \u002F\n`shadows` \u002F `layout`, how many `spacing` entries are `onFourPxGrid`, and the full\n`fontFamiliesRequired` list.\n\n**Forbidden:** assembling the inventory by reading the design's CSS by eye. What renders and\nwhat the stylesheet says diverge through cascade, inheritance and unit resolution; an\neyeballed inventory carries that divergence into every later phase, where it is unfindable.\n\nExit codes: `0` ok, `1` bad arguments or unreadable input, `2` render failure, `3` runtime not\nprepared (Step 0.3).\n\n# Phase 3 — recon\n\nCompare the inventory against `design.tokensFile` and `design.componentsRoot`. Every entry\nnames the file it was resolved against — a bucket without file paths is a guess.\n\nTokens:\n- **`exists`** — the value is already a token: use that token's name, do not add a second one.\n- **`new`** — the value is not in the token layer: candidate for a new token or an arbitrary\n  value (`references\u002Ffidelity-checklist.md`, rules 1–2, decides which).\n\nComponents:\n- **`reuse`** — an existing component fits as it is.\n- **`variant`** — an existing component fits with a new variant\u002Fmodifier.\n- **`build`** — nothing comparable exists.\n\n## Font check — its own line, its own stop\n\nEvery family in `fontFamiliesRequired` is searched for in the project: in\n`design.tokensFile`, in the font-loader call sites implied by `design.fontLoader`, and in the\ndirectory holding font files. A family that is not there is a **stop**, not a warning. Report\nthe required weights and styles, and the concrete instruction for the configured loader:\n\n- `next-font` — the font-module call to add, with the exact weights\u002Fsubsets.\n- `link-tag` — the stylesheet link to add, and where the document head is.\n- `self-hosted` — the font files needed and the face declarations they need.\n- `none` — the project has no loader wired; adding one is an operator decision, not this\n  skill's.\n\n**Never substitute another family silently** — not as a placeholder, not temporarily, not\n\"just to see the layout\". The reason this is the strictest rule in the pack is in\n`references\u002Ffidelity-checklist.md`, rule 3: a swapped font changes text metrics, so the Phase 6\ndiff lights up on *every* text block and the real cause disappears among a hundred small\nregions.\n\n# Phase 4 — plan, then hard stop\n\nPresent to the operator, in one message:\n\n1. **Target** — the route and the file(s) it resolves to under `design.routesRoot`.\n2. **Reuse-vs-create table** — every component in the design against its `reuse` \u002F `variant` \u002F\n   `build` bucket and the path it matched.\n3. **Tokens to add** — each marked local or **global**; global ones are called out explicitly\n   because they change screens nobody asked about.\n4. **Font requirements** — the Phase 3 result, even when it is \"all present\".\n5. **Blast radius** — for every component and token the plan intends to modify, the other\n   screens that use it:\n   ```bash\n   grep -rn \"\u003CComponentName>\" \"\u003Cdesign.routesRoot>\" \"\u003Cdesign.componentsRoot>\"\n   ```\n   Report the actual file list, not a count. A modification with an unmeasured blast radius is\n   not a plan.\n6. **Viewport** — the authoring breakpoint, and how the other breakpoints are expected to\n   behave (derived from `authoredBreakpoints`, not invented).\n7. **Mode** — `degraded: …` from Phase 1, when applicable.\n\nThen **stop**. Do not write code, do not create files, do not start an agent, until the\noperator answers explicitly. \"Looks fine, go on\" from anyone but the operator is not an answer.\n\nThe approved plan is recorded as **the list of files that may be touched**. That list is the\nagent's autonomy boundary in Phase 5: a file outside it is not edited, it is escalated back to\nthe operator. If the list exceeds `design.budget.maxFiles`, say so before asking for approval —\nan over-budget list usually means the screen should be split, not that the budget is wrong.\n\n# Phase 5 — implement\n\nInvoke `@design-implementer` with all seven inputs. It refuses to start on a missing one — it\ndoes not infer, default, or discover them:\n\n1. the path to Phase 2's `tokens.json`;\n2. the design path — the HTML export, or the screenshot set in degraded mode;\n3. the target route;\n4. the authoring viewport, as `WxH`;\n5. the operator-approved file list, literally — this is the agent's autonomy boundary;\n6. the whole `design` block: `tokensFile`, `componentsRoot`, `routesRoot`, `fontLoader`,\n   `devCommand`, `devUrl`, `verify.lint`, `verify.typecheck`, `diff.threshold`,\n   `diff.pixelTolerance`, `budget.maxIterations`, `budget.maxFiles`;\n7. the mode — `normal` or `degraded: screenshots`.\n\nRepeat this rule to the agent verbatim, because it is the one that gets rationalised away:\n**the design is re-expressed in this project's stack; the exported design HTML is never pasted\nin as a component.** The export is a measurement reference, not a source file\n(`references\u002Fanti-patterns.md`, #1).\n\n## When the agent returns `STOPPED`\n\nControl comes back to this session — that is the design, not a failure. Show the operator the\nstop form's `Blast radius` and `What must change`, and get a decision.\n\n**Only the operator extends the approved file list.** Re-invoking the agent with the same list\njust re-fires the same trigger. Re-invoke with the extended list once the operator has said\nwhich files may be touched; the iteration and file counters carry across re-invocations,\nbecause `design.budget` bounds the run, not one dispatch.\n\n# Phase 6 — verify\n\nDelegate to `design-verify`. It starts the app if `design.devUrl` does not answer, runs the\npixel diff, reads the regions whatever the verdict says, and runs `design.verify.lint` and\n`design.verify.typecheck`.\n\nThe work is not finished until the operator has seen **the comparison image and the number**.\nNot \"it matches\", not \"looks the same\" — `side-by-side.png` and `diffPercent`.\n\n# When NOT this skill\n\n- **Ordinary styling requests** — tweak a padding, change a colour, fix a hover state. That is\n  normal UI work; the six-phase overhead buys nothing.\n- **UI from a written description** — no design artefact means there is no ground truth to\n  extract and nothing to diff against. Also normal UI work.\n- **Visual QA of an already-implemented screen** with no reference design — that is\n  `browser-verification` in `core`.\n\n# References\n\n- `references\u002Ffidelity-checklist.md` — the seven precision rules, each with its consequence.\n- `references\u002Fanti-patterns.md` — five named failure modes and what to do instead.\n- `design-acquire` — the four input shapes and what each one can honestly promise.\n- `design-verify` — the Phase 6 measurement procedure.\n\n# How to use\n\n## What it does\n\nThis skill carries a finished visual design through to working code in your project's stack, and proves the result with a number instead of an opinion. It runs six phases: acquire the design, extract a token inventory from a real headless render, check what you can reuse against your own components, present a plan and stop for your approval, implement inside the approved file list, then pixel-diff the built screen against the design.\n\n## When to use it\n\n- You have a design export (HTML\u002Fzip), a design-tool handoff prompt, or a design-system URL and need the screen built pixel-accurately.\n- A screen already exists but must be made to match a mockup, and you want a measured diff rather than a visual guess.\n- You want to know before any code is written which components get reused, which get a new variant, and which screens the change touches.\n\n## When not to use it\n\n- Ordinary styling work — a padding tweak, a colour change, a hover-state fix. Just make the edit; six phases buy nothing.\n- Building UI from a written description with no design artefact. There is no ground truth to extract and nothing to diff.\n- Visual QA of a screen with no reference design — use `browser-verification` in `core`.\n- Only resolving the design input, or only measuring an existing screen — use `design-acquire` or `design-verify` directly.\n\n## How to invoke\n\n```\nSkill(skill: \"design-pack:design-build\")\n```\n\nInvoke it once you have the design artefact in hand. The skill reads the rest of what it needs from configuration and asks you for anything it cannot resolve.\n\n## Inputs\n\n- Design artefact — an export path, a handoff prompt, a design-system URL, or a screenshot set — required.\n- Target route — which screen this becomes — required; the skill asks if you did not say.\n- Viewport as `WxH` — optional; without it the skill reads the design's own authoring breakpoint and pins to that.\n- The `design` block in `${CLAUDE_PROJECT_DIR}\u002F.claude\u002Fproject.json` — required. Missing or empty fields stop the run with the exact field names listed.\n\n## What you get back\n\nA token inventory (`tokens.json` + `tokens.md`) under `.design-verify\u002Ftokens\u002F\u003Cslug>`, a plan you approve before any file is written, code changes confined to the file list you approved, and a final verdict made of `side-by-side.png` plus a `diffPercent` number, with lint and type-check results alongside. Any degraded mode — screenshots only, missing fonts — is reported, never quietly absorbed.\n\n## Worked example\n\n```\nSkill(skill: \"design-pack:design-build\")\n\nYou: implement this design at orders\u002Fline-items — export is at .\u002Fhandoff\u002Fline-items.zip\n\nPhase 2 renders the export headless: 1440x900, 214 elements, 9 colours,\n6 type styles, 14 spacing values (11 on the 4px grid), fonts required:\nInter 400\u002F500\u002F600.\nPhase 3: 7 of 9 colours already exist as tokens; the list row maps to an\nexisting component with a new \"compact\" variant; Inter is already loaded.\nPhase 4 stops and shows you the target file, the reuse table, the two new\ntokens (one global), and the 4 other screens that use the list row.\nYou approve 5 files. Phase 5 implements only those.\nPhase 6: diffPercent 0.31 (threshold 0.5) — side-by-side.png attached,\nlint and typecheck clean.\n```\n\n## Related\n\n- `design-acquire` — use it alone when you only need to resolve a handoff into a measurable local artefact.\n- `design-verify` — use it alone when the screen is already built and you just want the diff.\n- `browser-verification` in `core` — use it for behavioural UI checks when there is no reference design.\n",{"docs":24,"name":5,"owner":28,"version":29,"description":7},{"status":25,"updated":26,"source_sha":27},"reviewed",1785974400000,"8192d35c7790","swarmery-core","0.1.0","main","2d9e918cc79c9b17b59356780ff0a3da38a3e98a","plugins\u002Fdesign-pack\u002Fskills\u002Fdesign-build",5,"https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery","https:\u002F\u002Fatretyak1985.github.io\u002Fswarmery\u002F","https:\u002F\u002Fgithub.com\u002Fatretyak1985","2026-11-11 04:29:12",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add atretyak1985\u002Fswarmery --skill design-build",{"tool":44,"command":45},"bunx","bunx skills add atretyak1985\u002Fswarmery --skill design-build",{"tool":47,"command":48},"pnpm","pnpm dlx skills add atretyak1985\u002Fswarmery --skill design-build","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Fplugins\u002Fdesign-pack\u002Fskills\u002Fdesign-build\u002FSKILL.md",true,[52,58],{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fanti-patterns.md","REFERENCE","参考文档",4866,"https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Fplugins\u002Fdesign-pack\u002Fskills\u002Fdesign-build\u002Freferences\u002Fanti-patterns.md",{"path":59,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Ffidelity-checklist.md",5142,"https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Fplugins\u002Fdesign-pack\u002Fskills\u002Fdesign-build\u002Freferences\u002Ffidelity-checklist.md",[63,70,76,83,90,97],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M78D4T1FFWFW19Z44AHH5BSY","short-desc","Too short.","https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Ftools\u002Fswarmery\u002Ftestdata\u002Fsysconfig\u002Fclaude\u002Fskills\u002Fshort-desc\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M78D4S0TWT42WXFJHC1DBN0R","no-frontmatter","https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Ftools\u002Fswarmery\u002Ftestdata\u002Fsysconfig\u002Fclaude\u002Fskills\u002Fno-frontmatter\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M78D4Q14P8DJ4W78N62F3EG2","global-skill","Fixture global skill (minimal user-scope shape, format doc §2.3).","https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Ftools\u002Fswarmery\u002Ftestdata\u002Fsysconfig\u002Fclaude\u002Fskills\u002Fglobal-skill\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M78D4N1JHGQJQ7EZ43KY5SV3","documented-skill","Fixture skill whose usage guide deliberately omits the Worked example subsection.","https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Ftools\u002Fswarmery\u002Ftestdata\u002Fsysconfig\u002Fclaude\u002Fskills\u002Fdocumented-skill\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M78D4KVNZ03GBKGDFJZWW5FJ","z","NOT auto-discovered — only skills\u002F is scanned for plugins (§2.2).","https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Ftools\u002Fswarmery\u002Ftestdata\u002Fsysconfig\u002Fclaude\u002Fplugins\u002Fcache\u002Fmkt\u002Ftoolpack\u002F1.0.0\u002Fworkflow-skills\u002Fz\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M78D4JMBRZWK51HFE5RZJGHC","y","Plugin skill y from toolpack — stored as \"toolpack:y\".","https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Ftools\u002Fswarmery\u002Ftestdata\u002Fsysconfig\u002Fclaude\u002Fplugins\u002Fcache\u002Fmkt\u002Ftoolpack\u002F1.0.0\u002Fskills\u002Fy\u002FSKILL.md",[],[]]