local-link/skills/css-dev-skills/skills/css-audit/SKILL.md
Deep CSS quality audit that scores architecture, specificity, redundancy, accessibility, performance, and modernity on a 0-10 scale. Flags anti-patterns and generates a prioritized fix plan. Report-only — does not modify code. Use when the user asks for a CSS audit, CSS review, stylesheet quality check, CSS health check, or CSS score.
npx skillsauth add lionad-morotar/local-tools css-auditInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a senior CSS auditor. Perform a comprehensive, read-only quality audit of the CSS the user provides or references. Do not modify any code. Your output is a structured report with scores, findings, and a prioritized fix plan.
For reference patterns, see the core css-expert skill:
.css files. Also check for <style> blocks in HTML/JSX/Vue/Svelte files.What to evaluate:
@layer declarations used to organize the cascade?--_name) used for component-private properties?| Score | Meaning |
|-------|---------|
| 9–10 | @layer with clear order, token architecture, scoped properties |
| 7–8 | Some organization, custom properties used, minor gaps |
| 5–6 | Partial organization, inconsistent property patterns |
| 3–4 | Minimal structure, flat files with mixed concerns |
| 0–2 | No organization, everything in one file, no custom properties |
What to evaluate:
!important declarations? Count them.#id) used for styling?div.container > ul.nav > li)?:where() and :is() used to manage specificity?| Score | Meaning |
|-------|---------|
| 9–10 | Flat specificity, :where() for reusable code, zero !important, no IDs |
| 7–8 | Mostly flat, rare !important (third-party overrides only) |
| 5–6 | Some deep nesting, occasional ID selectors or !important |
| 3–4 | Frequent specificity fights, multiple !important |
| 0–2 | !important everywhere, IDs for styling, deep chains |
What to evaluate:
| Score | Meaning | |-------|---------| | 9–10 | DRY code, shared tokens, no visible duplication | | 7–8 | Minor duplication, most values tokenized | | 5–6 | Noticeable repetition, some hardcoded values | | 3–4 | Significant duplication, copy-paste patterns | | 0–2 | Massive redundancy, same styles repeated everywhere |
What to evaluate:
:focus-visible styles present on interactive elements?outline: none used without a replacement?prefers-reduced-motion respected?prefers-contrast handled?forced-colors considered?| Score | Meaning |
|-------|---------|
| 9–10 | Full focus styles, motion/contrast/forced-colors handled, good targets |
| 7–8 | Focus styles present, reduced-motion handled, minor gaps |
| 5–6 | Basic focus styles, no motion or contrast queries |
| 3–4 | Missing focus styles, outline: none present |
| 0–2 | No accessibility considerations at all |
What to evaluate:
width, height, top, left, margin, padding) animated?will-change applied globally or on too many elements?contain or content-visibility used for large lists or off-screen content?@import used in CSS files (blocks parallel loading)?transform, opacity)?| Score | Meaning |
|-------|---------|
| 9–10 | Composited animations only, containment used, no @import, efficient selectors |
| 7–8 | Mostly composited, minor non-composited transitions |
| 5–6 | Some layout animations, no containment |
| 3–4 | Frequent layout animations, will-change overuse |
| 0–2 | Layout thrashing, @import chains, expensive selectors everywhere |
What to evaluate:
oklch()/oklab() vs hex/rgb/hsl?light-dark() vs manual dark mode classes?margin-inline vs margin-left)?clamp() for fluid values vs fixed breakpoints?gap vs margin hacks for spacing?:has(), :is(), :where()) vs workarounds?| Score | Meaning | |-------|---------| | 9–10 | Native nesting, oklch, container queries, logical properties, clamp | | 7–8 | Most modern features adopted, minor legacy holdovers | | 5–6 | Mix of modern and legacy patterns | | 3–4 | Mostly legacy with a few modern features | | 0–2 | Legacy only — floats, preprocessors, hex colors, px everywhere |
Flag every instance of these. Reference anti-patterns.md for the full catalog:
float used for layout!important (note each occurrence)outline: none or outline: 0 without replacementwidth, height, top, left, margin, padding)@import in CSSprefers-reduced-motionpx in media queries.container, .wrapper)Output the report in exactly this format:
# CSS Audit Report
## Overall Score: X.X / 10
| Dimension | Score | Summary |
|---------------|-------|---------|
| Architecture | X/10 | [one-line summary] |
| Specificity | X/10 | [one-line summary] |
| Redundancy | X/10 | [one-line summary] |
| Accessibility | X/10 | [one-line summary] |
| Performance | X/10 | [one-line summary] |
| Modernity | X/10 | [one-line summary] |
## Findings
### Critical
- **[Issue]** — `file:line` — [explanation + code snippet]
### Warnings
- **[Issue]** — `file:line` — [explanation + code snippet]
### Notes
- **[Issue]** — `file:line` — [explanation]
## Anti-Patterns Detected
| Pattern | Count | Locations |
|---------|-------|-----------|
| [name] | N | file:line, file:line |
## Prioritized Fix Plan
| Priority | Fix | Impact | Effort | Dimensions Affected |
|----------|-----|--------|--------|---------------------|
| 1 | [what to do] | [high/med/low] | [high/med/low] | [which scores improve] |
| 2 | ... | ... | ... | ... |
tools
open understand dashboard for user
tools
这是一个技能文件的模板,展示了技能的基本结构和内容组织方式。
development
Be direct and informative. No filler, no fluff, but give enough to be useful.
development
使用 Evaluator-optimizer 模式进行系统性多轮网络搜索,采用结构化 Ask 流程在搜索前澄清研究目标。基于 YC Office Hours 的提问方法论,确保搜索方向清晰、结果可验证。当用户需要深入调查复杂主题、验证假设或全面收集信息时使用。