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/simple-local-llm-server 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
分批提交 Git 变更的完整工作流。当用户说"提交这个文件"、"帮我 commit"、"分批提交"、"整理提交计划"、"staged 的文件"、"git 提交"时触发
tools
从用户给出的文档片段中,提取"进阶必知"的深层知识,当用户提到"太简单了,给我几条秘密","面试必备的那种","八股文进阶"时触发
data-ai
批量给技能目录添加 disable-model-invocation,节省 token 开销。只保留需要 LLM 生成/分析/决策的技能有模型调用能力。
tools
open understand dashboard for user