Skip to content
Development
Command

/find-unused-css

Identify CSS rules that are not used by any component or page.

From plugin
rohitg00-claude-code-toolkit
2.8k199 skills138 agents199 commands
$ npx -y skills add rohitg00/awesome-claude-code-toolkit --agent claude-code

Command definition

find-unused-css.md

/find-unused-css - Find Unused CSS

Identify CSS rules that are not used by any component or page.

Steps

1. Scan all CSS, SCSS, and styled-component files in the project 2. Extract all CSS selectors: classes, IDs, element selectors, attribute selectors 3. Scan all HTML, JSX, TSX, and template files for referenced CSS classes 4. Check JavaScript files for dynamically applied classes (classList, className) 5. Account for CSS modules by checking module import usage 6. Cross-reference selectors with their usage across all template files 7. Identify selectors with zero references in any template or component 8. Check for CSS custom properties (variables) that are defined but never used 9. Detect duplicate CSS rules with identical properties 10. Calculate unused CSS as a percentage of total CSS 11. Report unused selectors with file path, line number, and selector name 12. Estimate bundle size savings from removing unused CSS

Rules

  • Account for dynamic class generation (template literals, classnames library)
  • Do not flag global reset styles or normalize.css as unused
  • Check for CSS used in third-party component overrides
  • Consider media query variants of the same class
  • Exclude CSS-in-JS runtime styles from static analysis
  • Flag utility classes only if no utility framework (Tailwind) is configured
  • Report confidence level for each unused selector finding
@rohitg00
Ships withrohitg00-claude-code-toolkit

The most comprehensive toolkit for Claude Code -- 135 agents, 35 curated skills (+400,000 via SkillKit), 42 commands, 176+ plugins, 20 hooks, 15 rules, 7 templates, 15 MCP configs, 26 companion apps, 53 ecosystem entries, and more.

2.8k40 skills138 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
2.8k
Star history of rohitg00/awesome-claude-code-toolkit on GitHub, a chart by star-history.com

Other commands on rohitg00-claude-code-toolkit.

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command