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.
In this repository46 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- accessibility-automationSkill
- accessibility-reviewSkill
- accessible-componentsSkill
- accessible-motionSkill
- animation-performanceSkill
- anti-slop-uiSkill
- api-securitySkill
- authentication-sessionsSkill
- authorization-access-controlSkill
- component-engineeringSkill
- core-web-vitalsSkill
- design-directionSkill
- document-head-seoSkill
- font-performanceSkill
- forms-and-validationSkill
- frontend-architectureSkill
- gsap-fundamentalsSkill
- icon-engineeringSkill
- image-asset-optimizationSkill
- independent-reviewSkill
- interactive-storytellingSkill
- javascript-performanceSkill
- keyboard-focusSkill
- modern-cssSkill
- motion-design-systemsSkill
- network-cachingSkill
- performance-auditingSkill
- performance-testingSkill
- premium-landing-pagesSkill
- quickstart-onboardingSkill
- rendering-performanceSkill
- responsive-engineeringSkill
- screen-reader-testingSkill
- scrolltrigger-experiencesSkill
- secrets-configurationSkill
- secure-application-designSkill
- secure-input-outputSkill
- security-reviewSkill
- security-testingSkill
- semantic-accessibilitySkill
- visual-design-reviewSkill
- visual-reference-analysisSkill
- wcag-auditingSkill
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
- Distinctive: line 10
Create a small, coherent design system that makes common interface decisions reusable without forcing every page into the same composition.
- Distinctive: line 23
Do not replace a working design system just to introduce a preferred naming convention or library.
- Distinctive: line 27
Create semantic tokens for:
- Distinctive: line 41
Use three layers when they improve clarity:
- Distinctive: line 47
Avoid creating component tokens for every property.
- Distinctive: line 88
Default, hover, focus, active, disabled, loading and error states.
- Distinctive: line 91
Test coverage and known limitations.
- Distinctive: line 93
Do not create a custom component where native HTML already provides the required behavior.
- Distinctive: line 97
Use semantic tokens to support theme changes.
- Distinctive: line 99
Prefer fluid layout primitives and content-driven breakpoints.
- Distinctive: line 101
Ensure the design system handles:
- Distinctive: line 118
Check token references for undefined or obsolete values.
- Distinctive: line 120
Test component states and keyboard behavior.
- Distinctive: line 121
Verify contrast for actual foreground/background pairs.
- Distinctive: line 122
Test responsive and theme variants.
- Distinctive: line 123
Run the existing visual and component test suites.
≈ “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.
Files
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:
- Primitive tokens: raw values such as a color ramp or spacing unit.
- Semantic tokens: roles such as text, surface, border and action.
- 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
- Existing-system audit.
- Token taxonomy and naming rules.
- Component inventory and state matrix.
- Theme and responsive strategy.
- Documentation and governance approach.
- 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.
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
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.

