ワンクリックで
css-audit
CSS quality audit. Checks for unused selectors, specificity issues, duplicate rules, and design token compliance.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
CSS quality audit. Checks for unused selectors, specificity issues, duplicate rules, and design token compliance.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Merges bookend agent reports into revised readiness, complexity, and decomposition plan. Produces the final evidence-backed assessment consumed by sprint-architect-agent.
Fast filesystem readiness scan — counts docs, source files, manifests, platform signals. Produces initial ReadinessReport for agent spawning decisions.
Scores proposal complexity against codebase surface. Uses proposal text analysis and readiness stats to determine decomposition tier and agent count.
Generation-time design taste for web UI work. Anti-cliche bans, layout and motion hard rules, and client-intent dials. Advisory only - shapes drafts; declared measured contracts remain the sole gate authority.
Rigorously reasons about definitions, proofs, and computations in algebra, analysis, discrete math, probability, linear algebra, and applied math. Verifies derivations, spots invalid steps, and states assumptions clearly. Use when solving or proving math problems, reviewing mathematical arguments, modeling with equations, interpreting statistics, or when the user mentions proofs, lemmas, theorems, integrals, series, matrices, optimization, or numerical methods.
Visual verification for interactive elements (popups, modals, tooltips). Clicks elements and captures screenshots for analysis. Bypasses MCP browser tool limitations with cross-origin CSS.
| name | css-audit |
| description | CSS quality audit. Checks for unused selectors, specificity issues, duplicate rules, and design token compliance. |
Audits CSS for unused selectors, specificity issues, duplicate declarations, and design token compliance.
{
"project_dir": "/path/to/project",
"css_dir": "src/styles/",
"html_dir": "src/",
"checks": ["unused", "specificity", "duplicates", "tokens"],
"design_tokens": "src/styles/tokens.css"
}
# Extract all CSS selectors
grep -rh "^[.#a-zA-Z]" src/styles/*.css | cut -d'{' -f1
# Check if used in HTML/JS
for selector in $selectors; do
grep -rq "$selector" src/ || echo "UNUSED: $selector"
done
// Flag high specificity selectors
// Ideal: 0,1,0 (single class)
// Warning: 0,2,0+ (multiple classes)
// Error: 1,0,0+ (ID selectors in component CSS)
const highSpecificity = selectors.filter(s =>
s.match(/#/) || s.split('.').length > 3
);
# Find duplicate property declarations
grep -rn "color:" src/styles/*.css | sort | uniq -d
grep -rn "font-size:" src/styles/*.css | sort | uniq -d
/* Check hardcoded values vs tokens */
/* BAD: color: #3498db; */
/* GOOD: color: var(--color-primary); */
grep -rn "#[0-9a-fA-F]\{3,6\}" src/styles/*.css
grep -rn "px" src/styles/*.css | grep -v "var(--"
{
"skill": "css-audit",
"status": "pass|warning|fail",
"files_audited": 12,
"selectors_total": 156,
"checks": {
"unused": {
"passed": false,
"count": 8,
"selectors": [
{
"selector": ".legacy-header",
"file": "src/styles/header.css",
"line": 45
}
]
},
"specificity": {
"passed": true,
"high_specificity": []
},
"duplicates": {
"passed": false,
"count": 3,
"duplicates": [
{
"property": "color: #333",
"locations": [
"src/styles/base.css:12",
"src/styles/components.css:89"
],
"suggestion": "Extract to var(--color-text)"
}
]
},
"tokens": {
"passed": false,
"violations": [
{
"file": "src/styles/card.css",
"line": 23,
"value": "#3498db",
"suggestion": "Use var(--color-primary)"
}
]
}
},
"summary": {
"unused_selectors": 8,
"high_specificity": 0,
"duplicate_rules": 3,
"hardcoded_values": 5
},
"suggestions": [
"Remove 8 unused selectors to reduce bundle size",
"Extract repeated color #333 to design token"
],
"errors": [],
"next_action": "proceed|cleanup"
}
| Check | What it Validates | Severity |
|---|---|---|
unused | Selectors not referenced in HTML/JS | LOW |
specificity | Selectors below threshold | MEDIUM |
duplicates | No repeated property values | LOW |
tokens | Design token compliance | MEDIUM |
important | Avoid !important | MEDIUM |
vendor_prefix | Autoprefixer handles prefixes | LOW |
Any specificity violations?
YES → status: "warning"
Token compliance below 80%?
YES → status: "warning"
More than 20% unused selectors?
YES → status: "warning"
All checks pass?
YES → status: "pass", next_action: "proceed"
Full CSS audit:
{
"project_dir": "/projects/oxygen_site",
"css_dir": "src/styles/",
"html_dir": "src/",
"checks": ["unused", "specificity", "duplicates", "tokens"],
"design_tokens": "src/styles/variables.css"
}
Quick unused selector check:
{
"project_dir": "/projects/oxygen_site",
"css_dir": "src/styles/",
"html_dir": "src/",
"checks": ["unused"]
}
Token compliance only:
{
"project_dir": "/projects/oxygen_site",
"css_dir": "src/styles/",
"checks": ["tokens"],
"design_tokens": "src/styles/tokens.css"
}