/dev-flow:image-to-design-mdfrom dev-flow
Generates a Google-design.md spec from 1+ raster images using k-means palette extraction and vision-LLM for typography, component, and layout inference. Extracts design tokens from screenshots, mockups, and competitor captures.
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.
Take 1 or more raster images (PNG / JPG) and produce a DESIGN.md that conforms to the Google design.md spec. The same workflow used in figma-to-design-md Path C (manual fallback) is the default here, since raster is all we have.
Trigger on any of:
dev-flow) routes here from phase prd_drafted or empty when the user has no Figma URL but has images.If the user has BOTH a Figma URL AND images, prefer figma-to-design-md (more precise — Variables panel beats vision LLM) and pass the images to screenshot-to-page later.
In dev-flow mode: <root>/.workflow/DESIGN.md + <root>/.workflow/screenshots/<slug>.png for each input image.
In standalone mode: <project-root>/DESIGN.md + <project-root>/screenshots/.
The DESIGN.md follows the same 8-section structure as figma-to-design-md produces — same spec — see references/spec.md for the canonical Google design.md spec.
This skill participates in the dev-flow workflow. See references/contracts.md for the canonical schema. Key facts:
<root>/.workflow/:
DESIGN.md (the main artifact)screenshots/ (input images copied + slugged)meta.json#phase = "design_extracted" (only if the current phase is earlier in the enum), refreshing updated_at, and appending a history entry..workflow/ present) is supported — fall back to writing at the user-specified project root.quantize_palette.py).If neither vision nor Python is available, this skill cannot run — refuse and explain. Don't fabricate token values.
.png / .jpg / .jpeg / .webp / .bmp.<cwd>/.workflow/meta.json exists, output goes into <cwd>/.workflow/. Read meta.json#project_name and PROJECT.md (if present) for brand context.DESIGN.md + screenshots/.DESIGN.md already exists at the target, ask before overwriting.The images alone don't tell you "what this brand is for". Ask the user for, at minimum:
name: in the frontmatter and as the slug for screenshot filenames).If PROJECT.md exists in .workflow/, reuse it: it already answers most of these.
For each input image:
python3 scripts/quantize_palette.py <image-path> --k 12 --no-crop to get the top 12 dominant colors.(hex, percentage) pairs. Don't take all 12 blindly — filter:
When you have multiple images, run scripts/aggregate_palettes.py <img1> <img2> … to merge their palettes into a single deduped list ranked by total weighted frequency. This handles the case "5 screenshots of the same app" where the brand palette repeats across images — the cross-image-recurring colors are the real tokens; one-off colors are noise.
Map the surviving colors to spec-recommended names: primary, secondary, tertiary, neutral, surface, on-surface, error (per the spec's "Recommended Token Names"). When in doubt about which color is primary, ask the user — typically it's the most saturated brand-distinct color, NOT the one that takes the most pixels (white usually wins on pixel count).
This is the highest-confidence-loss step. Vision LLMs can identify a font family within a small set of candidates but cannot read fontFamily metadata that doesn't exist in raster pixels.
For each image:
fontFamily and document the proprietary original in the prose.em (positive ≈ tracked, negative ≈ tight).State the confidence level explicitly in the prose: display-lg: Inter 96/0.9/900 (visually identified — original may be Söhne Breit, swap if available).
For each image, scan for recurring UI patterns:
Map each to the components block in the frontmatter. Don't invent variants you don't see — if only the default state is visible, emit only the default. Variants get added later by screenshot-to-page when more images arrive.
rounded tokens (sm/md/lg/full).Assemble the frontmatter (colors / typography / rounded / spacing / components) + 8 prose sections (Overview / Colors / Typography / Layout / Elevation & Depth / Shapes / Components / Do's and Don'ts) per the spec.
Validate before writing:
--- lines."#rrggbb".px, em, or rem.{path.to.token} references resolve.colors.primary is defined (mandatory).Write to <root>/.workflow/DESIGN.md (dev-flow) or <project-root>/DESIGN.md (standalone).
Each input image is copied into <root>/.workflow/screenshots/<slug>.png so:
screenshot-to-page invocations can use them as references.screenshots/dashboard.png".Slug each filename: lowercase, replace non-alphanumeric with hyphens, ensure uniqueness.
Dev-flow mode: before reporting, update <root>/.workflow/meta.json:
phase is earlier than design_extracted, set phase = "design_extracted".updated_at to ISO-8601 UTC now.history entry:
{
"skill": "image-to-design-md",
"ran_at": "<now>",
"inputs": {"image_count": <n>, "images": ["<paths>"]},
"outputs": ["DESIGN.md", "screenshots/"],
"phase_before": "<prev>",
"phase_after": "design_extracted"
}
Then tell the user, briefly:
design-md-to-app to scaffold the codebase).typography: block with a prominent note in the prose, OR ask the user for one extra image showing text. Don't fabricate.screenshots/. Skills downstream expect them there.PROJECT.md o l'input utente è in italiano, la skill rispetta la lingua dell'utente per la prosa (frontmatter resta in formato spec — nomi token in inglese).#7839CD reserved for the load-bearing CTA"). No "color1 / color2" placeholder names.Lorem ipsum or "Body 16/400/regular" as samples.screenshots/<file> for any inferred-from-image claim.A good DESIGN.md from this skill is one that the user can read, agree with, edit a few prose lines, and ship — not one they have to rewrite.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
design-system, design-tokens, vision-llm, screenshot-to-design, k-means, design-md
57 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).npx claudepluginhub lukedj78/dev-flow --plugin dev-flow