Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    CSS SCSS Dead Code Purger

    1

    Scan local frontend components against a CSS or SCSS file, identify likely orphaned class selectors, and generate a reviewable cleanup diff without modifying the original stylesheet.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    CSS SCSS Dead Code Purger

    CSS SCSS Dead Code Purger

    Example session with this skill installed

    Scan this frontend project for likely orphaned CSS/SCSS selectors.

    Stylesheet
    src/styles/styles.scss

    Components
    src/components

    Requirements

    • recursively scan JS, JSX, TS, TSX, HTML, Vue and Svelte files;
    • detect static class and className references;
    • detect common clsx(), classnames() and cn() string references;
    • detect common static CSS Module references such as styles.card;
    • compare observed classes against selectors in styles.scss;
    • preserve classes listed in the ignore/allowlist;
    • treat dynamic class construction and SCSS interpolation conservatively;
    • do not claim an unmatched selector is definitely unused when runtime usage is possible;
    • do not modify the original stylesheet;
    • generate a cleaned candidate stylesheet;
    • generate styles_cleanup.diff;
    • generate dead_css_report.md;
    • generate dead_css_report.json;
    • separate safe cleanup candidates from review-required selectors;
    • estimate the number of bytes removable by the proposed cleanup.

    Prioritize safety over maximum deletion.

    • Read your context and instructions
    • Compiled the css scss dead

    CSS/SCSS cleanup analysis complete

    Stylesheet
    src/styles/styles.scss

    Component files scanned
    47

    Static classes observed
    126

    Stylesheet rules analyzed
    184

    Used rules
    153

    Safe cleanup candidates
    18

    Review-required candidates
    13

    Proposed removals
    18

    Approx. removable size:
    6.8 KB

    Safe cleanup candidates

    .old-banner
    .card--legacy
    .checkout-v1
    .profile-card-old
    .deprecated-modal
    .legacy-grid

    These selectors were not found in the observed static component usage and were not protected by the allowlist.

    Review required

    Some unmatched selectors were preserved for manual review because dynamic class construction, SCSS behavior or runtime injection may affect their usage.

    Generated files

    src/styles/styles.cleaned.scss
    styles_cleanup.diff
    dead_css_report.md
    dead_css_report.json

    The original styles.scss file was not modified.

    Static CSS analysis cannot prove all runtime usage. Review the generated diff and run visual/regression tests before applying removals to production styles.

    dead_css_report.md

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Clean stale CSS without blindly breaking your UI

    Frontend refactors often leave selectors behind. Over time, unused CSS increases stylesheet size, hides technical debt, and makes future maintenance harder.

    CSS/SCSS Dead Code Purger scans your real local component directory, compares observed class usage against your stylesheet, and generates a reviewable cleanup candidate and unified diff.

    • Recursively scans JS, JSX, TS, TSX, HTML, Vue and Svelte files
    • Detects static class and className references
    • Recognizes common clsx(), classnames() and cn() usage
    • Detects common static CSS Module references
    • Cross-checks CSS/SCSS selectors against observed usage
    • Preserves allowlisted runtime classes
    • Separates safe candidates from review-required selectors
    • Generates a cleaned candidate without overwriting the original
    • Creates styles_cleanup.diff for fast code review
    • Reports approximate removable bytes

    Why use this instead of normal ChatGPT?

    The value is not guessing whether a selector looks old. The Skill scans dozens of real local source files and cross-references them against the stylesheet without requiring the entire private frontend codebase to be copied into a chat window.

    Components + Stylesheet → Usage Scan → Selector Comparison → Cleanup Candidate → Diff

    Conservative by design

    Dynamic classes, SCSS interpolation, runtime-generated selectors, CMS content and third-party styles can defeat static analysis. The Skill treats uncertain cases as review candidates instead of silently deleting them.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.

    Cannot detect classes generated via runtime string concatenation or SCSS interpolation. CMS-injected styles and third-party library selectors require manual verification.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 20 days ago

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed20 days ago

    What's inside

    Frequently Asked Questions

    The skill scans your component library (React, Vue, Svelte, or HTML) against your stylesheets to identify orphaned class selectors and generates a side-by-side diff for safe removal. It solves the problem of 'CSS bloat' that occurs during long-term frontend refactoring, reducing bundle sizes without the risk of manual error.

    This skill is designed for use with AI coding agents that have file system access, such as Windsurf, Cursor, or GitHub Copilot. It requires the agent to be able to read your local directory structure to perform the cross-file analysis between your styles and components.

    Yes, the skill is specifically engineered to handle SCSS nesting and parent selectors (&). Unlike generic prompts, it understands the hierarchical structure of preprocessors to ensure nested rules aren't flagged as unused just because the parent is defined separately.

    The skill identifies classes that are clearly missing from your markup as 'safe' for removal, but flags any ambiguous or complex selectors for manual review. This 'review-first' workflow ensures you have the final say before any code is actually deleted, preventing accidental breakage of dynamic styles.

    Upon purchase, you receive the specialized skill definition and logic optimized for CSS/SCSS analysis, along with a configuration guide for various frontend frameworks. You also get access to any future updates or refinements made to the detection engine.

    New in Code Quality & Review