Design System
Use this skill when the main question is "what shared UI rules should govern this product or product family before we design or refactor individual screens?"
This is the repo's canonical frontend UI-system anchor.
It should:
- classify the system problem,
- choose the right design-system mode,
- route neighboring frontend work out early,
- define a compact system packet another human or agent can execute.
Read references/system-modes.md before choosing an approach.
Read references/token-and-governance-checklist.md before changing shared tokens, primitives, or naming rules.
Read references/scope-boundaries.md when deciding whether the work belongs here, ui-component-patterns, responsive-design, web-accessibility, or web-design-guidelines.
Read references/design-system-packet-template.md before writing the final handoff.
Also read /Users/newmindsgroup/.codex/skills/visual-style-bible/SKILL.md before setting or revising the house visual defaults.
When to use this skill
- Define or refactor a shared design system for a product, product suite, or app + marketing surface
- Set token policy for color, typography, spacing, radius, elevation, motion, and breakpoint scales
- Choose primitive naming rules, contribution boundaries, and reusable visual-language conventions
- Create a coherent system direction for landing pages, dashboards, forms, and component libraries that must feel related
- Turn vague requests like “our UI feels inconsistent” into a system-level direction packet instead of a one-off page redesign
- Review whether a team needs a system decision before component, accessibility, or responsive implementation starts
- Prepare a design-system handoff for Figma, code tokens, primitives, and downstream frontend work
When not to use this skill
- The main task is reusable primitive / slot / variant API design or component-family extraction → use
ui-component-patterns
- The main task is viewport adaptation, container-query strategy, overflow, or mobile layout verification → use
responsive-design
- The main task is keyboard/focus behavior, WCAG remediation, labels, semantics, contrast, or manual a11y verification → use
web-accessibility
- The main task is a broad page or flow critique for hierarchy, CTA clarity, polish, and launch readiness → use
web-design-guidelines
- The task is implementation-only and the system rules are already clear; implement directly instead of reopening system governance
Core idea
A good design system is not a random palette plus a hero-section mock.
It is a shared decision layer that defines:
- what stays consistent,
- what may vary by surface,
- which neighboring skill owns the next implementation step,
- and what artifact downstream teams should follow.
Do not let this skill become a catch-all for every frontend concern.
System governance stays here; specialist remediation routes out.
Instructions
Step 1: Classify the design-system request before generating examples
Pick one primary mode so the answer stays bounded.
Modes:
- Foundations mode — tokens, scales, naming, motion, density, breakpoint policy
- Cross-surface alignment mode — landing page + dashboard + app-shell consistency, shared hierarchy, shared brand/system language
- Primitive governance mode — when the team needs rules for primitive naming, ownership, contribution boundaries, and promotion from product-local UI into shared primitives
- System handoff mode — package already-decided system rules into a concise artifact for design/dev execution
- System review mode — assess whether inconsistency is really a design-system problem or should route to a neighboring skill
Quick frame:
Design-system request:
- Surface: marketing site + logged-in dashboard
- Primary mode: cross-surface alignment
- System question: shared tokens and hierarchy, separate page-specific layouts
- Likely route-outs: component API details to ui-component-patterns, responsive verification to responsive-design
Step 2: Define the shared system boundary
Before changing tokens or page direction, decide what the system actually owns.
Keep in design-system when the job is to define:
- token scales and naming rules
- primitive naming and contribution policy
- visual-language principles that should apply across many screens
- breakpoint or density policy that multiple surfaces should inherit
- motion principles and accessibility baseline that many components depend on
Do not keep the work here when the question becomes:
- one reusable component API →
ui-component-patterns
- one page’s layout breakage →
responsive-design
- one accessibility failure or remediation plan →
web-accessibility
- one broad UX/UI critique →
web-design-guidelines
Step 3: Make the minimum shared decisions first
Do not start by dumping dozens of example tokens.
For each system request, decide these shared layers first:
- Foundations — color, type, spacing, radius, elevation, motion, density, breakpoints
- Primitive policy — which primitives exist, how they are named, what is shared vs product-local
- Surface rules — how landing pages, dashboards, forms, nav, and data-heavy surfaces should differ while staying coherent
- Accessibility baseline — contrast expectations, focus visibility, reduced-motion posture, semantic expectations
- Governance — who can add/change tokens or primitives, what must be reviewed, and when work should route to another skill
If a layer is unknown, say so and capture it as an open decision instead of inventing detail.
Step 4: Keep examples subordinate to the rules
Examples are useful only after the shared rules are explicit.
Good example usage:
- show one token naming pattern
- show one page-system contrast between landing and dashboard surfaces
- show one primitive promotion rule
- show one motion baseline or accessibility baseline
Bad example usage:
- dumping a full palette, TS token file, CSS animation sheet, and JSX screen mock before saying what problem the system is solving
Use this rule:
- rules first,
- one or two illustrative examples second,
- handoff packet last.
Step 5: Route neighboring frontend work out early
Mixed requests are normal. Split them explicitly.
Examples:
- if the team asks for button variants, slot structure, and controlled/uncontrolled behavior, keep the system naming/tokens here but route API design to
ui-component-patterns
- if the team asks how cards collapse on mobile, keep shared breakpoint policy here but route layout adaptation to
responsive-design
- if the team asks whether icon-only buttons meet keyboard/focus/label requirements, keep baseline a11y expectations here but route remediation to
web-accessibility
- if the request is “audit this dashboard and tell us what feels off,” route the broad critique to
web-design-guidelines
Do not hide unclear ownership by calling everything “design-system work.”
Step 6: Produce the design-system packet
End with a concise artifact that downstream design/dev work can follow.
Preferred format:
# Design System Packet
## Scope
- Products / surfaces covered:
- Primary mode:
- Shared system goal:
## Foundations
- Color / semantic token rules:
- Typography / spacing / radius / elevation:
- Motion / density / breakpoint policy:
## Primitive policy
- Shared primitives:
- Naming rules:
- What stays product-local:
## Surface guidance
- Landing / marketing:
- Dashboard / app shell:
- Forms / workflows:
## Accessibility baseline
- Contrast / focus / reduced motion / semantics:
## Route-outs
- `ui-component-patterns`:
- `responsive-design`:
- `web-accessibility`:
- `web-design-guidelines`:
## Open decisions
- ...
If the user asks for a terse answer, keep the same sections but compress them into bullets.
Step 7: Only then add a small illustrative example when needed
Use at most one or two examples and keep them obviously subordinate to the packet.
Healthy example shapes:
- semantic color tokens (
surface/default, surface/emphasis, text/muted) instead of giant fixed palettes
- landing-page hero vs dashboard header comparison to show shared hierarchy but different density
- primitive promotion rule such as “shared button stays primitive; billing-upsell banner stays product-local”
Step 8: Finish with a boundary sentence
End with a sentence that prevents overlap drift.
Examples:
- "This packet defines the shared UI system; component API extraction belongs in
ui-component-patterns."
- "This packet sets breakpoint and density policy; page-level layout fixes belong in
responsive-design."
- "This packet sets accessibility baseline expectations; remediation and verification belong in
web-accessibility."
Examples
Example 1: shared landing page + dashboard system
Input: "We need one design system for our marketing site and B2B dashboard so tokens, typography, and motion feel related without making both surfaces identical."
Good response shape:
- choose cross-surface alignment mode
- define shared foundations and surface-specific differences
- leave one compact design-system packet
- route component-family API design to
ui-component-patterns
Example 2: token and primitive governance
Input: "Our team keeps adding random colors and spacing values. We need naming rules and a review policy for shared primitives."
Good response shape:
- choose foundations or primitive governance mode
- define token/naming rules and review thresholds
- keep one or two naming examples only
- avoid turning the answer into a full page mock
Example 3: mixed system + responsive request
Input: "Should the dashboard and mobile web app share one breakpoint policy, and how should the layout collapse on small screens?"
Good response shape:
- keep shared breakpoint/density policy in
design-system
- route the actual collapse strategy and verification to
responsive-design
- make the split explicit in the packet
Example 4: accessibility-heavy follow-up
Input: "We already have tokens, but our forms still fail focus visibility and error-state accessibility."
Good response shape:
- note the design-system baseline briefly
- route the real remediation and manual verification to
web-accessibility
- do not absorb the full a11y fix into this skill
Best practices
- Decide the mode first so the skill stays bounded.
- Define shared rules before examples to avoid overfitting on one mockup.
- Keep governance explicit: token changes, primitive promotion, and ownership rules are part of the system.
- Use route-outs early so
design-system does not steal layout, component-API, accessibility, or broad-audit work.
- Leave a compact packet another human or agent can follow.
- Keep the alias narrow:
frontend-design-system remains a compatibility redirect, not a peer canonical skill.
References
1---2name: design-system3description: Define or refactor a shared frontend UI system before polishing one screen at a time. Use when the user needs token governance, visual-language rules, primitive naming, page-system direction, cross-product consistency, or a design handoff that should stay coherent across landing pages, dashboards, forms, and component libraries. Not for reusable component API architecture, responsive layout-only fixes, accessibility-only remediation, or broad UI critique. Triggers on: design system, design tokens, visual language, component library foundations, UI governance, cross-product consistency, landing page plus dashboard system, primitive naming, token policy.4license: MIT5---67# Design System89Use this skill when the main question is **"what shared UI rules should govern this product or product family before we design or refactor individual screens?"**1011This is the repo's **canonical frontend UI-system anchor**.12It should:131. classify the system problem,142. choose the right design-system mode,153. route neighboring frontend work out early,164. define a compact system packet another human or agent can execute.1718Read [references/system-modes.md](references/system-modes.md) before choosing an approach.19Read [references/token-and-governance-checklist.md](references/token-and-governance-checklist.md) before changing shared tokens, primitives, or naming rules.20Read [references/scope-boundaries.md](references/scope-boundaries.md) when deciding whether the work belongs here, `ui-component-patterns`, `responsive-design`, `web-accessibility`, or `web-design-guidelines`.21Read [references/design-system-packet-template.md](references/design-system-packet-template.md) before writing the final handoff.22Also read `/Users/newmindsgroup/.codex/skills/visual-style-bible/SKILL.md` before setting or revising the house visual defaults.2324## When to use this skill25- Define or refactor a shared design system for a product, product suite, or app + marketing surface26- Set token policy for color, typography, spacing, radius, elevation, motion, and breakpoint scales27- Choose primitive naming rules, contribution boundaries, and reusable visual-language conventions28- Create a coherent system direction for landing pages, dashboards, forms, and component libraries that must feel related29- Turn vague requests like “our UI feels inconsistent” into a system-level direction packet instead of a one-off page redesign30- Review whether a team needs a system decision before component, accessibility, or responsive implementation starts31- Prepare a design-system handoff for Figma, code tokens, primitives, and downstream frontend work3233## When not to use this skill34- **The main task is reusable primitive / slot / variant API design or component-family extraction** → use `ui-component-patterns`35- **The main task is viewport adaptation, container-query strategy, overflow, or mobile layout verification** → use `responsive-design`36- **The main task is keyboard/focus behavior, WCAG remediation, labels, semantics, contrast, or manual a11y verification** → use `web-accessibility`37- **The main task is a broad page or flow critique for hierarchy, CTA clarity, polish, and launch readiness** → use `web-design-guidelines`38- **The task is implementation-only and the system rules are already clear**; implement directly instead of reopening system governance3940## Core idea41A good design system is not a random palette plus a hero-section mock.42It is a shared decision layer that defines:43- what stays consistent,44- what may vary by surface,45- which neighboring skill owns the next implementation step,46- and what artifact downstream teams should follow.4748Do **not** let this skill become a catch-all for every frontend concern.49System governance stays here; specialist remediation routes out.5051## Instructions5253### Step 1: Classify the design-system request before generating examples54Pick one primary mode so the answer stays bounded.5556Modes:57- **Foundations mode** — tokens, scales, naming, motion, density, breakpoint policy58- **Cross-surface alignment mode** — landing page + dashboard + app-shell consistency, shared hierarchy, shared brand/system language59- **Primitive governance mode** — when the team needs rules for primitive naming, ownership, contribution boundaries, and promotion from product-local UI into shared primitives60- **System handoff mode** — package already-decided system rules into a concise artifact for design/dev execution61- **System review mode** — assess whether inconsistency is really a design-system problem or should route to a neighboring skill6263Quick frame:64```markdown65Design-system request:66- Surface: marketing site + logged-in dashboard67- Primary mode: cross-surface alignment68- System question: shared tokens and hierarchy, separate page-specific layouts69- Likely route-outs: component API details to ui-component-patterns, responsive verification to responsive-design70```7172### Step 2: Define the shared system boundary73Before changing tokens or page direction, decide what the system actually owns.7475Keep in `design-system` when the job is to define:76- token scales and naming rules77- primitive naming and contribution policy78- visual-language principles that should apply across many screens79- breakpoint or density policy that multiple surfaces should inherit80- motion principles and accessibility baseline that many components depend on8182Do **not** keep the work here when the question becomes:83- one reusable component API → `ui-component-patterns`84- one page’s layout breakage → `responsive-design`85- one accessibility failure or remediation plan → `web-accessibility`86- one broad UX/UI critique → `web-design-guidelines`8788### Step 3: Make the minimum shared decisions first89Do not start by dumping dozens of example tokens.9091For each system request, decide these shared layers first:921. **Foundations** — color, type, spacing, radius, elevation, motion, density, breakpoints932. **Primitive policy** — which primitives exist, how they are named, what is shared vs product-local943. **Surface rules** — how landing pages, dashboards, forms, nav, and data-heavy surfaces should differ while staying coherent954. **Accessibility baseline** — contrast expectations, focus visibility, reduced-motion posture, semantic expectations965. **Governance** — who can add/change tokens or primitives, what must be reviewed, and when work should route to another skill9798If a layer is unknown, say so and capture it as an open decision instead of inventing detail.99100### Step 4: Keep examples subordinate to the rules101Examples are useful only after the shared rules are explicit.102103Good example usage:104- show one token naming pattern105- show one page-system contrast between landing and dashboard surfaces106- show one primitive promotion rule107- show one motion baseline or accessibility baseline108109Bad example usage:110- dumping a full palette, TS token file, CSS animation sheet, and JSX screen mock before saying what problem the system is solving111112Use this rule:113- **rules first**,114- **one or two illustrative examples second**,115- **handoff packet last**.116117### Step 5: Route neighboring frontend work out early118Mixed requests are normal. Split them explicitly.119120Examples:121- if the team asks for button variants, slot structure, and controlled/uncontrolled behavior, keep the system naming/tokens here but route API design to `ui-component-patterns`122- if the team asks how cards collapse on mobile, keep shared breakpoint policy here but route layout adaptation to `responsive-design`123- if the team asks whether icon-only buttons meet keyboard/focus/label requirements, keep baseline a11y expectations here but route remediation to `web-accessibility`124- if the request is “audit this dashboard and tell us what feels off,” route the broad critique to `web-design-guidelines`125126Do not hide unclear ownership by calling everything “design-system work.”127128### Step 6: Produce the design-system packet129End with a concise artifact that downstream design/dev work can follow.130131Preferred format:132```markdown133# Design System Packet134135## Scope136- Products / surfaces covered:137- Primary mode:138- Shared system goal:139140## Foundations141- Color / semantic token rules:142- Typography / spacing / radius / elevation:143- Motion / density / breakpoint policy:144145## Primitive policy146- Shared primitives:147- Naming rules:148- What stays product-local:149150## Surface guidance151- Landing / marketing:152- Dashboard / app shell:153- Forms / workflows:154155## Accessibility baseline156- Contrast / focus / reduced motion / semantics:157158## Route-outs159- `ui-component-patterns`:160- `responsive-design`:161- `web-accessibility`:162- `web-design-guidelines`:163164## Open decisions165- ...166```167168If the user asks for a terse answer, keep the same sections but compress them into bullets.169170### Step 7: Only then add a small illustrative example when needed171Use at most one or two examples and keep them obviously subordinate to the packet.172173Healthy example shapes:174- semantic color tokens (`surface/default`, `surface/emphasis`, `text/muted`) instead of giant fixed palettes175- landing-page hero vs dashboard header comparison to show shared hierarchy but different density176- primitive promotion rule such as “shared button stays primitive; billing-upsell banner stays product-local”177178### Step 8: Finish with a boundary sentence179End with a sentence that prevents overlap drift.180181Examples:182- "This packet defines the shared UI system; component API extraction belongs in `ui-component-patterns`."183- "This packet sets breakpoint and density policy; page-level layout fixes belong in `responsive-design`."184- "This packet sets accessibility baseline expectations; remediation and verification belong in `web-accessibility`."185186## Examples187188### Example 1: shared landing page + dashboard system189**Input:** "We need one design system for our marketing site and B2B dashboard so tokens, typography, and motion feel related without making both surfaces identical."190191**Good response shape:**192- choose cross-surface alignment mode193- define shared foundations and surface-specific differences194- leave one compact design-system packet195- route component-family API design to `ui-component-patterns`196197### Example 2: token and primitive governance198**Input:** "Our team keeps adding random colors and spacing values. We need naming rules and a review policy for shared primitives."199200**Good response shape:**201- choose foundations or primitive governance mode202- define token/naming rules and review thresholds203- keep one or two naming examples only204- avoid turning the answer into a full page mock205206### Example 3: mixed system + responsive request207**Input:** "Should the dashboard and mobile web app share one breakpoint policy, and how should the layout collapse on small screens?"208209**Good response shape:**210- keep shared breakpoint/density policy in `design-system`211- route the actual collapse strategy and verification to `responsive-design`212- make the split explicit in the packet213214### Example 4: accessibility-heavy follow-up215**Input:** "We already have tokens, but our forms still fail focus visibility and error-state accessibility."216217**Good response shape:**218- note the design-system baseline briefly219- route the real remediation and manual verification to `web-accessibility`220- do not absorb the full a11y fix into this skill221222## Best practices2231. **Decide the mode first** so the skill stays bounded.2242. **Define shared rules before examples** to avoid overfitting on one mockup.2253. **Keep governance explicit**: token changes, primitive promotion, and ownership rules are part of the system.2264. **Use route-outs early** so `design-system` does not steal layout, component-API, accessibility, or broad-audit work.2275. **Leave a compact packet** another human or agent can follow.2286. **Keep the alias narrow**: `frontend-design-system` remains a compatibility redirect, not a peer canonical skill.229230## References231- [System modes](references/system-modes.md)232- [Token and governance checklist](references/token-and-governance-checklist.md)233- [Scope boundaries](references/scope-boundaries.md)234- [Design-system packet template](references/design-system-packet-template.md)235- [Compatibility alias](../frontend-design-system/SKILL.md)236- [Component architecture neighbor](../ui-component-patterns/SKILL.md)237- [Responsive layout neighbor](../responsive-design/SKILL.md)238- [Accessibility neighbor](../web-accessibility/SKILL.md)239- [Broad UI audit neighbor](../web-design-guidelines/SKILL.md)