Skip to content
Development
Skill

/design-to-code-check

Compares a component or screen's design spec with its code and logs each gap as a build error or spec gap. Use it for design QA, handover review or sign-off: whenever someone asks if a build matches its design or spec, even one component with the spec pasted in. System-wide

From plugin
design-system-ops
22036 skills4 commands

Claude Code

$ npx -y skills add murphytrueman/design-system-ops --skill design-to-code-check --agent claude-code

SKILL.md

design-to-code-check.SKILL.md
name: design-to-code-check
description: "Compares a component or screen's design spec with its code and logs each gap as a build error or spec gap. Use it for design QA, handover review or sign-off: whenever someone asks if a build matches its design or spec, even one component with the spec pasted in. System-wide drift: drift-detection."
allowed-tools: Read, Write, Grep, Glob, Bash(cat:*), Bash(find:*), Bash(head:*), Bash(ls:*), Bash(grep:*), Bash(rg:*)
references:
  - ../../knowledge-notes/design-to-code-contract.md
  - ../../knowledge-notes/output-discipline.md

Design-to-code check

A skill for reviewing the alignment between a design specification and its code implementation, producing a structured discrepancy report catalogued by dimension and severity.

Before you begin: verify references

Confirm that every path in this skill's frontmatter `references:` exists relative to this SKILL.md. If any is missing, stop: the install is incomplete, usually because a flattening installer (for example `npx skills install`) dropped the repo-root `knowledge-notes/` directory. Tell the user to reinstall by a method in `1-INSTALL.md` and run `verify-install.sh` from the install root. Proceed without the references only if the user explicitly says to, and then say in the output that it was produced without the pack's reference material.

Context

Design-to-code alignment reviews catch two different categories of problem. The first is implementation error — the developer built something different from what was specified, either by mistake or because the specification was unclear. The second is specification ambiguity — the design did not define behaviour completely enough for the developer to implement it correctly, and the developer made a reasonable guess that turned out to be wrong.

Both categories matter, but they require different responses. An implementation error needs to be corrected in the code. A specification ambiguity needs to be corrected in the design and documented, so the same guess does not get made again.

This skill produces a report that distinguishes between the two.

---

Configuration

If `.ds-ops-config.yml` exists, follow the configuration-and-recurring knowledge note (`../../knowledge-notes/configuration-and-recurring.md`) for loading, integration fallbacks and recurring runs. This skill reads:

  • `severity.*` — discrepancy severity overrides, especially `specification_gap` and `missing_interaction_state`
  • `system.framework` and `system.styling` — pre-select framework-specific checking guidance
  • `integrations.figma` — the design specification (see below)
  • `integrations.chromatic` — visual regression data as a supplementary signal
  • `integrations.github` — the component source
  • `gates.design_to_code` — if running as part of `component-to-release`, determines which findings block release

Auto-pull integrations

**Figma MCP** (`integrations.figma.enabled: true`, or a Figma link in the request):

  • Official Figma MCP: `get_design_context` on the component's node for its properties, variants, layout and styles, and `get_variable_defs` for the variables that node binds, which is how the spec names its tokens. Both are selection- or node-scoped, so ask for the node link if the file key alone is given.
  • Figma Console MCP: `figma_get_component_for_development` for the dev-ready spec, `figma_capture_screenshot` for the rendered reference.
  • Record the node id with every value taken from Figma; it goes in the log as evidence.

**Chromatic** (`integrations.chromatic.enabled: true`):

  • Pull the latest visual snapshots for the component being checked
  • Use visual diffs between the Chromatic baseline and the current implementation as a supplementary signal for Dimensions 1–3 (spacing, colour, typography): it surfaces differences the manual review should confirm, never marks a dimension as matching

**GitHub** (`integrations.github.enabled: true`):

  • If the component implementation is in the configured repo, pull the component source files directly
  • Identify the component's last update date and recent changes to contextualise findings

Step 1: Gather the comparison materials

Ask for or confirm (skip questions already answered by auto-pull):

  • The design reference: Figma file link, exported specs, or described specification (skip if pulled from Figma MCP)
  • The implementation reference: component in code (React, Vue, Twig, etc.), a link to a running implementation, or a description of what was built. Note the styling approach — CSS custom properties, SCSS variables, Tailwind utility classes, or CSS-in-JS — as this affects how token references are identified during the check.
  • The component or screen being reviewed
  • Whether this is a first-pass review or a follow-up check after a previous round of corrections
  • Any known areas of concern the review should pay particular attention to

If both design and implementation are available directly, proceed to the check. If only one is available, note in the report which side of the comparison is inferred rather than directly inspected — dimensions that depend on the inferred side are reported as "not checked", not ✅.

Step 1b: Design specification checklist

Before running the check, verify the design specification is complete enough to check against. Incomplete specs are the root cause of Type II (specification gap) findings — catching them upfront reduces noise in the report.

**Design specification completeness checklist:**

  • [ ] All interactive states are defined (default, hover, active, focus, disabled, error, loading)
  • [ ] Spacing values are specified using token names, not pixel values
  • [ ] Colour values are specified using token names, not hex values
  • [ ] Typography is specified using type scale tokens
  • [ ] Responsive behaviour is defined for at least two breakpoints
  • [ ] Focus indicator style is specified
  • [ ] Content overflow behaviour is defined (truncation, wrapping, scrolling)
  • [ ] Touch targ
Read more
@murphytrueman
Ships withdesign-system-ops

Claude Code skills for the work that keeps a design system alive.

Stars on GitHub

Momentum

stars in total
220
Star history of murphytrueman/design-system-ops on GitHub, a chart by star-history.com

Other skills on design-system-ops.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about design-to-code-check.

Which coding agents can use design-to-code-check?
design-to-code-check installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.