agentleFS
ViviBeriViviBeri/webcraft-pro/skills/design-system-architecture/SKILL.md

design-system-architecture

Skill11 starsChanged 11 days agoMITView on GitHub

Architect a maintainable, accessible design system for a website or product interface. Use when defining semantic design tokens, typography and spacing scales, component foundations, theme variants, documentation, or governance for a new or existing design system.

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. About 0 are common, 16 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈16

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create a small, coherent design system that makes common interface decisions reusable without forcing every page into the same composition.

    line 10
  2. Distinctive:

    Do not replace a working design system just to introduce a preferred naming convention or library.

    line 23
  3. Distinctive:

    Create semantic tokens for:

    line 27
  4. Distinctive:

    Use three layers when they improve clarity:

    line 41
  5. Distinctive:

    Avoid creating component tokens for every property.

    line 47
  6. Distinctive:

    Default, hover, focus, active, disabled, loading and error states.

    line 88
  7. Distinctive:

    Test coverage and known limitations.

    line 91
  8. Distinctive:

    Do not create a custom component where native HTML already provides the required behavior.

    line 93
  9. Distinctive:

    Use semantic tokens to support theme changes.

    line 97
  10. Distinctive:

    Prefer fluid layout primitives and content-driven breakpoints.

    line 99
  11. Distinctive:

    Ensure the design system handles:

    line 101
  12. Distinctive:

    Check token references for undefined or obsolete values.

    line 118
  13. Distinctive:

    Test component states and keyboard behavior.

    line 120
  14. Distinctive:

    Verify contrast for actual foreground/background pairs.

    line 121
  15. Distinctive:

    Test responsive and theme variants.

    line 122
  16. Distinctive:

    Run the existing visual and component test suites.

    line 123

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Design System Architecture

Objective

Create a small, coherent design system that makes common interface decisions reusable without forcing every page into the same composition. The system must support product identity, content variation, responsive behavior, accessibility and maintainable implementation.

1. Audit before designing

Inspect the existing codebase and identify:

  • Current CSS strategy, component library and build constraints.
  • Existing tokens, variables, themes and naming conventions.
  • Repeated components and inconsistent one-off values.
  • Brand assets, typography licenses and supported languages.
  • Required themes, contrast modes and user preferences.
  • Existing accessibility and browser support requirements.

Do not replace a working design system just to introduce a preferred naming convention or library.

2. Define design foundations

Create semantic tokens for:

  • Color roles: canvas, surface, elevated surface, primary text, secondary text, border, action, focus, status and overlay.
  • Typography: family, size, weight, line height, letter spacing and content measure.
  • Spacing: a documented scale that supports both compact and spacious contexts.
  • Layout: content widths, gutters, grid behavior and breakpoints.
  • Shape: radius, border width and divider treatment.
  • Depth: elevation and overlay levels, used sparingly.
  • Motion: duration, easing and distance, with reduced-motion alternatives.

Separate primitive values from semantic aliases. A component should consume a role such as --color-surface-raised, not an arbitrary palette index.

3. Design token architecture

Use three layers when they improve clarity:

  1. Primitive tokens: raw values such as a color ramp or spacing unit.
  2. Semantic tokens: roles such as text, surface, border and action.
  3. Component tokens: narrowly scoped overrides for components with a real need.

Avoid creating component tokens for every property. Prefer semantic tokens until a component needs an independently governed variation.

Example:

:root {
  --palette-ink-900: #17212b;
  --palette-paper-50: #f7f6f2;
  --palette-blue-700: #245a78;

  --color-canvas: var(--palette-paper-50);
  --color-text: var(--palette-ink-900);
  --color-action: var(--palette-blue-700);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
}

Values are illustrative only. Measure contrast and choose colors for the actual product.

4. Establish component foundations

Prioritize components by reuse and interaction risk:

  • Buttons and links.
  • Form controls and validation feedback.
  • Navigation and disclosure patterns.
  • Cards and content containers.
  • Dialogs and overlays.
  • Alerts, status messages and empty states.

For each component, document:

  • Purpose and when not to use it.
  • Semantic element and accessible name requirements.
  • Supported variants and sizes.
  • Default, hover, focus, active, disabled, loading and error states.
  • Responsive behavior and content constraints.
  • Keyboard and assistive-technology expectations.
  • Test coverage and known limitations.

Do not create a custom component where native HTML already provides the required behavior.

5. Support themes and responsive contexts

Use semantic tokens to support theme changes. Check text, borders, focus indicators, charts and disabled states in every theme.

Prefer fluid layout primitives and content-driven breakpoints. Avoid encoding device names as layout rules when content width is the actual constraint.

Ensure the design system handles:

  • Long translated labels.
  • User text resizing and browser zoom.
  • High-contrast or forced-color modes.
  • Reduced motion.
  • Touch and pointer input.
  • Dense and spacious content contexts.

6. Document and govern

Provide a token reference, component usage guidance and contribution rules. Define how a token or component is proposed, reviewed, deprecated and removed.

A change should identify affected components and pages. Avoid silent token renames that break consuming applications.

7. Verify

  • Check token references for undefined or obsolete values.
  • Compare representative pages before and after a token change.
  • Test component states and keyboard behavior.
  • Verify contrast for actual foreground/background pairs.
  • Test responsive and theme variants.
  • Run the existing visual and component test suites.
  • Record breaking changes and migration steps.

Deliverables

  1. Existing-system audit.
  2. Token taxonomy and naming rules.
  3. Component inventory and state matrix.
  4. Theme and responsive strategy.
  5. Documentation and governance approach.
  6. Verification evidence and migration notes.

Completion checklist

  • Existing implementation and constraints were inspected.
  • Tokens are semantic and have clear ownership.
  • Primitive, semantic and component layers are not needlessly duplicated.
  • Components document semantics, states and usage constraints.
  • Themes, zoom, localization and reduced motion are considered.
  • Token changes are verified against representative pages.
  • Governance and deprecation rules are documented.

Common AI failure mode

Failure: An agent creates a token for every observed value or component property, then adds theme-specific overrides and one-off aliases without ownership, semantic roles, or migration rules.

Why it matters: Token proliferation creates multiple names for the same decision, makes theme behavior unpredictable, and encourages components to depend on implementation-specific values. A theme or brand change can leave stale references, unreadable contrast, and inconsistent component states across pages.

Prevention: Audit existing values and repeated decisions before adding tokens. Keep primitive, semantic, and component layers distinct; create component tokens only for a real independently governed need. Give each token a role, owner, supported theme behavior, and deprecation path. Validate references for duplicates and undefined values, compare representative pages across themes and states, and test contrast, focus, zoom, localization, and reduced motion before accepting a token migration. Document intentional exceptions rather than adding aliases to silence individual mismatches.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.