This skill audits and updates repositories to enforce Workleap Chromatic best practices, optimizing snapshot costs and CI efficiency.
npx playbooks add skill workleap/wl-web-configs --skill workleap-chromatic-best-practices
Guide for auditing and updating repositories to follow Workleap's Chromatic best practices.
When asked to audit or update a repository for Chromatic best practices, follow these steps in order.
Search for existing Chromatic setup:
chromatic.config.json
.storybook/preview.ts[x]
.github/workflows/*chromatic*.yml or *storybook*.yml
package.json (scripts section)
If no Chromatic configuration exists, ask the user if they want to set it up.
Run through all 10 checks below. For detailed code examples, detection patterns, and fix actions for each check, consult references/audit-checks.md.
| # | Check | What to look for |
|---|-------|-----------------|
| 2.1 | untraced config (optional) | chromatic.config.json — ask user about cost vs. regression trade-off |
| 2.2 | Preview barrel imports | .storybook/preview.ts[x] — barrel/index imports that disable TurboSnap |
| 2.3 | Local Chromatic scripts | package.json scripts — remove local chromatic commands |
| 2.4 | CI label-based triggering | GitHub Actions — require run chromatic label on PRs |
| 2.5 | CI required flags | chromaui/action — onlyChanged, exitOnceUploaded, autoAcceptChanges |
| 2.6 | CI git checkout depth | actions/checkout — fetch-depth: 0 + Chromatic env vars |
| 2.7 | Browser configuration | CLI flags — Chrome only, remove multi-browser flags |
| 2.8 | Renovate/Changesets exclusion | Branch ruleset — exclude bot branches from required checks |
| 2.9 | Large preview dependencies | Preview imports — flag files with >20 exports or >500 lines |
| 2.10 | Workflow optimizations | CI concurrency settings + label auto-removal step |
After completing all checks, generate a findings table with pass/fail status and actions taken. See references/audit-checks.md for the report template.
For detailed documentation beyond the workflow above, consult:
references/audit-checks.md — Full check procedures with code examples, detection patterns, fix actions, and the audit report templatereferences/background.md — TurboSnap preservation rules, snapshot cost multipliers, CI trigger strategy, monorepo-specific checksWeekly roundup of top Claude Code skills, MCP servers, and AI coding tips.