Bricks audit design system
Skill codeerhq/bricks-skills/skills/bricks-audit-design-system
Use when the user asks to review, clean up, or fix their design system specifically: "review my classes", "why are my colors inconsistent", "clean up unused classes", "audit my design system". Read-only scan for orphans, unused tokens, dead theme styles, palette fragmentation. Never auto-fixes. For a full site health check, use bricks-site-audit instead.From its SKILL.md
npx -y skills add codeerhq/bricks-skills --skill bricks-audit-design-systemAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 24 stars24 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.8 KB, as published. Nobody here has run it
Requires: Bricks 2.4+ with the Abilities API enabled
Bricks: audit & clean the design system
Use this skill when the user says things like "review my design system", "clean up unused classes", "why are my colors inconsistent", or "audit my design tokens". For a generic whole-site audit, use bricks-site-audit instead. The entry point here is bricks/audit-design-system: read-only, safe to run without approval.
If a
bricks/*ability is not available as a direct tool: first check whether it is outside the fast path and call it throughmcp-adapter-execute-abilitywithability_name: "bricks/<name>". If the dispatcher also rejects it, callbricks-list-ability-statusto check whether a site admin disabled it under Bricks > AI.
Run the audit
bricks/audit-design-system (scope: "all")
Scope options:
all: everything (default; may take a few seconds on large sites)orphans: errors only: elements referencing classes/variables/components that no longer existunused: resources defined but never referenced anywheretheme-styles: theme styles with no conditions (silently ignored)palettes: duplicaterawvalues + palette entries whoserawvalue does not contain a CSS variable reference
For a fast check without scanning posts: skipPostScan: true (skips unused + orphans, keeps theme-styles + palettes).
How to read the output
Every issue has:
severity:error,warning, orinfocategory:orphans,unused,theme-styles, orpalettesresourceType+resourceId: what to fixmessage: what's wrongsuggestion: recommended action (not auto-applied)
Present issues grouped by severity, not by category. Errors block correct rendering; warnings are silently-broken config; infos are cleanup. Users triage that way.
How to decide what to fix
When any fix requires creating or renaming a design resource, apply the rules from the bricks-design-systems skill (naming conventions, uniqueness constraints, shade generation).
Errors (always raise to user, never auto-fix)
- Orphan class reference: an element is pointing at a class id that doesn't exist. Either the class was deleted without cleaning up references, or the data was imported broken. Fix path: either recreate the class, or locate and strip the stale id from
_cssGlobalClasseson affected elements. - Orphan variable reference: CSS text says
var(--foo)but--fooisn't defined anywhere. The rule will fall back to nothing (transparent, inherit, etc.) and render wrong. Fix path: create the variable, or rewrite the reference. - Orphan component reference:
"cid":"..."points at a component that no longer exists. The builder shows a missing-component placeholder. Fix path: recreate the component with the original id (rare, usually requires a backup) or useupdate-element/set-page-elementsto remove the stale instance.
Warnings (raise, usually fix with approval)
- Theme style with no conditions: the style is inert in the normal theme-style matcher. Either the user meant to apply it site-wide (
conditions: [{ main: "any" }]) or they abandoned it mid-config. Ask which.
Infos (summarize, fix only when user asks)
- Unused global class: may be intentional (staging a class for upcoming work). Never auto-delete. Offer a batched delete after confirmation.
- Unused global variable: same.
- Unused component: same.
- Palette color without a variable reference in
raw: the color can still work, but it is only referenced by its stored value. If the site uses tokenized colors, setrawto a CSS variable reference such asvar(--brand-primary). Leave literal values alone when that is intentional. - Duplicate color across palettes: the same hex appears N times. Offer to consolidate.
Fix workflow
Never bulk-fix. Fix one category at a time, with the user's eyes on each change:
- Show the audit summary:
N errors, M warnings, K infos. - Show the error list in full: these are actually broken.
- Ask: "Fix errors first, or review the full list?"
- For each fix:
- Read the affected resource (
get-page-elements,list-global-classes, etc.). - Propose the exact change in plain English + the ability call.
- Wait for approval.
- Apply. Capture
revisionIdwhere applicable. - Move to the next.
- Read the affected resource (
- After a round of fixes, re-run the audit to confirm the issues are gone and nothing new surfaced.
Things the audit misses (and you should mention)
- Naming inconsistency: mix of
camelCase/kebab-case/snake_caseacross classes or variables. The audit doesn't flag it because "consistent" is subjective. Scanlist-global-classes/list-global-variablesmanually if the user asks. - Semantic overlap:
.btnand.buttonare both used, defining similar styles. The audit can't infer intent. Suggest merging if you see it. - Scale gaps: spacing or typography scale missing middle steps. Read
list-global-variablesand check for numeric/t-shirt continuity. - Unused palette entries: palette colors not referenced by any class, variable, or element setting. The audit doesn't scan for this; add it to the manual pass if the palette is large.
When not to run this
- Right after a fresh install (
get-design-contextis empty): there's nothing to audit. Use the bricks-seed-design-system skill instead. - Mid-edit, when the user is actively working on design tokens: the audit will flag in-progress work as "unused." Wait until a stable point.