design-reverse-engineer
Skill1 starsChanged 8 months agoMITView on GitHub
Reverse-engineer a design system from a given URL — typography, color palette, spacing, component patterns, micro-interactions — and produce a Claude-ready design spec that can guide future UI work. Use when building a new view and you want to anchor it in a proven design system rather than generic AI output.
In this repository51 other files it gives its agents.
- algorithmic-artSkill
- audit-componentsSkill
- canvas-designSkill
- cascade-orchestrationSkill
- consultSkill
- data-reconciliationSkill
- debug-collaborateSkill
- deep-root-causeSkill
- deploy-allSkill
- design-showcaseSkill
- docxSkill
- env-auditSkill
- evolveSkill
- frontend-designSkill
- full-stack-buildSkill
- full-stack-traceSkill
- gh-repo-reconSkill
- grill-meSkill
- handoffSkill
- html-slidesSkill
- insightSkill
- internal-commsSkill
- isolation-testSkill
- mcp-builderSkill
- model-selectionSkill
- pdfSkill
- persistent-issueSkill
- pre-merge-reviewSkill
- premise-auditSkill
- propagate-featureSkill
- regression-bisectSkill
- research-gateSkill
- review-implSkill
- schema-checkSkill
- session-notesSkill
- skill-auditSkill
- skill-creatorSkill
- slack-gif-creatorSkill
- start-daySkill
- temporal-forensicsSkill
- theme-factorySkill
- throwaway-scriptSkill
- triage-ideasSkill
- verify-completeSkill
- webapp-testingSkill
- web-artifacts-builderSkill
- wisdomSkill
- worker-buildSkill
- worktree-guardSkill
- write-planSkill
- xlsxSkill
The file
Files
Design Reverse Engineer
Extract a design system from any URL and produce a reusable spec file for your project.
When to use
- Starting a new view/component and want to anchor it in proven design rather than generic output
- User points at a site and says "make it look like this"
- Refreshing an existing view — need a reference to measure against
- Exploring what works before writing any code
When NOT to use
- You already have a design direction — don't reverse-engineer on a whim
- The target site is login-gated and you don't have credentials (capture screenshots via
/webapp-testinginstead) - The target uses heavy runtime JS that WebFetch can't see through (use Playwright ultra-mode instead)
- Simple one-off style tweaks — use
/frontend-designtoken lookup directly
Workflow
Step 1 — Fetch the URL
Two modes depending on complexity:
Standard mode (WebFetch): Good for static/SSR sites with CSS in <style> blocks or linked sheets.
WebFetch url="<target>" prompt="Extract all CSS custom properties, font stacks, color values, spacing patterns, and component class names visible in the HTML."Follow up with:
WebFetch url="<target>/about" or "/pricing" prompt="Same extraction — compare component variation."Ultra mode (Playwright via /webapp-testing): Required when you need hover states, focus rings, animated transitions, or sites with heavy client-side rendering.
Steps for ultra mode:
- Open target in Chrome via
mcp__chrome-devtools__navigate_page mcp__chrome-devtools__take_screenshot— initial statemcp__chrome-devtools__hoverover key interactive elements (buttons, nav, cards)- Screenshot after each hover
mcp__chrome-devtools__evaluate_scriptto dumpgetComputedStylefor target elements:const el = document.querySelector('.btn-primary'); const s = getComputedStyle(el); JSON.stringify({ bg: s.backgroundColor, color: s.color, radius: s.borderRadius, font: s.fontFamily });- Dump all CSS custom properties from
:root:const props = {}; for (const sheet of document.styleSheets) { try { for (const rule of sheet.cssRules) { if (rule.selectorText === ':root') { for (const prop of rule.style) props[prop] = rule.style.getPropertyValue(prop).trim(); } } } catch(e) {} } JSON.stringify(props, null, 2);
Step 2 — Extract design tokens
Identify and record:
| Token category | What to capture |
| Typography | Font family names, weights used, size scale (px or rem), line-height values, letter-spacing |
| Colors | Background palette (surface/elevated hierarchy), text hierarchy (primary/secondary/muted), accent/action color, semantic colors (error/warning/success), border colors |
| Spacing | Base unit (4px? 8px?), common padding/margin values, gap between grid items |
| Radius | Button radius, card radius, input radius, badge radius |
| Shadows | Elevation levels used, exact box-shadow values |
| Animation | Transition durations, easing functions, keyframe patterns |
Step 3 — Identify component patterns
For each major component type found:
- Buttons: background, border, text color, radius, hover delta, focus ring, disabled state
- Cards: background, border, shadow, padding, radius, hover lift or highlight
- Tables: header background, row hover, border style (full grid vs horizontal-only), cell padding
- Badges/Tags: background, text, radius, variants (success/warning/error)
- Forms/Inputs: border, focus ring, placeholder color, error state
- Empty states: illustration vs text-only, CTA placement
- Loading states: skeleton vs spinner vs shimmer pattern
- Modals/Dialogs: backdrop, surface, padding, header treatment
Step 4 — Capture micro-interactions (ultra mode only)
Document:
- Hover: background delta, transform (lift? scale?), transition duration
- Focus: ring color, ring offset, outline vs box-shadow approach
- Active/pressed: scale-down, brightness change
- Disabled: opacity level, cursor
- Loading: spinner position, text swap, skeleton pattern
Step 5 — Write the spec
Save to .claude/design-references/<slug>.md (create dir if needed).
Slug = kebab-case site name, e.g. linear-app.md, stripe-dashboard.md.
Output format
The spec file this skill produces:
# <Site Name> Design Reference
Source: <url>
Captured: <YYYY-MM-DD>
Mode: WebFetch | Playwright ultra
## Typography
- Display: <font, weight, size>
- Body: <font, size, line-height>
- Mono/Code: <font>
- Scale: <list of sizes used>
## Color palette
| Token | Value | Usage |
|-------------|---------|---------------------------|
| bg-app | #... | Page background |
| bg-surface | #... | Card/panel backgrounds |
| bg-elevated | #... | Hover states |
| text-primary| #... | Main content |
| text-muted | #... | Labels, timestamps |
| accent | #... | CTAs, active states |
| border | #... | Standard borders |
## Spacing
Base unit: 4px / 8px.
Common values: 4, 8, 12, 16, 24, 32, 48, 64 (in px).
Grid columns: N, gap: Xpx.
## Radius
| Element | Value |
|---------|-------|
| Button | ... |
| Card | ... |
| Input | ... |
| Badge | ... |
## Components
### Button
- Default: background `#...`, text `#...`, radius `...`
- Hover: background delta `...`, transition `...ms ease`
- Focus: ring `...`
- Disabled: opacity `...`
- (Copy any exposed CSS verbatim here)
### Card
...
### Table
...
### Badge / Tag
...
## Micro-interactions (Playwright ultra only)
| Interaction | Element | Duration | Easing | Effect |
|-------------|---------|----------|--------|--------|
| hover | .btn | 150ms | ease | bg lighten 10% |
| ... | ... | ... | ... | ... |
## What makes this design work
(2-4 sentences: the design philosophy, what creates the cohesion, what's distinctive)
## How to apply this reference
(Which views or components this reference informs, and what specific patterns to borrow)
- Data table → ...
- Info modal → ...
- Form inputs → ...Practical tips
- Prioritize CSS custom properties — sites that use them expose the entire token system in one
getComputedStyledump - Capture dark mode separately —
prefers-color-scheme: darkmay reveal a different palette; toggle viamcp__chrome-devtools__evaluate_script:document.documentElement.setAttribute('data-theme', 'dark') - Font stack gotchas —
getComputedStylereturns the resolved font, not the CSS declaration. Check<link rel=stylesheet>for Google Fonts or@font-facedeclarations - Spacing rhythm — look at the inspector's computed margin/padding on a few sibling elements; if they're multiples of 4 or 8 it confirms the base unit
- Don't copy brand colors — extract the palette structure (how many neutrals, how the accent is used) rather than the exact hex values
Cross-reference
/design-showcase— turn a reference into variant mockups for side-by-side comparison/frontend-design— your project's design system tokens; map extracted tokens to your equivalents/webapp-testing— Playwright infrastructure for ultra-mode capturereference-sites.md(this directory) — curated list of high-quality design references by domain
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
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.

