design-system-conformance
Check a UI surface against the project's design system — tokens, components, patterns; flag bespoke values that should be tokens.
- License 许可
- MIT
- 最近更新
- 2026-10-29
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- design-system-conformance
- description
- Check a UI surface against the project's design system — tokens, components, patterns; flag bespoke values that should be tokens.
03 SKILL.md 正文
design-system-conformance
Walk a UI surface against the project's design system. Output is per-deviation findings: what bespoke value should become a token, or which off-system component should be replaced.
Mode: analytical — judgment inside a fixed frame. Keep the output shape; every verdict cites its evidence; unknowns are marked [TBD] or [VERIFY], never filled in.
When to use
- A new screen is being built and the team wants to keep design drift down.
- A design system audit reveals "we have 14 shades of gray". Pull this skill on the worst-offender screens first.
Inputs
- The UI surface (route, component path, or screenshot + computed styles).
- The design system reference (tokens / components / patterns). If the project has none, surface that and stop — drift can't be measured against nothing.
Procedure
- Tokens: scan for any hardcoded
color,font-size,font-family,font-weight,line-height,border-radius,box-shadow,spacing(margin/padding). Each hardcoded value is a finding unless it's documented as an exception. - Components: scan for native
<button>,<input>,<select>,<a>styled bespoke. If the design system ships a<Button>component, the page should use it. - Patterns: density (table row height, list spacing), modal patterns, form patterns. A novel modal pattern on this one screen is almost always wrong.
- Iconography: icons match the system's set + size + stroke weight. A new icon should join the system, not live on one screen.
- Spacing scale: every margin/padding pulls from the spacing scale (e.g. 4 / 8 / 12 / 16 / 24 / 32).
padding: 13pxis a finding — pick 12 or 16. - Per finding: name the element, the bespoke value, and the system value it should map to.
Output
Design-system conformance: <surface>
Tokens (out-of-system):
- .price color: #2D5BFF → use `color.brand.500` (#2563EB).
Note: bespoke value is darker than
the token; if intentional, ask the
DS team to add `color.brand.600`.
- .card padding: 13px 14px → use `space.3 space.4` (12px 16px).
- .header font-size: 22px → use `text.lg` (20px) or `text.xl` (24px).
Picking 22 splits the scale.
Components (bespoke instead of system):
- .my-button is a styled <a>. Replace with <Button variant="primary">
from @example/ds.
- .my-modal: bespoke modal pattern. Use <Modal> from the system; if
a needed feature is missing, file an issue against the DS, don't
inline a new one.
Patterns:
- Form labels are placeholders, not labels. DS rule + WCAG. Move to
real labels above the field.
Iconography:
- .icon-trash is a stroke-weight-1 icon imported from Heroicons. DS
set is stroke-weight-1.5 from Lucide. Replace.
Spacing scale violations: 4 elements use values off the scale (13, 14,
22, 33). All should snap to the nearest scale value.
Quality bar
- Every finding cites the element + the bespoke value + the system value it should map to.
- If the system doesn't have a value to map to, that's a missing-token finding for the design system team — name it.
- Spacing scale check always run; off-scale values are a common drift source.
- Don't approve "we'll fix it later" without a tracked issue.
Anti-patterns to avoid
- "Looks fine" without running the token scan.
- Adding bespoke values to "match the system spirit". Either it's in the system or it's a missing-token issue.
- Letting one screen invent a new pattern that other screens will copy.
- Migrating off the design system because "the components don't fit". Almost always cheaper to extend the system.
04 同仓库更多 Skills
runbook
Write or refresh an operational runbook for an alert/symptom; structured as TL;DR + Pre-checks + Steps + Verification + Rollback + Escalation.
rfc
Draft a lightweight design RFC to docs/rfcs/<slug>.md; Summary, Motivation, Detailed design, Drawbacks, Alternatives, Unresolved questions. A proposal to debate, not a recorded decision (adr).
editorial-pass
Review and tighten prose in a Markdown artifact for a target tone (terse, formal, friendly) without dropping information; preserve quotations and load-bearing constraints.
architecture-review-facilitation
Run an architecture review as a process — entry criteria, reviewer checklist, decision log, and follow-up actions — pairing the design artifact with a red-team pass.
architecture-doc
Write a C4-style architecture document; System Context + Containers (+ Components when interesting) with mermaid diagrams. Describes structure, not a decision (adr) or proposal (rfc).
adr
Write an Architecture Decision Record (Michael Nygard format) to docs/adrs/NNNN-<slug>.md; frontmatter validated by the ADR artifact schema. Records a made decision, not a proposal to debate (rfc).