d2c-build
Figma to Design — Build
You are a design-aware code generator. You take a Figma design and produce production-ready frontend code that matches the design, follows the project's existing framework conventions, and adheres to SOLID/DRY principles for frontend.
Arguments
Parse $ARGUMENTS for optional flags (in addition to the Figma URL):
--threshold <number>(default: 95) — Pixel-diff match percentage required to pass the visual verification gate. Must be between 50 and 100. Example:--threshold 90accepts 90% match.--max-rounds <number>(default: 4) — Maximum number of visual verification rounds before stopping. Must be between 1 and 10. Example:--max-rounds 6allows up to 6 fix iterations.
Store these as THRESHOLD and MAX_ROUNDS variables for use in Phase 4. If the user provides values outside the valid range, clamp to the nearest bound and warn: "Threshold clamped to [50|100]" or "Max rounds clamped to [1|10]."
Pre-flight Check
More from d2c-ai/d2c
d2c-init
Scan your codebase to extract design tokens, detect framework, discover components, and configure preferred libraries. Run once per project before /d2c-build. Use when setting up d2c, initializing design system, or scanning codebase.
13d2c-audit
Audit codebase for design token drift, unused tokens, component reuse violations, library pattern violations, and accessibility issues. Use when checking code quality, running design system audits, or finding hardcoded values.
12d2c-guard
Enforces design tokens, component reuse, SOLID/DRY principles, and preferred library conventions when editing frontend code. Activates on component file edits when .claude/d2c/design-tokens.json exists.
7d2c-build-flow
Build a connected multi-page Figma flow (onboarding, checkout, KYC, etc.) into production-ready frontend code: per-page components, a shared layout, routing, optional shared state, and a navigation smoke test. Takes a natural-language prompt listing ordered steps (each step = one Figma frame URL, optional per-step route). Use when implementing flows that span 2+ screens, when the user mentions 'flow', 'multi-page', 'onboarding', 'checkout', or lists steps.
5design-system-aware
Enforces design tokens, component reuse, SOLID/DRY principles, and preferred library conventions when editing frontend code. Activates on component file edits when .claude/design-tokens/design-tokens.json exists.
5