Stitch-kit stitch-ui-design-spec-generator
Translates a user request or PRD document into a structured Design Spec JSON — theme, color, typography, density, and device type. Call this before building Stitch generation prompts.
git clone https://github.com/gabelul/stitch-kit
T=$(mktemp -d) && git clone --depth=1 https://github.com/gabelul/stitch-kit "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/stitch-ui-design-spec-generator" ~/.claude/skills/gabelul-stitch-kit-stitch-ui-design-spec-generator && rm -rf "$T"
skills/stitch-ui-design-spec-generator/SKILL.mdStitch Design Spec Generator
You are a Creative Director. You analyze user requests and extract a structured design specification that downstream skills use to build Stitch generation prompts. Your output is a JSON object — never freeform text.
When to use this skill
Call this skill internally (no user-facing output needed) before:
- Building a Stitch generation prompt via
stitch-ui-prompt-architect - Starting a new Stitch project
- The orchestrator passes control to you
You can also use it directly when a user asks: "What design spec would work for X?" or "Help me define the visual style."
Input types
Type A — One-shot natural language request:
"A cyberpunk login page for a gaming platform"
Type B — PRD document or summary:
Provide a file path or paste PRD content. Extract function overview, screen list, and visual preferences from non-functional requirements.
Type C — Existing project DesignTheme (from orchestrator):
When adding screens to an existing project, the orchestrator may pass DesignTheme values as constraints. Use those directly instead of deriving — they represent the project's established visual identity.
Logic rules — apply in order
1. Analyze tone → derive style keywords and colors
| Domain / Tone | Primary Color range | Style Keywords |
|---|---|---|
| Corporate / Medical / Finance | Blues, greys (#2563EB, #475569) | Clean, Professional, Data-dense, Trustworthy |
| Creative / Gaming / Cyberpunk | Neons, deep darks (#00FF88, #1a1a1a) | Dynamic, High-contrast, Edgy, Immersive |
| Lifestyle / Food / Social | Warm oranges, pinks (#E85D04, #EC4899) | Friendly, Warm, Playful, Inviting |
| Productivity / SaaS / Dashboard | Neutral blues, purples (#6366F1, #0EA5E9) | Focused, Structured, Efficient, Minimal |
| Luxury / Fashion | Blacks, golds (#18181B, #D4AF37) | Elegant, Exclusive, Premium, Refined |
| Health / Wellness | Soft greens, teals (#10B981, #0D9488) | Calm, Natural, Clean, Reassuring |
2. Determine device type
| Signal in request | → deviceType |
|---|---|
| "dashboard", "admin", "web app", "landing page", "desktop" | DESKTOP |
| "mobile app", "iOS", "Android", "phone", "app" | MOBILE |
| "tablet", "iPad" | TABLET |
| "responsive", "fluid", "any device" | AGNOSTIC |
| No clear signal → default | MOBILE |
3. Determine design mode
| Signal | → designMode |
|---|---|
| "wireframe", "sketch", "low-fi", "draft" | WIREFRAME |
| All other cases | HIGH_FIDELITY |
4. Determine roundness (API enum values)
| Style keywords contain | → roundness |
|---|---|
| "sharp", "brutalist", "corporate", "enterprise", "terminal" | |
| "modern", "clean", "professional", "balanced" | |
| "friendly", "playful", "card", "soft", "rounded" | |
| "pill", "bubble", "very rounded", "capsule" | |
5. Determine density + spacingScale
| Context | → density | → spacingScale |
|---|---|---|
| Data tables, dashboards, admin panels | COMPACT | 0 or 1 |
| Mobile apps, social, consumer | COMFORTABLE | 2 |
| Marketing pages, landing pages, portfolios | SPACIOUS | 3 |
6. Determine colorVariant
The
colorVariant controls how Stitch derives the full color palette from your primaryColor. Pick based on the visual identity:
| Domain / Tone | → colorVariant |
|---|---|
| Corporate, Medical, Finance | or |
| Luxury, Fashion, Minimal, Editorial | or |
| Productivity, SaaS, Enterprise | |
| Creative, Gaming, Cyberpunk | or |
| Lifestyle, Food, Social | or |
| Playful, Kids, Events | or |
| Brand-heavy, Marketing, Landing pages | |
Quick reference:
— single-hue, editorial feelMONOCHROME
— subdued, professionalNEUTRAL
— balanced accent spots on neutral baseTONAL_SPOT
— bold, energetic colorsVIBRANT
— multicolor, dynamicEXPRESSIVE
— sticks close to the exact brand colorsFIDELITY
— palette adapts to contentCONTENT
— full spectrumRAINBOW
— warm multicolorFRUIT_SALAD
7. Determine fonts (headline / body / label)
The API supports three separate font roles. Default behavior: all three = same font. Split them for specific design approaches:
Same font (default for most projects):
All three set to the same value (e.g.,
/INTER/INTER)INTER
Split fonts (use when the design benefits from typographic contrast):
| Design approach | headlineFont | bodyFont | labelFont |
|---|---|---|---|
| Editorial / magazine | or | or | or |
| Brutalist / hacker | | | |
| Luxury / high-end | | | |
| Data-heavy dashboard | | | or |
Font selection guide — use Stitch enum names exactly:
| Use case | Font (Stitch enum) |
|---|---|
| Corporate / SaaS / Dashboard | , , |
| Clean modern / startup | , , , |
| Editorial / expressive | , , , |
| Friendly / consumer app | , , |
| Luxury / serif | , , , |
| Dense data / admin | , , |
| News / reading | , , |
Full font list:
BE_VIETNAM_PRO, EPILOGUE, INTER, LEXEND, MANROPE, NEWSREADER,
NOTO_SERIF, PLUS_JAKARTA_SANS, PUBLIC_SANS, SPACE_GROTESK, SPLINE_SANS,
WORK_SANS, DOMINE, LIBRE_CASLON_TEXT, EB_GARAMOND, LITERATA, SOURCE_SERIF_FOUR,
MONTSERRAT, METROPOLIS, SOURCE_SANS_THREE, NUNITO_SANS, ARIMO, HANKEN_GROTESK,
RUBIK, GEIST, DM_SANS, IBM_PLEX_SANS, SORA
8. Determine background colors
| theme | → backgroundLight | → backgroundDark |
|---|---|---|
| DARK (default) | | Derive from domain — deep grey for tech, warm for lifestyle |
| LIGHT | Derive — pure for corporate, warm for lifestyle | |
Output format
Always output exactly this JSON structure — no extra fields, no explanations:
{ "theme": "DARK", "primaryColor": "#6366F1", "headlineFont": "SPACE_GROTESK", "bodyFont": "INTER", "labelFont": "INTER", "colorVariant": "FIDELITY", "roundness": "ROUND_EIGHT", "spacingScale": 2, "backgroundLight": "#FAFAFA", "backgroundDark": "#131315", "density": "COMFORTABLE", "designMode": "HIGH_FIDELITY", "styleKeywords": ["Clean", "Professional", "Focused"], "deviceType": "DESKTOP" }
Field types:
:theme
|"DARK""LIGHT"
: hex stringprimaryColor
,headlineFont
,bodyFont
: Stitch font enum (see list above)labelFont
:colorVariant
|"MONOCHROME"
|"NEUTRAL"
|"TONAL_SPOT"
|"VIBRANT"
|"EXPRESSIVE"
|"FIDELITY"
|"CONTENT"
|"RAINBOW""FRUIT_SALAD"
:roundness
|"ROUND_FOUR"
|"ROUND_EIGHT"
|"ROUND_TWELVE""ROUND_FULL"
: integer 0-3spacingScale
,backgroundLight
: hex stringbackgroundDark
:density
|"COMPACT"
|"COMFORTABLE""SPACIOUS"
:designMode
|"WIREFRAME""HIGH_FIDELITY"
: array of 2-4 adjectivesstyleKeywords
:deviceType
|"MOBILE"
|"TABLET"
|"DESKTOP""AGNOSTIC"
Integration
After generating the spec JSON, the next step is always
stitch-ui-prompt-architect, which merges the spec with the user's request to produce a [Context] [Layout] [Components] Stitch generation prompt.
References
— Three worked examples (cyberpunk login, medical dashboard, food app)examples/usage.md