add-visual-linting
Skill0 starsChanged 7 months agoMITView on GitHub
Wire visual and accessibility linting (Playwright, Stylelint, axe-core, CSS analyzer) into a target app. Use when a UI-heavy app under apps/* needs automated visual and a11y checks. Copies presets from tools/visual/presets/ into the app and installs the concrete devDependencies there so the workspace root stays light.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-browser-mcpSkill
- add-packageSkill
- mine-ast-grep-rulesSkill
- post-friction-lessonSkill
- propose-ast-grep-ruleSkill
- versionSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 2 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 50
Pick the target app: Must exist under apps/* and have its own package.json.
- Very specific: line 52
Copy the preset files: Use the Bash tool with cp for each — do not re-generate from memory.
- Very specific: line 55
Add the five devDeps listed above.
- Very specific: line 56
Add the check:visual script.
- Very specific: line 58
Install the deps: Run pnpm --filter <app> add -D @playwright/test stylelint stylelint-config-standard @axe-core/playwright …
- Distinctive: line 81
If the app stops needing visual linting:
- Distinctive: line 83
Remove the four copied files
- Very specific: line 84
Remove the five devDeps with pnpm --filter <app> remove @playwright/test stylelint stylelint-config-standard @axe-core/playwright …
- Very specific: line 85
Remove the check:visual script
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
add-visual-linting
Activates the opt-in visual-linting presets under tools/visual/ for a target app. The repo ships the presets as static files; this skill is how they get put to work.
When to use this skill
- An app in
apps/*renders HTML/CSS and needs automated visual regression, style, or accessibility checks - The target app currently has no Playwright, Stylelint, or axe-core setup
- You've been asked to add UI-level quality gates to an existing app
When NOT to use this skill
- Packages under
packages/*— libraries don't have a UI; visual linting belongs with the app that composes them - Apps that already have their own visual-testing stack — don't layer on top
- Non-UI apps (CLIs, daemons, scripts) — these presets add friction with no payoff
What gets wired
Four files copied from tools/visual/presets/ into the target app:
| Source | Destination (in target app) |
presets/playwright.config.ts | <app>/playwright.config.ts |
presets/stylelint.config.mjs | <app>/stylelint.config.mjs |
presets/axe.setup.ts | <app>/tests/e2e/axe.setup.ts |
presets/css-analyzer.config.mjs | <app>/css-analyzer.config.mjs |
Five devDependencies added to the target app's package.json:
@playwright/teststylelintstylelint-config-standard@axe-core/playwright@projectwallace/css-analyzer
One script added to the target app's package.json:
"check:visual": "playwright test && stylelint '**/*.css' && css-analyzer"Steps
- Pick the target app. Must exist under
apps/*and have its ownpackage.json. If not, runpnpm scaffold:app <name>first. - Copy the preset files. Use the Bash tool with
cpfor each — do not re-generate from memory; the source files are the source of truth. - Edit
<app>/package.json.- Add the five devDeps listed above. Leave versions unpinned (
"*") and letpnpm addresolve them in the next step. - Add the
check:visualscript.
- Add the five devDeps listed above. Leave versions unpinned (
- Install the deps. Run
pnpm --filter <app> add -D @playwright/test stylelint stylelint-config-standard @axe-core/playwright @projectwallace/css-analyzer. - Install browser binary (optional but usually needed).
Skip this on servers that already have Chromium, or when using a remote browser MCP (seepnpm --filter <app> exec playwright install chromiumadd-browser-mcp). - Verify.
First run may fail with "no tests found" — that's fine, it confirms the wiring. Add a sample e2e test inpnpm --filter <app> run check:visual<app>/tests/e2e/next. - Do not touch the root
pnpm check. Visual linting stays app-local by design; surfacing it at the root would slow the fast-mode feedback loop for every consumer.
Customization
- Tune the copied configs in the target app. Don't edit
tools/visual/presets/unless you're changing the starter for all future apps. - For shared visual conventions across multiple apps, create a package under
packages/that exports the overrides; each app's config canextendsfrom it.
Uninstalling
If the app stops needing visual linting:
- Remove the four copied files
- Remove the five devDeps with
pnpm --filter <app> remove @playwright/test stylelint stylelint-config-standard @axe-core/playwright @projectwallace/css-analyzer - Remove the
check:visualscript
The workspace-root tools/visual/ directory stays put — other apps may still use it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

