Design System Skill
Use this skill whenever a task touches UI, layout, styles, tokens, or interaction states.
Canonical Sources
- •Primary source of truth:
.agent/design-system.md - •Project context:
.agent/context.md - •Implementation layer:
src/styles/tokens/andsrc/styles/utilities.css
If any source conflicts, follow .agent/design-system.md.
Required Workflow
1) Classify the task scope
- •
token-level(new/changed tokens) - •
component-level(UI component behavior/appearance) - •
layout-level(grid, spacing, rhythm) - •
interaction-level(states, focus, motion)
2) Apply system constraints
- •Use semantic tokens, not raw values.
- •Preserve light matrix with dark parity.
- •Respect max depth levels (
0..3only). - •Keep motion within allowed durations/easing.
- •Keep spacing/radius/shadow within system scales.
3) Validate mandatory interaction rules
For every interactive element, ensure:
- •default
- •hover (desktop)
- •focus-visible
- •active
- •disabled (if applicable)
4) Block forbidden patterns
- •Hardcoded colors in components.
- •Decorative animation.
- •New visual variants without semantic reason.
- •Truncation of critical/reading content.
- •Any UI exception outside system rules.
5) Report decisions in output
When finishing, include:
- •Section
Applied ruleswith the exact system constraints used. - •Section
Residual debtwith any mismatch that could not be resolved in this task.
For UI-related tasks, these two sections are mandatory.
Token Change Policy
Only add a new token when:
- •there is a real semantic gap
- •no equivalent token exists
- •reuse is expected in multiple contexts
- •it works in both light and dark
- •usage is documented
If those conditions are not met, reuse existing tokens.