audit-tokens
Validate design token coverage and consistency (--grove-* CSS variables)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Validate design token coverage and consistency (--grove-* CSS variables)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Scaffold a REST API endpoint with hexagonal layers and integration tests
Scaffold a React component with Vitest tests (TDD-first)
Scaffold a new Shell extension with hexagonal layers and TDD
Add a sub-feature within an existing Shell extension
Scaffold a SQL migration with RLS policy, rollback plan, and test seed data
Scaffold a Tauri IPC command with full round-trip (Rust handler, TS types, React hook, tests)
| name | audit-tokens |
| description | Validate design token coverage and consistency (--grove-* CSS variables) |
| user_invocable | true |
Validate that design tokens (--grove-* CSS custom properties) are used
consistently and that components avoid hardcoded styling values.
Read src/app.css and collect every --grove-* custom property declared in
:root. Record the full list as the declared set.
For each token in the declared set, search src/**/*.tsx files for any
reference to that token name. A token is orphaned if it appears in
src/app.css but is never referenced in any .tsx file.
Report each orphaned token with its declaration location.
Search src/**/*.tsx for hex color patterns matching #[0-9a-fA-F]{3,8}.
Exclude from findings:
.test.tsx or .spec.tsx// or /* */)d= attribute valuesurl(#...) references (SVG filter/gradient refs)Each remaining match is a finding — components must use var(--grove-*) tokens
instead of raw hex values.
Search all src/**/*.tsx and src/**/*.css for CSS custom property
declarations or references that do NOT use the --grove- prefix.
Valid --grove- semantic categories: text, surface, border, accent,
space, radius, shadow, font.
Flag any --grove- token that does not fit these categories, or any non-grove
custom property used in component styles.
=== DESIGN TOKEN AUDIT ===
Summary
| Metric | Value |
|-----------------|--------|
| Status | PASS/FAIL |
| Total tokens | N |
| Referenced | N |
| Orphaned | N |
| Hardcoded hex | N |
| Naming issues | N |
Findings
| Severity | Check | Location | Issue |
|----------|-----------------|-----------------------|--------------------------|
| HIGH | Hardcoded hex | src/features/Foo.tsx:42 | #ff0000 — use token |
| MEDIUM | Orphaned token | src/app.css:15 | --grove-unused never ref |
| LOW | Token naming | src/bar.css:8 | --custom-bg non-grove |
=== RESULT: PASS/FAIL ===
src/ tree — do not sample