O que design-system-builder faz?
This skill turns the brand tone described in the brief into a complete, schema-valid design token system: color scales (50–950), typography hierarchy, an 8pt spacing grid, radius/shadow scales, breakpoints, and a ready-to-paste tailwind.config.js snippet. Every downstream skill — wireframe, mockup, image planning, microinteractions, HTML/Next.js coders — reads these tokens. A coherent system here means a coherent LP everywhere; an arbitrary one means each section drifts and the page looks amateur. Color choices are also accessibility decisions: WCAG AA contrast failures exclude roughly 15% of users with low vision AND trigger Google Lighthouse penalties that hurt rankings, so contrast must be verified before writing the file, not after.
When to use this skill
Run this skill when:
lp-workspace/00-brief.jsonexists andlp-workspace/03-design/design-tokens.jsondoes not- The orchestrator (
lpb48) reaches Tier 3 Step 1 - The user says "デザインシステム作って" / "色決めて" / "build the design system" / "generate Tailwind config"
- A previous palette needs revision (brand tone changed, accessibility audit failed, user requested a different mood)
Do NOT use this skill when:
00-brief.jsonis missing — halt and route tolp-brief-intake. WHY: without brand tone, industry, and language, color/type choices are pure guesswork.- The user only wants to tweak one specific token (edit the file directly instead of regenerating the whole system).
- The user wants visual mockups (that's
visual-mockup-designer) or layout sketches (that'swireframe-generator).
Inputs
Required:
lp-workspace/00-brief.json— pullsbusiness.brandTone,business.industry,project.language,target.primaryPersona. WHY: tone drives hue/saturation, industry drives convention (fintech = navy + crisp sans; wellness = sage + airy serif), language drives font availability (Japanese needs Noto Sans JP / 游ゴシック fallbacks).
Optional:
2. lp-workspace/01-analysis/reference-clone.json — extracted palette, font names, radii, shadows from the reference site the user pointed at. WHY: if the user provided a reference, mimicking its visual DNA (without copying verbatim) is faster than inventing from scratch.
3. lp-workspace/01-analysis/value-prop.json — emotional tone words (e.g. "安心", "プレミアム"). WHY: token choices should echo the value-prop language.
4. lp-workspace/00-brief.json → constraints.brandAssets — existing brand color hex codes, logos. WHY: if the brand already exists, the design system MUST anchor on existing brand colors, not invent new ones.
If 00-brief.json is missing, halt:
デザインシステムには以下が必要です:
- lp-workspace/00-brief.json [不足 → lp-brief-intake を実行してください]
Process
Step 1. Validate upstream and read inputs
Read 00-brief.json. If absent, halt as above. Read reference-clone.json and value-prop.json if present. Read ${CLAUDE_PLUGIN_ROOT}/skills/lpb48/references/schemas/design-tokens.schema.json — this is the contract every field must match.
WHY rereading the schema each run: the schema enumerates exact required keys (color.primary, color.neutral, typography.fontFamily, typography.scale, spacing, radius). Missing a required key fails downstream skills silently.
Step 1b. Choose a design direction — before any color or font
Read ${CLAUDE_PLUGIN_ROOT}/skills/lpb48/references/design-directions.md and layout-patterns.md in the same folder. Score the 12 directions against the brief (industry, brand.tone, price point, available photos, persona, reference sites) as described there, and pick the top 3 that look clearly different from each other.
Present them to the user and let them choose (or mix: "D02 but with D04's full-bleed photos"). For each: name, one-line feel, why it fits, what the hero will look like, its signature. If you can render pages (see visual-review.md §1), build a tiny hero-only HTML for each of the three, screenshot them, and show the three images side by side — a picture decides faster than a description. When running under the orchestrator, this choice is part of checkpoint 3 (design) and must not be skipped; when the user already named a style or gave a strong reference, still show it as one of the three so they can confirm.
WHY: without a direction, every LP collapses into the same template — two-column hero, rows of three white cards, pale background. The direction is what makes this page look like this business.
Record the choice in the output under direction:
"direction": {
"id": "D02",
"name": "Deadpan corporate",
"mix": "full-bleed photos from D04",
"heroPattern": "H2",
"sectionPlan": { "problem": "S03", "solution": "S07", "how": "S05", "proof": "S04", "voices": "S09", "pricing": "S11", "faq": "S14" },
"signature": "footnote marks and a seal-like badge",
"imagery": "polished stock-photo realism, straight faces, navy/gold grade",
"avoid": ["rounded pastel cards", "emoji"]
}
Map every IA section id to a pattern id, then check the rhythm rules in layout-patterns.md (no pattern more than twice, S01 at most once, a visual every two sections, the core action shown). Fix the plan before moving on.
If the lp-parts-scout plugin is installed and the user wants extra polish, offer to run it now with the chosen direction; its design-brief.md then overrides this plan for the parts it covers.
All later steps (palette, type, radius, shadow) follow the direction's type and color lines first, then the tone rules below.
Step 2. Lock the brand color anchor
In priority order:
- If
brandAssets.primaryHexexists in the brief → use it ascolor.primary.500and derive the rest of the scale around it. WHY: existing brand identity must not be erased; the LP must feel like the brand. - Else if
reference-clone.jsoncontains an extracted primary hex AND the user said "this reference's mood" → use it as a starting point but shift hue slightly so it's not a direct copy. WHY: copying a competitor's exact color is trademark-risky and creatively lazy. - Else derive from
business.brandTone:- trustworthy / corporate / 信頼 / 安心 → blue family (hue 200–230) or teal (hue 170–190). WHY: blue triggers competence and stability across cultures; used by banks, healthcare, B2B SaaS for exactly this reason.
- energetic / vibrant / 活気 / 元気 → warm primaries (orange/red, hue 10–40) at high saturation. WHY: long-wavelength colors raise arousal; effective for fitness, food, youth brands.
- luxury / premium / 高級 / プレミアム → very dark neutral (near-black) + gold accent (hue 40–50, mid saturation). WHY: low chroma + metallic accent is the global visual shorthand for premium across watches, hotels, fashion.
- playful / fun / 楽しい / 親しみ → vibrant multi-hue (often coral + teal, or yellow + purple) with rounded radii and pillow shadows. WHY: high chroma + roundness reads as approachable; used by edtech, kids products, casual apps.
- natural / organic / オーガニック / ウェルネス → muted greens (hue 90–130) + warm beige neutrals. WHY: low-saturation earth tones signal sustainability and calm.
- clean / minimal / シンプル → near-monochrome with one restrained accent. WHY: every additional color is noise; minimalist categories punish maximalism.
- innovative / tech / 先進的 → deep purple, electric blue, or neon green on near-black. WHY: high-chroma + dark backgrounds read as forward-looking; standard in AI, crypto, dev tools.
Justify the choice in a rationale field at the root of the JSON (e.g. "rationale.primary": "trustworthy fintech → navy 500 anchors confidence; reference (stripe.com) uses similar 220° hue but we shift to 215° to differentiate"). WHY: rationale lets future humans understand and edit intelligently.
Step 3. Build the full color scales (50–950)
For each of primary, secondary (optional but recommended for accent surfaces), accent (optional, for highlights/CTAs that contrast primary), and neutral:
- Generate all 11 stops:
50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950 500is the anchor;50–400are progressively lighter (reduce chroma + raise lightness in HSL/OKLCH),600–950are progressively darker (often increase chroma slightly to keep depth).- Keep hue stable across the scale; varying hue makes the scale feel inconsistent.
neutralshould not be pure gray — tint it slightly toward primary (e.g. blue-tinted gray for fintech) so neutrals harmonize. WHY: warm or cool tinted neutrals make the whole UI feel intentional; pure #888 looks dead.
For semantic colors:
success— green (hue 130–150), saturated mid lightness (e.g.#16a34a-class)warning— amber/yellow (hue 35–50), mid-high lightness (e.g.#f59e0b-class)danger— red (hue 0–15), saturated (e.g.#dc2626-class)info— blue (hue 200–220), often = primary.500 or a neighbor
WHY universal semantic colors: red=stop / green=go is near-universal; reinventing it breaks unconscious recognition and harms usability.
Also set: background (usually neutral.50 or pure white for trustworthy/clean tones, near-black for luxury/tech), text (usually neutral.900 or neutral.950), textMuted (usually neutral.500 or neutral.600).
Step 4. Verify WCAG AA contrast — this is non-negotiable
Compute contrast ratios for the critical pairs and FIX any that fail BEFORE writing the file:
- Body text on background must reach ≥ 4.5:1. WHY: WCAG AA requires 4.5:1 for normal text because users with mild low vision (≈15% of adults over 40) cannot read at lower contrast. Google Lighthouse flags failures, hurting SEO.
- Headings (≥ 18pt or ≥ 14pt bold) on background must reach ≥ 3:1. WHY: larger text needs less contrast to be legible, but 3:1 is the floor.
- Primary CTA text on primary CTA background must reach ≥ 4.5:1. WHY: a CTA users can't read is a CTA users don't click.
- Link / accent on background must reach ≥ 4.5:1 OR provide non-color affordance (underline). WHY: 8% of men are red-green colorblind; color alone is not a sufficient differentiator.
Use a contrast formula (relative luminance per WCAG 2.x). If a pair fails, darken the foreground or lighten the background and recompute. Record final ratios in a accessibility.contrast field for the QA trail.
Step 5. Typography
Pick fontFamily.heading, fontFamily.body, fontFamily.mono based on tone AND language:
- Japanese projects (
project.language= "ja"): MUST include a Japanese font in the family stack. Recommended pairings:- Trustworthy/clean →
'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif - Premium/editorial →
'Noto Serif JP', 'Hiragino Mincho ProN', seriffor headings, sans for body - Modern/tech →
'Inter', 'Noto Sans JP', sans-serif(Latin numerals in Inter pair well with kana in Noto) - WHY: omitting Japanese fallback causes glyph fallback to system default, which on Windows looks broken.
- Trustworthy/clean →
- English/Latin projects: pair geometric or humanist sans for body (
Inter,DM Sans,Manrope) with display or serif for headings if the tone calls for it (Playfair Display,Fraunces,Space Grotesk). - For luxury/premium tone → consider serif heading + sans body. WHY: serif headlines signal heritage and editorial gravitas.
- Always end stacks with a generic family (
sans-serif,serif,monospace) so unsupported environments still render.
Build the typography.scale on a modular ratio (1.125 minor third, 1.2 minor third, 1.25 major third, or 1.333 perfect fourth). Output in rem:
xs: 0.75rem(12px),sm: 0.875rem(14px),base: 1rem(16px),lg: 1.125rem(18px),xl: 1.25rem(20px),2xl: 1.5rem(24px),3xl: 1.875rem(30px),4xl: 2.25rem(36px),5xl: 3rem(48px),6xl: 3.75rem(60px) — standard Tailwind defaults are a safe baseline; deviate only with reason.
Set lineHeight: tight: 1.1 (display), snug: 1.3 (headings), normal: 1.5 (body), relaxed: 1.75 (long-form). WHY: body line-height under 1.4 hurts readability; over 1.7 fragments paragraphs.
Set letterSpacing: tighter: -0.02em, tight: -0.01em, normal: 0, wide: 0.02em, wider: 0.05em. Display sizes often use slight negative tracking. Japanese text should generally stay at 0 — kerning Japanese tightly breaks readability.
Set fontWeight: regular: 400, medium: 500, semibold: 600, bold: 700. Only include weights you'll actually use — every weight is an extra font file to load.
Step 6. Spacing — 8pt grid
Use an 8pt base grid (with 4pt half-steps where needed). Output in rem:
0: 0,1: 0.25rem(4px),2: 0.5rem(8px),3: 0.75rem(12px),4: 1rem(16px),6: 1.5rem(24px),8: 2rem(32px),12: 3rem(48px),16: 4rem(64px),24: 6rem(96px),32: 8rem(128px).
WHY 8pt: every modern device's pixel density divides cleanly by 8, so 8pt grids stay crisp; vertical rhythm anchored to 8pt produces effortless alignment across components without per-element tuning.
Step 7. Radius scale
none: 0,sm: 0.25rem(4px),md: 0.5rem(8px),lg: 0.75rem(12px),xl: 1rem(16px),2xl: 1.5rem(24px),full: 9999px.
Bias by tone:
- Sharp/luxury/editorial → radii lean smaller (
md4px,lg8px). WHY: sharper corners read as formal. - Playful/friendly/consumer → radii lean larger (
md12px,lg20px). WHY: rounder corners read as approachable. - Pill buttons (
radius.full) almost always work for CTAs; use them for primary CTAs in consumer/playful contexts; use modestradius.lgfor B2B/luxury.
Step 8. Shadow scale
Define 4–5 shadow tokens scaled by elevation:
sm— subtle 1px shadow for cards at restmd— 4–6px shadow for hover/raised cardslg— 10–15px shadow for modals, popoversxl— 25px+ shadow for hero callouts, overlaysinner(optional) — inset for pressed states
Tint shadows with the primary hue at very low opacity (e.g. rgba(15, 23, 42, 0.08) for navy primary) rather than pure black. WHY: tinted shadows feel cohesive; pure black shadows look stamped-on and dated.
Step 9. Breakpoints
Default to Tailwind's canonical breakpoints unless the brief demands otherwise:
sm: 640px,md: 768px,lg: 1024px,xl: 1280px,2xl: 1536px
WHY canonical: matches every Tailwind tutorial, the entire ecosystem of templates, and developers' muscle memory. Custom breakpoints fragment the dev experience for negligible visual gain.
Step 10. Tailwind config snippet
Emit a tailwindConfig string field containing a valid tailwind.config.js theme.extend block that maps every token above to a Tailwind name. Example structure (pseudocode shape, fill with actual values):
module.exports = {
theme: {
extend: {
colors: {
primary: { 50: '...', ..., 950: '...' },
secondary: { ... },
accent: { ... },
neutral: { ... },
},
fontFamily: { heading: [...], body: [...], mono: [...] },
fontSize: { ... },
spacing: { ... },
borderRadius: { ... },
boxShadow: { ... },
screens: { ... },
},
},
};
WHY embedding the config string: lp-coder-html and lp-coder-nextjs can copy it verbatim, eliminating a translation step where bugs creep in.
Step 11. Write 03-design/design-tokens.json
- Ensure
lp-workspace/03-design/directory exists. - If
design-tokens.jsonexists, copy todesign-tokens.json.backupfirst. WHY: workspace convention requires backups so users can revert. - Pretty-print with 2-space indent.
Step 12. Report back
Show the user a concise summary:
デザインシステムを生成しました:
【プライマリ】#XXXXXX (理由: trustworthy fintech → navy)
【セカンダリ】#XXXXXX
【アクセント】#XXXXXX
【見出し】Noto Sans JP Bold / 本文】Noto Sans JP Regular
【スペーシング】8ptグリッド
【角丸】sm 4px / md 8px / lg 12px
【コントラスト】本文 7.2:1 ✓ / CTA 5.8:1 ✓ (WCAG AA達成)
【デザインの方向】D02 大真面目な企業広告(ヒーロー H2・各セクションの型は direction.sectionPlan)
ファイル: lp-workspace/03-design/design-tokens.json
次のステップ: wireframe-generator → visual-mockup-designer
WHY reporting hexes and contrast ratios: the user can sanity-check at a glance whether the palette matches their brand instinct, and the contrast numbers prove accessibility wasn't skipped.
Output
File written: lp-workspace/03-design/design-tokens.json
Schema: must validate against ${CLAUDE_PLUGIN_ROOT}/skills/lpb48/references/schemas/design-tokens.schema.json.
The JSON MUST include color.primary (full 50–950 scale), color.neutral (full scale), typography.fontFamily, typography.scale, spacing, radius. SHOULD include color.secondary, color.accent, color.semantic, shadow, breakpoint, tailwindConfig, and a rationale field documenting why each major choice was made.
Quality checks
Before declaring done:
- File parses as valid JSON and validates against
design-tokens.schema.json -
directionis present: chosen by the user from 3 clearly different candidates, withheroPatternand asectionPlancovering every IA section that passes the rhythm rules - Every color scale that exists has all 11 stops (
50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950) - Body text vs background contrast ≥ 4.5:1 (computed, not assumed)
- Heading vs background contrast ≥ 3:1
- Primary CTA text vs primary CTA background ≥ 4.5:1
- Japanese projects (
project.language= "ja") include a Japanese font infontFamily.headingANDfontFamily.bodystacks - Spacing uses an 8pt grid (values divisible by 0.25rem)
-
tailwindConfigstring is syntactically valid JavaScript (no trailing commas in places that break older Node) -
rationaleexplains primary, secondary (if used), accent (if used), typography pairing, radius scale bias - If
00-brief.json.constraints.brandAssets.primaryHexexists, it anchorscolor.primary.500(no silent reinvention of brand color) - No invented brand assertions (e.g. don't claim a font is "the brand font" unless brief said so)
- Backup
.backupfile exists if a priordesign-tokens.jsonwas overwritten
If any check fails, do NOT report success — fix it.
References
-
${CLAUDE_PLUGIN_ROOT}/skills/lpb48/references/design-directions.md— the 12 directions and how to score them -
${CLAUDE_PLUGIN_ROOT}/skills/lpb48/references/layout-patterns.md— hero/section pattern ids and rhythm rules -
${CLAUDE_PLUGIN_ROOT}/skills/lpb48/references/schemas/design-tokens.schema.json— the contract -
${CLAUDE_PLUGIN_ROOT}/skills/lpb48/references/workspace-schema.md— backup and reporting conventions -
skills/lp-brief-intake/SKILL.md— upstream; provides brand tone, industry, language -
skills/reference-site-cloner/SKILL.md— upstream (optional); provides reference palette/fonts -
skills/wireframe-generator/SKILL.md— downstream; uses spacing + breakpoint tokens -
skills/visual-mockup-designer/SKILL.md— downstream; uses every token for the HTML mockup -
skills/image-asset-planner/SKILL.md— downstream; uses palette to inform image prompt color references -
skills/ui-microinteraction-designer/SKILL.md— downstream; uses shadow + radius for hover state specs -
skills/lp-coder-html/SKILL.md,skills/lp-coder-nextjs/SKILL.md— downstream; embed thetailwindConfigdirectly