- Home
- Skills
- Code Quality & Review
- CSS Auditor
Works with the AI tools you already use
CSS Auditor
Audit CSS for unused selectors, high specificity, and inconsistent design tokens across web frameworks.
$9.99
CSS Auditor
Example session with this skill installed
Audit my src/styles/main.css against the src/components folder. Check for unused classes, high specificity, and extract the color palette used.
- Read your context and instructions
- Compiled the css auditor
- Generated the design tokens stylesheet
I have audited `main.css` against your React components. I found 14 unused selectors and identified several specificity risks that could lead to maintenance headaches. ## CSS Audit Report: main.css | Issue Type | Count | Examples / Details | | :--- | :--- | :--- | | **Unused Selectors** | 14 | `.legacy-header-v1`, `.btn-deprecated`, `.user-profile-sidebar-old` | | **High Specificity** | 6 | `#main-nav`, `header ul li.nav-item a`, `div.container > .content` | | **!important Flags** | 8 | Located in `.modal-overlay`, `.dropdown-menu`, and `@media` blocks | | **Duplicate Rules** | 3 | `display: flex` defined twice in `.flex-center` | ### Extracted Design Tokens (Colors) | Category | Values Found | Note | | :--- | :--- | :--- | | **Primary** | `#007bff`, `rgb(0, 123, 255)` | Identical colors; consolidate to one variable | | **Neutrals** | `#333333`, `#343434`, `#f8f9fa` | `#333` and `#343` are near-duplicates | | **Accents** | `#ffc107`, `#dc3545` | Used in buttons and alerts | ### Maintainability Flags - **Obsolete Prefixes**: Found `-webkit-box-shadow` and `-moz-border-radius`. Modern browsers no longer require these. - **@import Chains**: Found 3 levels of nested imports which may delay browser rendering. **Next steps** 1. Add `active` and `is-*` to your safelist if those classes are toggled via JavaScript. 2. Consolidate the `#333333` and `#343434` hex codes into a single `--color-gray-dark` variable. 3. Remove the 14 unused selectors identified in the report to save approximately 2.4kb (gzipped).
main.css
CSS · design tokens
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Bloated stylesheets slow down builds and increase production bundle sizes. This skill audits CSS, SCSS, and Less files to identify unused selectors, maintainability issues, and inconsistent design tokens across your codebase. ## What it does - **Unused Selector Detection** scans HTML, JSX, TSX, Vue, Svelte, and PHP files to find dead class and ID selectors. - **Specificity Analysis** flags high-risk selectors like IDs, overqualified elements, and long descendant chains that cause style overrides. - **Maintainability Audit** counts `!important` usage, duplicate declarations, obsolete vendor prefixes, and @import chains. - **Token Extraction** lists unique colors, font sizes, spacing, and z-index values to identify near-duplicate variables. - **Breakpoint Inventory** aggregates media queries to help standardize responsive design break-points. ## How it works 1. **Target Styles** by providing paths to CSS, SCSS, or Less files for analysis. 2. **Scan Content** by pointing the auditor to your component or template directory for usage matching. 3. **Apply Safelists** for dynamic classes like `is-active` or `js-*` patterns that static analysis might miss. 4. **Review Report** to identify specific lines for refactoring or deletion based on the generated audit logs. ## Frameworks & tools Works with CSS, SCSS, and Less syntax. Supports content scanning for HTML, React (JSX/TSX), Vue, Svelte, Angular, and PHP templates. ## Why this beats prompting it yourself Generic LLM prompts often hallucinate selector usage or miss complex specificity rules. this skill uses targeted logic to normalize colors and detect exact duplicate declarations that manual reviews overlook in large files. ## Use cases - **Dead Code Elimination** during a refactor to safely remove hundreds of lines of unused CSS. - **Design System Migration** by extracting existing colors and spacing to define new design tokens. - **Performance Optimization** to reduce the CSS payload by removing vendor prefixes and duplicate rules. - **Code Review** to catch `!important` flags or ID selectors before they reach production. ## Known limitations Unused selector detection is static. Dynamic classes built via string concatenation require manual safelisting to avoid false positives.
How to use
Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean today
- Passed all security checks, Safe to install