Skip to content
Back to skills

Design System

ASecurity

Design system engineering — design tokens as code (primitive, semantic and component tiers, themes and modes), a token pipeline to platform outputs, the component library and its API conventions, a component catalogue with documented states, contribution and review of new components, versioning, deprecation and codemods, adoption and drift detection. Use to build, extend or govern a project's design system or component library (design system, design tokens, component library, theming, dark mo...

  • 5 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added December 4, 2026
ai-agentsgotestingapi

Works with

  • api

Security analysis

A100/100

Scanned December 5, 2026

npx -y skills add vectora-os/kit --skill design-system --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Design System?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Design System
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectora-os-design-system/badge)](https://www.skillsdirectory.com/skills/vectora-os-design-system)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: design-system
description: Design system engineering — design tokens as code (primitive, semantic and component tiers, themes and modes), a token pipeline to platform outputs, the component library and its API conventions, a component catalogue with documented states, contribution and review of new components, versioning, deprecation and codemods, adoption and drift detection. Use to build, extend or govern a project's design system or component library (design system, design tokens, component library, theming, dark mode, Storybook, component API).
metadata:
  category: quality
---

# Design system

## Purpose

Give every screen one source of visual values and one set of components, so consistency comes from reuse rather than from review. `ui-design` applies the system; this skill builds and governs it.

**Use when:** introducing tokens or a component library, adding a theme or mode, adding or changing a shared component, deprecating one, measuring drift from the system.

**Not for:** applying the system on a screen (`ui-design`), choosing a third-party component library or catalogue tool (an ADR via `architecture-decisions`), WCAG conformance (`accessibility`).

## Inputs

- Existing styles, components and screens; the brand or design source, if the project has one.
- Target platforms and themes (light, dark, high contrast, brands).
- Consumers: apps and teams that use the library.

## Outputs

- Token sources and generated platform outputs.
- Components with a documented API, states and usage guidance in the catalogue.
- Version, changelog and migration notes for every breaking change.
- A drift report: raw values and local copies of system components in consuming code.

## Read first

- [Project Brain](../../../project-brain/README.md) — `npm run brain -- query "design system"` for prior decisions, patterns and anti-patterns.
- [UI design](../ui-design/SKILL.md) — the rules components must satisfy, including the state contract.
- [Accessibility standard](../../../standards/accessibility.md) — every component meets it in every state and theme.
- [Versioning standard](../../../standards/versioning.md) — how the library is versioned and released.
- The project's design system documents, if the project has them (for example `DESIGN.md`).

## Steps

1. **Inventory.** Collect the values and components actually in use: colours, spacing, type, radius, shadow, motion, and repeated UI patterns. Group near-duplicates.
   Done when every distinct value has a count and near-duplicates are mapped to one candidate token.
2. **Tokens in tiers.** Primitive tokens hold raw values (palette, scale steps); semantic tokens name a role (`text-muted`, `surface-raised`, `border-focus`) and point to primitives; component tokens exist only where a component needs to diverge. Components use semantic or component tokens, never primitives. Themes and modes swap semantic mappings, not component code.
   Done when no component references a primitive or raw value, and switching theme changes only token mappings.
3. **Pipeline.** Tokens live in one source format and are generated into each platform output (CSS custom properties, theme objects, native resources). Generated files are not edited by hand; the build fails when outputs are stale. A new tool for this is an ADR.
   Done when one command regenerates every output and CI detects stale outputs.
4. **Component API.** Each shared component has a small, consistent API: the same names for the same concepts across components (size, variant, disabled, loading), composition over configuration flags, native attributes passed through, accessible by default (name, role, keyboard, focus). It implements the full state contract from `ui-design`.
   Done when the component's props follow the library's naming conventions and every applicable state is implemented.
5. **Catalogue.** Every component has an entry with each variant and state, usage guidance (when to use, when not, which neighbour to use instead) and a code example. Entries double as fixtures for visual and accessibility checks (`visual-regression-testing`, `accessibility`).
   Done when every variant and state renders in the catalogue and is covered by the project's existing visual and accessibility checks; a missing check type is recorded as a gap and a question for the owner (a new tool goes through an ADR).
6. **Contribution.** A new shared component follows the project's contribution rule, if it has one; otherwise the rule is a question for the owner. A useful default to propose: real consumers in more than one place or an approved design, otherwise the component stays local. Proposals show the use cases, the API and why existing components do not fit; review checks API consistency, tokens only, states, accessibility and catalogue entry.
   Done when the proposal names its consumers, meets the contribution rule and passes the checks below.
7. **Versioning and deprecation.** Changes to tokens or component APIs follow the [versioning standard](../../../standards/versioning.md); version bumps and changelog mechanics per `semantic-versioning`. A breaking change ships with migration notes and, where mechanical, a codemod. A deprecation has a dated announcement, migration notes and the notice period the owner approved (a question for the owner if none is set); deprecated items warn through a console, lint or build warning; removal happens only in a major release.
   Done when the changelog lists every breaking change with its migration path, and every deprecated token or prop has, in the plan or the change itself: a warning at use, migration notes written out (not only a link to the standard), a codemod or the reason there is none, a date, a notice period and removal in a named major release.
8. **Adoption and drift.** Measure use of the system in consuming code: raw values where tokens exist, local copies of system components, overrides of component internals. Raise drift as tasks, not as silent fixes in unrelated changes.
   Done when the drift report lists findings with `file:line` and owners.

## Best practices

- Name semantic tokens by role, not by appearance (`danger`, not `red`).
- Fewer tokens that are actually used beat a complete scale nobody follows.
- Dark mode is a mapping of semantic tokens, designed and contrast-checked, not an automatic inversion.
- Rules in the linters the project already has that flag raw values and imports of internal component parts keep drift low.

## Common mistakes

- Components reading primitive tokens, so themes need code changes.
- A boolean prop for every visual tweak instead of variants or composition.
- Promoting a one-off component to the library because it might be reused.
- A catalogue that shows only the default state.

## Example

Inventory finds 23 greys and 9 border radii in an app → 9 neutral primitives and 4 radius steps; semantic layer `text`, `text-muted`, `surface`, `surface-raised`, `border`, `border-focus`; dark theme defined as a second mapping and contrast-checked; `Button` gets `variant`, `size`, `loading`; old `isPrimary` prop deprecated with a codemod and removed in the next major.

## Reusable prompt

```text
Apply the Design system skill (.agents/skills/design-system/SKILL.md).
Context: {{existing styles and components; design source; platforms and themes; consumers}}
Constraints: {{allowed files; approved ADRs; versioning rules}}
Inventory values, define tiered tokens and the pipeline, shape component APIs and catalogue entries, and plan versioning and drift detection.
Return: tokens and outputs, component APIs, catalogue entries, changelog and migration notes, drift report.
Cite evidence (file:line, command output, source) for every claim; list open questions separately.
```

## Checks

- [ ] Components use semantic or component tokens only.
- [ ] Token outputs are generated and checked for staleness in CI.
- [ ] Every component variant and state is in the catalogue and covered by the project's visual and accessibility checks, or the gap is reported.
- [ ] Breaking changes have migration notes; deprecations have a date and an approved notice period and precede removals.
- [ ] Any new tool or dependency for tokens or the catalogue has an ADR.

## Out of scope

- Brand identity and visual direction — the owner's decision.
- Screen-level layout and polish — `ui-design`.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.