specwright/templates/skills/design-system-extraction/SKILL.md
Design system extraction guidance from URLs and screenshots
npx skillsauth add michsindlinger/specwright specwright/templates/skills/design-system-extractionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Project: [PROJECT_NAME] Generated: [DATE] Purpose: Guide for extracting design systems from existing URLs or screenshots
This skill guides you when extracting design systems for:
/plan-product1. Fetch the URL content
2. Analyze the rendered HTML/CSS for:
- Inline styles and CSS custom properties (--variables)
- Class naming patterns (BEM, Tailwind, etc.)
- Color values in hex/rgb/hsl
- Font declarations
- Spacing values
3. Note the visual hierarchy
1. Read screenshot file(s) using Read tool
2. Visually analyze:
- Dominant colors and their usage
- Font styles (serif/sans-serif, weights)
- Spacing rhythm
- Component shapes and styles
- Overall visual tone (minimal, playful, corporate)
3. Approximate values based on visual analysis
| Category | Purpose | Example |
|----------|---------|---------|
| Primary | Brand color, CTAs, active states | #2563EB (blue) |
| Secondary | Supporting brand color | #7C3AED (purple) |
| Accent | Highlights, badges, special elements | #F59E0B (amber) |
| Success | Positive feedback, confirmations | #10B981 (green) |
| Warning | Caution states, pending actions | #F59E0B (amber) |
| Error | Error states, destructive actions | #EF4444 (red) |
| Info | Informational messages | #3B82F6 (blue) |
| Neutrals | Text, backgrounds, borders | #111827 to #F9FAFB (gray scale) |
--color-primary, etc.)| Element | Properties | |---------|------------| | Font Family | Primary (headings), Secondary (body), Monospace (code) | | Heading Sizes | h1 through h4 (size, weight, line-height) | | Body Text | Base size, line-height, paragraph spacing | | UI Text | Labels, buttons, captions (size, weight) | | Font Weights | Which weights are used (400, 500, 600, 700) |
Corporate/Professional: Inter, Roboto, Open Sans (clean sans-serif)
Creative/Modern: Poppins, Montserrat, DM Sans (geometric)
Editorial/Content: Georgia, Merriweather, Lora (serif)
Technical/Developer: JetBrains Mono, Fira Code (monospace)
Most design systems use a base unit (typically 4px or 8px):
Base: 4px
Scale: 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 80, 96
| Priority | Components | |----------|-----------| | High | Buttons (primary, secondary, ghost), Input fields, Cards | | Medium | Navigation (header, sidebar), Badges, Alerts/Toasts | | Low | Modals, Dropdowns, Tables, Tabs |
For each component, note:
Dashboard: Sidebar (240px) + Main content (fluid)
Marketing: Full-width hero + Contained sections (max-w-6xl)
App: Top nav (64px) + Content area (fluid)
Documentation: Sidebar nav + Content + Table of contents
After extraction, verify:
| Mistake | Solution | |---------|----------| | Only extracting brand colors | Include full neutral scale and semantic colors | | Missing font weights | Check headings, bold text, and buttons for weight variety | | Ignoring spacing patterns | Look at consistent padding/margin values across components | | Over-specifying components | Focus on patterns, not pixel-perfect replication |
Use template: specwright/templates/product/design-system-template.md
Hybrid lookup:
specwright/templates/product/design-system-template.md (project)~/.specwright/templates/product/design-system-template.md (global)tools
Session Handoff: Erstellt eine vollständige Zusammenfassung der aktuellen Session für einen sauberen Kontextwechsel. NUR bei explizitem Aufruf (/session-handoff). NICHT automatisch auslösen. Geeignet wenn der User die Session resetten will, den Kontext aufräumen will, oder bei ~120k Tokens angelangt ist.
development
Pre-Mortem Risk Analysis: Strukturierte Prospective-Hindsight-Übung um launch-blocking Risiken vor Commitment aufzudecken. Team stellt sich vor, das Produkt sei 14 Tage nach Launch gefloppt, und arbeitet rückwärts. Klassifiziert Risiken in Tigers (echt), Paper Tigers (hypothetisch), Elephants (unausgesprochen). Nutze diesen Skill vor Build-Commitment, bei zu hoher Stakeholder-Confidence, vor Major-Releases, oder wenn das Team vage Sorgen nicht artikulieren kann. Trigger: /pre-mortem, 'pre-mortem', 'risk analysis', 'was könnte schiefgehen', 'risiken vor launch'.
testing
Six-Sigma Atomicity Validator for create-spec stories
tools
UX pattern definition guidance for navigation, user flows, interactions, and accessibility