Remove unused CSS rules

SkillDev tools

unused-css is a skill for AI agents that guides them through finding and removing unused CSS rules. It covers how to identify dead selectors with tools like PurgeCSS, UnCSS, or Chrome DevTools Coverage, and reminds the agent to check the rendered layout across breakpoints and interaction states before proposing a fix.

Available today. Use it from your connected AI after setup.

Have the skill file available to the agent alongside its references/rule.md file.

Then ask your AI: use the Remove unused CSS rules skill

What your AI can do with it

  • Identify unused CSS selectors with PurgeCSS, UnCSS, or Chrome DevTools Coverage
  • Review stylesheets, component styles, and responsive states for dead code
  • Flag exact selectors, declarations, or breakpoints that violate the rule
  • Safelist dynamic classes and framework-specific patterns
  • Integrate unused CSS removal into a build pipeline (Webpack, Vite, PostCSS)
  • Explain how unused CSS bloats bundle sizes and slows page loading

Getting started

  1. Have the skill file available to the agent alongside its references/rule.md file.
  2. Ask the agent to review a stylesheet or component styles for unused rules.
  3. Provide access to the rendered UI so the agent can check layout across breakpoints and interaction states.
  4. Let the agent propose removal steps, including safelisting dynamic classes before changes are applied.

What this skill tells your AI

The instructions your AI receives, as published by thedaviddias/front-end-checklist in skills/unused-css/SKILL.md and read by ahel’s review.

Most projects use only 10-25% of their CSS—removing the rest can cut bundle sizes by 75%+ and dramatically improve load times.

Quick Reference

  • Use PurgeCSS or UnCSS to remove unused selectors
  • Integrate into build pipeline (Webpack, Vite, PostCSS)
  • Safelist dynamic classes and framework-specific patterns
  • Typical reduction: 50-90% for CSS framework users

Check

Use tools like PurgeCSS, UnCSS, or Chrome DevTools Coverage to identify and remove unused CSS to reduce bundle size and improve performance.

Fix

Implement automated unused CSS removal in your build process and regularly audit CSS files to eliminate dead code and unused selectors.

Explain

Explain how unused CSS bloats bundle sizes, slows page loading, and how modern tools can safely remove unused styles without breaking functionality.

Code Review

Review stylesheets, component styles, and responsive states related to Remove unused CSS rules. Flag exact selectors, declarations, or breakpoints that violate the rule in the rendered UI.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/en/rules/css/unused-css

Signals

GitHub stars
74k
Forks
7k
Last commit
Aug 2026

ahel review

  • K1binfo
    installs-packages (in references/rule.md)

Automated review, not a security audit. Ruleset v1+k2.

Questions

Which tools does it use to find unused CSS?
PurgeCSS, UnCSS, and Chrome DevTools Coverage are named for identifying and removing unused CSS.
How much CSS can be removed?
The skill notes most projects use only 10-25% of their CSS, with typical reductions of 50-90% for CSS framework users and bundle cuts of 75%+.
Will removing CSS break the site?
The skill instructs checking the rendered layout across breakpoints and interaction states before proposing a fix, and safelisting dynamic classes and framework-specific patterns.
Advanced
Item type
skill
Key
unused-css
Source
github.com/thedaviddias/front-end-checklist