design-engineer
Design and implement web UI from durable context. Use for visual direction, DESIGN.md, responsive UI plans, redesigns, and styling; use design-reviewer for critique.
SKILL.mdskills/design-engineer/SKILL.md
GitHubDesign Engineer
Design through durable context, then build. Do not guess a visual system when the repository can carry one in DESIGN.md.
Core Rules
- Start with context: inspect the product, tech stack, existing UI, routes, tokens, components, assets, screenshots,
company.md,PRODUCT.md, andDESIGN.mdwhen present. - Run the interview phase before substantial design work when
DESIGN.mdis missing, stale, or too vague. - Write or update
DESIGN.mdas the first artifact for new design direction. Keep it concrete enough that another agent can continue the work. - Separate phases: interview,
DESIGN.md, plan, implementation, review. Do not collapse them unless the user asks for a tiny local change andDESIGN.mdis already fit. - Route substantial
DESIGN.md, plans, and implementations throughdesign-revieweras a gate. Finish visual rework only onPASSor explicit user acceptance of named defects. - Use real product evidence: rendered pages, screenshots, existing components, product data, states, user flows, reference sites, brand assets, and actual copy.
- Distinguish brand surfaces from product surfaces before choosing style. Brand surfaces can be expressive; product surfaces must serve repeated task completion.
- Preserve existing design-system contracts unless the request intentionally changes them.
- Use
visual-qaor existing browser automation to capture rendered desktop and mobile evidence when possible. A passing build is not visual QA.
Phase 1: Interview
Ask only for missing answers that would change the design direction. Otherwise inspect and infer, then state assumptions.
Gather:
- audience, job to be done, primary workflow, and emotional posture
- register:
brandfor marketing, editorial, portfolio, campaign, or showcase;productfor apps, dashboards, admin, tools, forms, and settings - target surfaces, routes, components, states, and success criteria
- examples, competitors, screenshots, references, and anti-references
- layout direction (standard versus beyond-standard) and the quality bar or reference to match
- color, typography, density, motion, accessibility, localization, and content constraints
- technology: framework, router, styling system, component library, tokens, icon library, image pipeline, test/browser tooling
- assets: logos, photos, generated images, product screenshots, fonts, charts, maps, videos, and sample data
When useful references are missing, ask for one real product/site/screenshot or choose a named direction and explain why it fits. Do not use empty words such as "modern", "clean", or "professional" as a direction.
Phase 2: DESIGN.md
Create or update root DESIGN.md before the plan when the work changes visual direction, tokens, component rules, register, or design-system behavior. Load references/design-md-format.md for the exact compact format.
DESIGN.md must include:
- creative north star and register
- audience, surface, and task priorities
- colors with semantic roles and rationale
- typography with hierarchy and usage rules
- spacing, radius, elevation, border, icon, media, and motion rules
- component rules for buttons, cards, forms, tables, nav, dialogs, feedback, empty/loading/error states, and content limits
- examples and anti-references
- technology notes and source-of-truth files
- review date or freshness signal
After writing DESIGN.md, review it with design-reviewer. If it fails, revise the interview assumptions or DESIGN.md before planning.
Phase 3: Plan
Plan from DESIGN.md, not from vibes.
Include:
- information architecture and first viewport intent
- token and component changes
- layout grid, spacing rhythm, responsive behavior, and overflow rules
- state inventory: loading, empty, error, disabled, selected, hover, focus, validation, long content, and permission-limited states
- media and data requirements
- accessibility requirements: semantic structure, contrast, focus, keyboard, reduced motion, touch targets
- implementation sequence and smallest reviewable edits
- verification: build/lint/typecheck, design scanner, browser screenshots or inspection, mobile width, long-content checks
Review the plan with design-reviewer. If review fails, return to DESIGN.md when direction is wrong, or rewrite the plan when execution detail is missing.
Phase 4: Implement
Implement only after the plan passes, unless the user explicitly asks for exploration or a quick local fix.
- Fidelity gate: trace every literal color, type size, spacing, radius, shadow, and easing to
DESIGN.md. Declare colors in a Colors block or semantic token line, apart from prohibited examples. Gate hex and CSS color functions with--design-md DESIGN.md --fail-on medium; inspect named colors and variables manually. - Build sections sequentially. Finish and audit one against tokens before starting the next; never return a monolithic multi-section dump. Lock the first viewport, re-read
DESIGN.mdbefore each section, and add motion last. On generic drift, return to tokens. - Load references/brand-surfaces.md for expressive brand work, references/motion.md before motion, and references/pixel-perfect.md for 1:1 replication.
- Follow the existing framework, routing, component library, tokens, and state patterns.
- Extend tokens and primitives before scattering one-off styles.
- Use the existing icon library, usually lucide or the local design-system icons.
- Use real or generated bitmap imagery where assets matter; prompt generated assets with named lighting, mood, and materials rather than generic stock.
- Keep dashboards and operational tools dense, scannable, and quiet. Avoid landing-page composition for repeated workflows.
- Keep cards for repeated items, modals, and genuinely framed tools. Do not nest cards.
- Use stable dimensions for boards, grids, toolbars, icon buttons, counters, media frames, and tiles.
- Make text wrap, clamp, or scroll intentionally with worst-case content.
- Avoid reflexive AI tells unless documented in
DESIGN.md: purple gradients, cream/serif/sage defaults, gradient text, side accent borders, huge rounded icon tiles, identical card grids, nested cards, full-screen hero traps, fake screenshots, vague SaaS copy, and decorative motion.
Phase 5: Review Loop
Run review after implementation:
- Run local quality commands available in the repo.
- Run bundled
scripts/scan-design-tells.mjsfor static, public, Tailwind, shadcn, or likely AI-looking UI; add--design-md DESIGN.md --fail-on mediumto gate color traceability. - Capture rendered desktop and narrow mobile evidence with
visual-qaor existing browser automation when possible. - Self-audit the render against
DESIGN.md, the plan, and the user ask. Fix weak hierarchy, generic defaults, mobile breaks, missing states, unreadable text, and direction drift before review. - Ask
design-reviewerfor a final implementation review with evidence: changed surfaces, screenshots or live page notes, scanner output, quality-command results, states inspected, and evidence gaps. - If review returns
FAIL, return to implementation for execution defects. Return to plan orDESIGN.mdwhen the failure is strategic, generic, off-brand, or structurally wrong. - On
PASS WITH FIXES, apply the named fixes and rerun targeted verification plus review. Close only onPASSor explicit user acceptance of named defects.
Never claim a pass when rendered inspection, scanner output, or review could not run; name the missing evidence and residual risk. Missing desktop or mobile rendered evidence blocks sign-off on substantial redesigns.
Routing Notes
design-engineerowns creation: interview,DESIGN.md, plan, and implementation.design-reviewerowns critique: pass/fail, consultant review, scorecards, and loop decisions.visual-qaowns reproducible browser evidence: screenshots, overflow, runtime findings, and focus checks.
Bundled Helper
scripts/scan-design-tells.mjs is an anti-pattern scan, not rendered review. Scope exceptions to check IDs: design-tell-ignore: purple-gradient, oversized-radius -- established brand. Only untraced-color suppresses traceability.
Tool Output
Use RTK when available for noisy, non-destructive build, lint, test, scanner, or browser output; inspect raw output before any release or visual-quality claim that depends on exact details.
Honest Opinion
Use honest opinion: when it adds decision value: reviews, audits, recommendations, plans, tradeoffs, or implementation close-outs with a material risk or gap. Be brutally honest and evidence-based. Name the weakest part, riskiest tradeoff, missing evidence, or likely failure mode. Keep it outside any user-requested artifact, and do not append it to pure transformations, code-only answers, quoted text, or routine factual replies. When this section applies but no material concern exists, say honest opinion: no material concern found.
Output Shape
For interview results:
- assumptions
- questions still needed
DESIGN.mdchanges- review result
For a plan:
- direction from
DESIGN.md - implementation steps
- states and responsive behavior
- verification
- review result
For implementation close-out:
- direction used
- files changed
- verification run
- reviewer verdict
- remaining risks, only if material