cleanup-unused-css

Scan HTML/JSX/TSX/Vue files to identify and remove unused CSS selectors.

Updated Mar 10, 2026
One-click install
npx skills add https://github.com/projetsX/french_skills_vscode --skill cleanup-unused-css
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cleanup-unused-css
Source: https://github.com/projetsX/french_skills_vscode/tree/main/cleanup-unused-css
Command: npx skills add https://github.com/projetsX/french_skills_vscode --skill cleanup-unused-css

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Remove unused CSS selectors across a web project to reduce stylesheet bloat and improve performance, while preserving safety through backups and dry-run options.

Core Features & Use Cases

  • Scan HTML/JSX/TSX/Vue files to collect used CSS classes
  • Compare against non-minified CSS files to identify truly unused selectors
  • Generate a human- and machine-readable report, plus optional backup and safe cleanup
  • Dry-run mode to preview changes before applying them
  • Create automated backups and provide restoration scripts

Quick Start

Run the cleanup-unused-css script to analyze your project, review the report, and optionally perform the cleanup after creating a backup.

Frequently Asked Questions about cleanup-unused-css

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I remove unused CSS selectors from a web project?▼

To remove unused CSS selectors, scan HTML, JS, TS, Vue, and React files to extract used classes, parse non-minified CSS, and generate a report for safe cleanup. The process includes a dry-run mode and automated backups to prevent accidental removals.

Does unused CSS cleanup work with Vue and React components?▼

Yes, unused CSS cleanup works with Vue and React components by scanning JSX, TSX, and Vue page files to collect used CSS classes. It cross-references these selectors against your non-minified CSS files to identify truly unused styles.

What is the safest way to clean up unused CSS stylesheets?▼

The safest way to clean up unused CSS stylesheets is using a deterministic workflow with a dry-run mode to preview changes. This approach generates a safety-first report and creates automated backups with restoration scripts before any selectors are removed.

Can I preview CSS selector changes before applying them?▼

Yes, you can preview CSS selector changes before applying them by running the cleanup process in dry-run mode. This generates a human- and machine-readable report showing unused selectors without modifying your original stylesheets.

Does unused CSS analysis work on minified CSS files?▼

No, unused CSS analysis requires non-minified CSS files to accurately parse and compare selectors against used classes extracted from your HTML and JavaScript components. Minified files prevent proper selector extraction and comparison.