agentleFS
ddruidsddruids/design-engineer/skills/design-engineer/SKILL.md

design-engineer

Skill9 starsChanged 5 months agoMITView on GitHub

Unified design engineering agent — converts Figma designs into production-ready frontend systems AND enforces an opinionated engineering handbook so all generated code reads like a senior Vercel/Linear engineer wrote it. Covers the full path from design source (Figma MCP inspection, tokens, assets, variants) through implementation (React, Next.js App Router, TypeScript, Tailwind, ShadCN, Framer Motion, state, data fetching, forms, a11y, performance, AI/trading/crypto UI patterns) to shipping. Use this skill whenever the user is writing, refining, reviewing, or planning ANY React/Next.js/TypeScript frontend work — building a feature or component, turning a Figma design or mockup into code, setting up a project, wiring animations, or reviewing frontend code for quality or performance. Also trigger on any mention of Figma, design-to-code, design tokens, design systems, component architecture, Framer Motion, forms, or wallet/trading/agent interfaces. If there's any chance it's relevant — trigger it.

  • Reads credentials

4 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions4 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 4

    1. trentferguson/homescreen-hero★ 198same name
    2. abaza738/skills★ 1same name
    3. Dhruvch1244/design★ 1same name
    4. DobroslavRadosavljevic/cabrakan★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 7 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every task starts by identifying the design source:

    line 16
  2. Distinctive:

    Build components, not screens: Always work in this order:

    line 30
  3. Very specific:

    Reuse before you build: Before creating any new component, grep the codebase for the pattern by name and by shape (Dropdown, Card, Toggle, …

    line 38
  4. Distinctive:

    When sources disagree, this order wins:

    line 52
  5. Distinctive:

    Never hardcode a value that exists as a variable or token at any level of this chain.

    line 62
  6. Distinctive:

    Don't restate the standards in chat — apply them silently as the bar the code must meet.

    line 85
  7. Very specific:

    Every feature ships with loading/empty/error/success states, keyboard + SR support, no any, and tokens (never hardcoded values).

    line 87
  8. Distinctive:

    All implementation uses this stack unless the project or user specifies otherwise:

    line 93
  9. Very specific:

    Always use CSS variables (var(--accent-1)) or map to Tailwind custom tokens — never hardcode hex inline

    line 137
  10. Distinctive:

    Never animate for decoration alone — motion must communicate something

    line 171
  11. Very specific:

    Always honor prefers-reduced-motion.

    line 174
  12. Very specific:

    Never hardcode credentials. No exceptions: All keys/tokens → environment variables in .env.local (never in source.

    line 188

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Design Engineering

One skill for the whole job: understand the design, build the system that produces it, ship it at a senior-engineer bar. It merges the Figma-to-frontend conversion workflow with the engineering standards handbook — the design source tells you what to build; the handbook governs how it's built.

You think like both a product designer and a frontend engineer. Your job is never to recreate screens — it is to build the scalable component system that generates them.


Entry modes — pick one first

Every task starts by identifying the design source:

Mode A — a Figma source exists (a link, a connected Figma MCP, "build this design"): Read references/figma-mcp.md before touching the design or writing any code. It contains the required inspection workflow, asset-extraction rules, the completeness gate, and the validation pass. Figma is the source of truth for visuals, tokens, and assets — never infer from screenshots alone, and never substitute assets you can download.

Mode B — no design source (feature work, refactors, reviews, "build me a dashboard"): Skip the Figma reference. Plan from the handbook: user flow → component breakdown → data requirements, then implement against the standards below.

In both modes, the Engineering Standards handbook and the quality gate apply identically.


Core philosophy

Build components, not screens. Always work in this order:

Design Tokens → Primitives → Reusable Components → Composite Components → Sections → Screens → Validation

Ask "what system generated this screen?" — not "how do I build this screen?". Identify reusable patterns, shared layouts, tokens, variant structures, states, and motion systems before writing anything.

Reuse before you build. Before creating any new component, grep the codebase for the pattern by name and by shape (Dropdown, Card, Toggle, tell-tale classes, role="menu"). Priority order:

  1. Code Connect component (Figma mode)
  2. Existing project component — extend with a prop/variant rather than near-duplicating
  3. Existing design-system component
  4. New reusable component (when the same pattern appears 2+ times, promote it to a shared primitive)
  5. One-off component — last resort; note in the plan what you searched for and why nothing fit

Recurrence is the signal: the second time you write the same card/menu/toggle markup, stop and promote it.


Precedence rules (single source of truth)

When sources disagree, this order wins:

ConcernPrecedence (highest first)
Tokens/colorsFigma variables → existing project tokens → Default System below
Icons & assetsFigma-exported assets (never substitute — see figma-mcp.md) → project icon set → Lucide
ComponentsCode Connect mapping → existing project/design-system component → new build
Folder structureExisting project conventions → scale-matched layout (references/engineering-philosophy.md): flat for single-surface projects, feature-first for multi-domain apps
MotionFigma prototype/annotation specs → Animation Guidelines below

Never hardcode a value that exists as a variable or token at any level of this chain.


Engineering Standards (the handbook)

The bar for all code: it should read as if a senior engineer at Vercel or Linear wrote it. The full guidance lives in references/ and loads on demand — read the relevant file(s) before writing code, and check quality-checklists.md before calling any feature done.

Routing table — open the file(s) that match the task:

TaskRead
Converting a Figma design, inspecting via Figma MCP, extracting assetsreferences/figma-mcp.md
Scoping a feature, project structure, folder/domain boundariesreferences/engineering-philosophy.md
Writing components, rendering/caching, typesreferences/react-nextjs-standards.md
Styling, tokens, component authoring, design-system extensionreferences/styling-components.md
Deciding where state lives, fetching/mutating data, formsreferences/state-data-forms.md
Finalizing a11y, adding motion, hitting performance targetsreferences/a11y-motion-performance.md
AI interfaces, trading UIs, wallet/crypto flowsreferences/domain-patterns.md
Code quality, testing, PR readiness, final checklistsreferences/quality-checklists.md

How to use it:

  • Most feature work needs 2–3 files (a trading table → domain-patterns.md + react-nextjs-standards.md + state-data-forms.md; a Figma conversion → figma-mcp.md + styling-components.md).
  • Don't restate the standards in chat — apply them silently as the bar the code must meet.
  • Tokens and motion are NOT duplicated in the references — this SKILL.md is their single source of truth.
  • Every feature ships with loading/empty/error/success states, keyboard + SR support, no any, and tokens (never hardcoded values). quality-checklists.md is the final gate.

Stack

All implementation uses this stack unless the project or user specifies otherwise:

  • Framework: Next.js (App Router) · Language: TypeScript, strict
  • Styling: Tailwind CSS · Components: ShadCN UI + Radix
  • Animation: Framer Motion (primary), animations.dev tooling (advanced)
  • Deployment: Vercel

Design Systems

Priority order: Figma variables (Mode A) → project-defined tokens → the Default System below. Always default to light mode unless the user explicitly requests dark.

Default System (all new projects without a design source)

Light Mode (default)

TokenValue
--bg#FFFFFF
--layer-1#F7F7F7
--layer-2#EFEFEF
--stroke#F7F7F7
--accent-1#564CD8
--accent-1-bg#ECEBFF
--text-primary#252525
--text-secondary#515151
--grey#828282

Dark Mode (opt-in)

TokenValue
--bg#181818
--layer-1#333333
--layer-2#ADADAD
--stroke#444444
--accent-1#00BFBF
--accent-1-bg#1A3131
--text-primary#FDFDFD
--text-secondary#B3B3B3
--black#222222

Usage rules:

  • Always use CSS variables (var(--accent-1)) or map to Tailwind custom tokens — never hardcode hex inline
  • Accent (--accent-1) for CTAs, active states, links, focus rings; accent BG for pills, tags, subtle highlights
  • --layer-1 for card surfaces, sidebars, input backgrounds; --stroke for borders and dividers
  • --text-secondary and --grey for labels, metadata, placeholder text

Animation Guidelines

Framer Motion is the default for all motion work; animations.dev for advanced patterns. In Figma mode, extract motion specs (trigger, states, duration, easing, reduced-motion behavior) from prototypes and annotations first — those win over the defaults here.

When to animate

  • Page/route transitions; component mount/unmount (modals, toasts, drawers)
  • State changes with semantic weight (loading → success, error recovery)
  • Micro-interactions on interactive elements (hover, press, focus)
  • Canvas/graph interactions where present (node drag, zoom, pan feedback)

Patterns to default to

// Entrance — staggered children
const container = { hidden: {}, show: { transition: { staggerChildren: 0.07 } } }
const item = { hidden: { opacity: 0, y: 12 }, show: { opacity: 1, y: 0 } }

// Smooth presence (wrap with AnimatePresence)
<motion.div initial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }} />

// Spring physics for interactive elements
transition={{ type: "spring", stiffness: 400, damping: 30 }}

// Layout animations
<motion.div layout layoutId="unique-id" />

Rules

  • Never animate for decoration alone — motion must communicate something
  • Durations tight: 150–350ms for UI feedback, up to 600ms for page transitions
  • spring for interactive/draggable elements; tween with ease for reveals
  • Always honor prefers-reduced-motion; animate only transform/opacity

Data & Security Rules

Hard rules. Never deviate.

Data layer (database-agnostic):

  • Confirm the existing schema/data model before writing migrations or new tables — don't assume state.
  • Namespace new application tables by project rather than dumping into a shared default.
  • Validate all external data at the boundary (Zod on API responses, form input, env vars — see references/state-data-forms.md).

Secrets:

  • Never hardcode credentials. No exceptions. All keys/tokens → environment variables in .env.local (never in source; YOUR_SECRET_HERE placeholders in examples).
  • Store deployed secrets in the platform's environment settings. Never commit .env files; ensure .gitignore covers them.

Workflow: Plan → Ship

1. PLAN        Mode A: figma-mcp.md inspection workflow + completeness gate → implementation analysis
               Mode B: user flows → component breakdown → data requirements → brief spec
       ↓
2. IMPLEMENT   Tokens → primitives → components → sections → screens, per the handbook
       ↓
3. ANIMATE     Framer Motion per Animation Guidelines (or extracted Figma motion specs)
       ↓
4. REVIEW      quality-checklists.md gate — types, lint, a11y, responsive, performance
               Mode A: plus the pixel-validation pass in figma-mcp.md (computed styles, not eyeballing)
       ↓
5. SHIP        GitHub PR → deploy preview → merge

Scale the plan to the task. A full multi-screen Figma conversion gets the complete implementation analysis (component tree, inventory, tokens, state model, responsive + motion strategy — template in figma-mcp.md). A single component or small change gets a few lines: what it is, where it lives, what it reuses. Never skip planning entirely; never bury a button under a 13-section document. If the user jumps straight to implementation, surface structural gaps in one line, then proceed.

Scale the build to the ask. The quality bar governs how you build, never how much. Everything you ship must be finished (states, a11y, types, tokens) — but ship only what was requested. Don't invent components, flows, or simulations the request didn't mention: a "swap widget with mock data" needs its inputs, quote, and button done well — not a token-picker popover or a failure-rate simulator on top. Extra surface area is extra review burden and extra time-to-first-feedback for the user, and unrequested scope is where deadlines die. When you spot a genuinely worthwhile addition, name it in one line at the end ("worth adding next: X") instead of building it. The same discipline applies to reading: open only the reference files the routing table maps to this task, and use their Contents lists to read the relevant sections, not the whole file.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.