/design-token-usage:design-token-usage [scope]from design-token-usage
Reviews SwiftUI code for raw color/font literals that bypass the project's own design-token system (asset-catalog color sets, typography extensions), and — with approval — mechanically replaces matched literals with the correct token. Use when auditing design-system compliance, before merging new views, or cleaning up accumulated raw-literal drift.
Ships in design-token-usage. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
ICT iOS Team — This skill reviews code and, with approval, mechanically replaces raw color/font literals with the project's existing design tokens. It never invents a new token, and never guesses when a literal has no clear match — ambiguous cases are always flagged for design follow-up, not silently resolved.
Ask the developer which scope to review, and wait for their answer before scanning anything:
Find the project's actual design-token definitions — don't assume names, discover them:
.xcassets) with named color sets, typically organized into semantic groups (brand palette, neutral scale, semantic states like danger/success/warning/info, each often with role variants like border/hover/main/pressed/surface).Font extension or dedicated typography file defining named text styles, often backed by bundled custom font files.If neither is found, tell the developer no token system exists yet and stop — there's nothing to enforce compliance against.
Scan the chosen scope using the rules in ${CLAUDE_SKILL_DIR}/references/detection-rules.md. In summary, flag:
Color.red/white/black/gray/... and any other named-literal Color case.Color(red:green:blue:) / UIColor(red:green:blue:alpha:) and hex-string color initializers..font(.system(size:...)) and other literal font constructions that bypass the typography tokens.Color.brandPrimary, .font(.baseBody)) — that's correct usage, not a violation.Follow ${CLAUDE_SKILL_DIR}/references/token-mapping-strategy.md to propose a replacement for each hit:
Present findings as a table:
| File | Line | Literal | Suggested Token | Confidence |
|---|
Follow it with a summary line: total files scanned, total findings, matched vs. unmatched count.
Do not replace any literal until the developer explicitly approves — and approval can be per-finding, not just all-or-nothing, since confidence varies across the table.
Replace only the approved literal with its exact matched token accessor. Never rename, restructure, or add new entries to the token source itself — this skill consumes the existing token system, it doesn't extend it.
Always end the run with: what was scanned, how many literals were replaced, and the full list of unmatched findings left for a human/design decision — these are not failures, just cases this skill correctly declined to guess on.
${CLAUDE_SKILL_DIR}/references/detection-rules.md — literal patterns to flag, with real code examples of what counts as a violation vs. correct token usage.${CLAUDE_SKILL_DIR}/references/token-mapping-strategy.md — how to map a raw literal to the nearest token, and when to mark a finding unmatched instead.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub ictech-projects/ios-claude-skills --plugin design-token-usage