audit-style

Audit CSS in Astro and SolidJS files for BEM and design token compliance.

Updated Aug 22, 2025
One-click install
npx skills add https://github.com/njculpin/BudgetZero --skill audit-style
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: audit-style
Source: https://github.com/njculpin/BudgetZero/tree/main/.claude/skills/audit-style
Command: npx skills add https://github.com/njculpin/BudgetZero --skill audit-style

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill identifies and fixes CSS that violates the Game Loopers BEM naming conventions and design-token standards. It surfaces non-compliant selectors, token hard-coding, and overly specific rules to improve maintainability and consistency.

Core Features & Use Cases

  • BEM conformance checks: Detects invalid or ambiguous selectors that break the block__element--modifier structure.
  • Design token compliance: Flags hard-coded colors, spacing, typography, and radii; suggests var(--tokens) replacements.
  • Migration guidance: Proposes canonical renames, refactor plans, and patch examples ready for apply.
  • Cross-file analysis: Scans Astro components, SolidJS styles, and global CSS to unify styling across the codebase.
  • Patch generation: Produces before/after diffs and a migration map for safe code changes.

Quick Start

  • Run the audit across all .astro and .tsx CSS files to identify BEM violations and design-token usage, review the migration plan, and apply refactors either manually or via the generated patches.

Frequently Asked Questions about audit-style

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

FAQPage Schema
How do I audit CSS for BEM naming conventions and design token compliance?

To audit CSS for BEM conformance and design token compliance, scan your Astro components, SolidJS styles, and global CSS to detect invalid block__element--modifier selectors and hard-coded values. The process outputs a patch set and migration guidance aligned with your design system.

How do I refactor hard-coded colors and spacing into design tokens across Astro and SolidJS?

Refactoring hard-coded colors and spacing into design tokens involves scanning .astro and .tsx style definitions for raw values and replacing them with var(--tokens). This cross-file analysis flags non-compliant rules and generates before/after diffs for safe code migration.

What is the best way to enforce BEM naming and eliminate utility-first patterns in a frontend codebase?

Enforcing BEM naming and eliminating utility-first patterns requires a cross-file audit that targets overly specific selectors and ambiguous class structures. The audit proposes canonical renames and produces a migration map to standardize styles across Astro and SolidJS islands.

Does this CSS refactoring approach work with both Astro components and SolidJS islands?

Yes, this CSS refactoring approach works with both Astro components and SolidJS islands. It performs cross-file analysis on .astro files, tsx style definitions, and global CSS to unify styling, enforce BEM naming, and ensure design token usage across the entire project.

How does cross-file CSS analysis improve design system maintainability?

Cross-file CSS analysis improves design system maintainability by surfacing non-compliant selectors and hard-coded typography or radii across Astro and SolidJS files. It generates a structured migration plan with patch examples, ensuring consistent token usage and reducing scattered styling rules.

Why does my CSS audit flag utility-first patterns as non-compliant?

Your CSS audit flags utility-first patterns as non-compliant because the design system explicitly enforces BEM naming conventions and requires design tokens for styling. This approach rejects utility classes to improve maintainability and ensure consistent structural naming across the codebase.