- Home
- Skills
- Code Quality & Review
- CSS Auditor
Works with the AI Agents you already use
CSS Auditor
Audit CSS for unused selectors, high specificity, and inconsistent design tokens across web frameworks.
$1
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-shadowand-moz-border-radius. Modern browsers no longer require these. - @import Chains: Found 3 levels of nested imports which may delay browser rendering.
Next steps
- Add
activeandis-*to your safelist if those classes are toggled via JavaScript. - Consolidate the
#333333and#343434hex codes into a single--color-gray-darkvariable. - 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
!importantusage, 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
- Target Styles by providing paths to CSS, SCSS, or Less files for analysis.
- Scan Content by pointing the auditor to your component or template directory for usage matching.
- Apply Safelists for dynamic classes like
is-activeorjs-*patterns that static analysis might miss. - 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
!importantflags 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.
Static analysis only. Classes generated via string concatenation (e.g. 'btn-' + type) must be manually added to the safelist. Review audit before deleting code.
How to use
- 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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
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 1 month ago