/dev-flow:figma-to-design-mdfrom dev-flow
Generates a DESIGN.md file from a Figma URL, extracting design tokens, colors, typography, and system documentation into a portable AI-readable format. Supports dev-flow workflow integration.
Ships in dev-flow. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Generate a DESIGN.md file that conforms to the Google design.md spec (open format for portable design systems across AI agents — see references/spec.md). The source of truth is a Figma file the user points to via URL.
This skill participates in the dev-flow workflow. When invoked on a project that has a .workflow/ folder at its root:
<root>/.workflow/:
DESIGN.md (the main artifact)screenshots/ (any HD frame captures used during extraction — saved with slugged page names like home-hero.png, type-system.png)meta.json#phase = "design_extracted" (only if the current phase is earlier in the enum), refreshing updated_at, and appending an entry to meta.json#history with skill name, inputs (figma URL, path used: MCP/REST/manual), and outputs..workflow/ present) is still supported — fall back to the original behavior of writing DESIGN.md at the user-specified project root.The canonical contract spec is in references/contracts.md. Read it if any rule above is unclear.
Trigger on any of:
figma.com/file/..., figma.com/design/..., figma.com/proto/..., figma.com/board/...).If only a URL is pasted with no instructions, ask once whether the user wants a DESIGN.md generated. Don't assume.
In dev-flow mode: <root>/.workflow/DESIGN.md + <root>/.workflow/screenshots/*.png (for any HD captures used).
In standalone mode: <project-root>/DESIGN.md.
The DESIGN.md content (same in both modes):
##:
Sections may be omitted only if there's truly no information to fill them, but should appear in this order when present.
Never invent the spec. Read references/spec.md first if you need to confirm any detail (token shape, valid units, naming conventions, "consumer behavior for unknown content"). The spec is the law.
<cwd>/.workflow/meta.json exists, the output goes into <cwd>/.workflow/ (no need to ask). Read meta.json#project_name and use it as the brand name fallback.DESIGN.md.DESIGN.md already exists at the target, ask before overwriting (in dev-flow mode this means .workflow/DESIGN.md; in standalone, <root>/DESIGN.md).PROJECT.md if present.You have three ways to read Figma. Try them in this order and stop at the first that works:
| # | Path | When available | Reference |
|---|---|---|---|
| A | Figma Dev Mode MCP | A tool whose name contains figma (e.g. mcp__figma__*, mcp__figma_dev_mode__*) is exposed in this session | references/figma-mcp.md |
| B | Figma REST API | A FIGMA_ACCESS_TOKEN env var is set, or the user can provide a personal access token | references/figma-api.md |
| C | Manual export | Neither of the above is available | references/figma-manual.md |
How to detect path A: scan available tools for any name containing the substring figma. If at least one is present, use path A. If you find a Figma MCP tool but it requires the user to be running Figma Desktop with Dev Mode active, tell them and fall back to B if it doesn't work.
How to detect path B: run printenv FIGMA_ACCESS_TOKEN (Bash). If empty, ask the user "Hai un Figma personal access token? (https://www.figma.com/developers/api#access-tokens)". If yes, accept it for the session — do not persist it to disk.
Fallback to C only if A and B both fail. Path C requires the user to manually export PNG screenshots and (ideally) a tokens JSON from Figma; it's slower and less complete, but always works.
Tell the user which path you're using and why ("Uso Figma MCP perché vedo lo strumento mcp__figma__get_file" / "Uso REST API con token dall'env" / "Procedo manualmente perché non ho né MCP né token").
Follow the path-specific reference file. The goal is to gather, in this rough order of priority:
colors token group.typography token group.rounded and spacing token groups.Button*, Chip*, Input*, Card*, Tooltip*) → components token group.For Overview specifically: synthesize from frame names, page structure, components present, and brand context. Describe personality, target audience, emotional tone — not just what's drawn.
Apply these mapping rules:
primary, secondary, tertiary, neutral, surface, on-surface, error. If Figma uses a Material-like scheme (Material 3 variables), preserve it — those names are widely accepted ("Consumer Behavior for Unknown Content" allows it).display-lg, headline-lg/md/sm, body-lg/md/sm, label-lg/md/sm. Always emit fontFamily, fontSize, fontWeight, lineHeight. Add letterSpacing only when non-zero. Quote fontWeight as a string ("600") — both bare numbers and quoted strings are valid per spec, but quoted is safer for YAML parsers.none/sm/md/lg/xl/full (full: 9999px). Deduplicate similar values.xs/sm/md/lg/xl plus any gutter/margin if the design uses a grid.backgroundColor: "{colors.primary}". Variants go as separate keys with hyphenated suffix: button-primary-hover.components, which may reference composite typography tokens).px, em, rem are valid units. Single values only — never CSS shorthand. padding: "12px 24px" is invalid; the spec accepts one dimension. If a Figma component has asymmetric padding (e.g. 12px vertical, 24px horizontal), pick the dominant axis and describe the asymmetry in the Components prose, OR split into two component variants if the difference is meaningful. The same rule applies to size, height, width, rounded — one dimension per key.When uncertain, prefer fewer, well-defined tokens over many half-defined ones. The DESIGN.md is read by other agents; ambiguity hurts.
For each ## section, write 2–6 sentences of prose that explain why the tokens are what they are — the rationale, not a re-listing of values. The prose may use descriptive color names (e.g. "Midnight Forest Green") that correspond to systematic token names (e.g. primary); this is encouraged by the spec.
Concrete prompts per section:
Look at references/example.md (Atmospheric Glass) for tone, density, and length.
Typography is load-bearing for any DESIGN.md consumer. An AI agent that knows the colors but not the font family or the size scale cannot reproduce the brand — it will silently default to system-ui at arbitrary sizes and the output will look generic. So:
Do not write the DESIGN.md without Typography evidence. If after Step 3 you have no font names and no measured sizes, stop and obtain them. In order of preference:
Re-attempt extraction with a more capable path. If you used Path C and Playwright is available, search the file for a frame literally named "Typography", "Type", "Type System", "Type Scale", "Styles", "Foundations", or "Design System" — these are universal designer conventions for the type-specimen page. Click that layer in the outline (it changes node-id in the URL), then zoom in (Cmd+0 for 100%, scroll/zoom on the canvas via JS if keyboard shortcuts don't work without login). Take a high-resolution screenshot of the specimen and read font names + sizes directly from the rendered text.
Ask the user explicitly, with concrete options. Don't ask vaguely "any info on fonts?". Ask: "I need typography to ship a usable DESIGN.md. Pick one: (a) drop a screenshot of any frame that contains visible body text and a heading; (b) tell me the font family name (you can read it in Figma's right panel when you click any text layer) plus the size of the hero headline and body — I'll infer the rest from typical scales; (c) paste an export from a Tokens Studio plugin."
As a last resort, write the DESIGN.md with a Typography section that omits the YAML token group and replaces it with a clearly-marked stub block in prose:
## Typography
> **Typography pending.** Not extracted in this run because [specific reason — e.g.
> "the file's type-specimen frame was inaccessible without a Figma login and the
> user did not supply a screenshot."]. Before this DESIGN.md is usable, a designer or
> developer must add: (1) primary font family, (2) size scale (display/headline/body/
> label tiers), (3) line-height per tier. The frontmatter below intentionally has no
> `typography:` key so consumers don't silently load the wrong values.
The stub is acceptable only after options 1 and 2 have actually been attempted and failed. A bare omission with no explanation is not.
Apply the same rigor — but less strictly — to colors.primary: at least one primary color must be present. Without it the spec rejects the file outright.
Before writing the file, mentally check:
--- on its own line and ends with --- on its own line."#rrggbb" (or "#rrggbbaa" only if alpha is intentional).primary color palette is defined (mandatory per spec).px, em, or rem.{path.to.token} references resolve to existing tokens.##, in spec order, with no duplicates.## Colors (or any other section) appears twice — that's a hard error per spec.Then write the file with the Write tool to <project-root>/DESIGN.md.
Dev-flow mode: before reporting, update <root>/.workflow/meta.json:
phase is earlier than design_extracted in the enum, set phase = "design_extracted" (don't regress)updated_at to ISO-8601 UTC nowhistory entry:
{
"skill": "figma-to-design-md",
"ran_at": "<now>",
"inputs": {"figma_url": "...", "path_used": "mcp|rest|manual|playwright"},
"outputs": ["DESIGN.md", "screenshots/"],
"phase_before": "<prev>",
"phase_after": "design_extracted"
}
Skip this in standalone mode.
Then tell the user, briefly:
design-md-to-app to scaffold the codebase, or stay here to refine).If the user wants companion artifacts (Tailwind config, tokens.json), offer them — but they're outside the spec and only on request.
references/spec.md — re-read it rather than guessing.evals/evals.json (opens in a new tab)references/contracts.md (opens in a new tab)references/example.md (opens in a new tab)references/figma-api.md (opens in a new tab)references/figma-manual.md (opens in a new tab)references/figma-mcp.md (opens in a new tab)references/spec.md (opens in a new tab)scripts/figma_api_fetch.py (opens in a new tab)scripts/quantize_palette.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub lukedj78/dev-flow --plugin dev-flow57 skills in this plugin
/animated-iconsAdd a Motion-animated icon to a Next.js app from a shadcn registry instead of hand-animating an SVG. Two registries, picked from the project's icon set: **heroicons-animated** (316 icons, `shadcn add @heroicons-animated/<name>`) and **hugeicons-animated** (165 icons, `shadcn add @hugeicons-animated/<name>`, which also installs a shared `lib/use-icon-animation.ts`). Both MIT, both on the `motion` runtime, both copied into your repo as source. This skill owns the install plus the two things the raw components lack: a `prefers-reduced-motion` guard and timing aligned to the project motion tokens (`lib/motion/`). Use when the user says "animated icon", "animate this icon", "make the bell/heart/menu icon animate on hover", "aggiungi un'icona animata", or wants an icon micro-interaction. Refuses outside Next.js web — for React Native use `rn-animations-gestures`. Not for: static icons, a whole motion system (`transitions`), or installing the runtime itself (`module-add motion`)./app-securityCheck whether an app's own code can be attacked before it ships — vulnerable dependencies, secrets in the code and in git history, Next.js authorization gaps (Server Actions and route handlers without a session check, queries by id with no owner filter — IDOR), data over-exposure, secrets in public env vars, raw SQL — then read the flagged code against an OWASP checklist, with an opt-in dynamic level (Strix) that proves exploits against the app running locally. The fifth pre-deploy gate, beside compliance-audit, vercel-doctor, shadscan and launch-audit; reports and routes, never blocks. Triggers: "security review", "è sicura l'app?", "controllo di sicurezza prima del deploy", "IDOR", "secrets in the repo", "pentest". Not for: GDPR and legal (compliance-audit), UI quality (shadscan), cost (vercel-doctor), launch readiness (launch-audit), a review of one branch diff (Claude Code's /security-review), third-party registry code (registry-intake)./app-verificationGive a project a manual for proving its features on the real app, written once and kept true: `.claude/skills/verify-<app>/` with how to launch it until it is usable, a read-only doctor check, how to drive it with the repo's real selectors, what counts as proof and where it goes, how to stop only what it started — plus one feature file per PRD story, seeded from the wireframe screen inventory, and a headless-Chrome render probe (overflow, wrapped headings, text hidden under reduced motion). Two modes: create (scaffold, fill from the code, prove it live once, record `meta.json#verification`) and maintain (re-read every feature from source, drive them all live, fix the manual, report real regressions). Web, Expo and eve. Triggers: "verify the app", "prova che funziona", "verification skill", "come si avvia l'app per provarla", "maintain the verify skill", "il manuale di verifica è aggiornato?". Not for: writing tests (write-tests), UI audits (shadscan), security (app-security), deploying (vercel-deploy)./compliance-auditRun a GDPR + EU AI Act compliance audit on an existing dev-flow project (web / mobile / eve agent) and remediate what it finds. Two modes: Audit (scan the codebase and `meta.json#stack` against a 11-point risk register — DSAR, consent/cookies, EU data residency, retention and PII-scrubbing, AI-transparency Art.50, high-risk Annex III, sub-processors — into a report with severity, evidence and article mapping) and Remediate (apply the safe mechanical mitigations, flag the ones needing a legal decision, never deciding legal basis or high-risk for the user). A pre-deploy gate; run it any time. Triggers: "audit GDPR", "compliance check", "AI Act", "siamo conformi?", "DSAR / cancellazione account / cookie consent / data residency". Not for: the other pre-deploy gates (vercel-doctor, shadscan, launch-audit, app-security), legal advice or DPIA sign-off (a DPO confirms), building features, or writing the PRD (use prd-from-idea)./composition-patterns-guideUse when refactoring React or React Native components that suffer from boolean prop proliferation, missing compound structure, prop drilling, or unclear ownership of state. Codifies the 7 Vercel composition-patterns rules for our web + RN stack — composition or explicit variants over boolean props, compound components with shared context, state lifted into providers, children over render props, React 19 (no forwardRef) — plus our colocation rules (Rule of Three, L0/L1/L2, `_components/`). Triggers on: "refactor this component", "questo componente ha troppi prop booleani", "rendi questo componente più componibile", "compound component", "context provider per X", "design del componente". Not for: scaffolding new components (use design-md-to-app, screenshot-to-page, rn-add-screen), or moving components up the hierarchy (use promote-component)./coss-uiSet up or extend a Next.js web app with Coss/UI — the official Cal.com design system, built on Base UI + Tailwind CSS v4 and installed through the shadcn CLI via the namespaced `@coss/*` registry. Two modes: Init (`shadcn init @coss/style` on a new project) and Add (pull `@coss/ui` primitives, single `@coss/<name>` components, or particles into an existing one). Sets `meta.json#stack.ui = "coss"`. Triggers: "usa Coss/UI", "coss.com/ui", "Cal.com design system", "aggiungi un componente Coss", "init @coss/style", "scaffold con Coss UI", or dev-flow routing when `stack.ui = "coss"`. Requires Tailwind CSS v4 and carries a mixed MIT/AGPLv3 license. Not for: writing the DESIGN.md (use figma-to-design-md / image-to-design-md), the generic Next.js scaffold (design-md-to-app owns it), backend modules (module-add), or React Native (RN uses NativeWind, not Coss).