From site-audit
Audits live websites for UX, accessibility, performance, and bug issues using Playwright, axe, pa11y, and Lighthouse. Generates a severity-grouped report.
How this skill is triggered — by the user, by Claude, or both
Slash command
/site-audit:site-auditThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Audit a live website by first crawling it once with `site-mapper` to produce a
Audit a live website by first crawling it once with site-mapper to produce a
shared sitemap.json artifact, then spawning four specialist agents in
parallel that all read the same artifact. Aggregate findings into
site-audit-report.md.
Prereqs: Node.js ≥ 18 (for npx). The Playwright MCP server is required
(declared in plugins/site-audit/.mcp.json) — site-mapper hard-fails if it
is not available, because every downstream agent depends on the real selectors
and runtime observations only a browser can produce. axe-cli, pa11y, and
Lighthouse are still fetched on demand via npx --yes per their respective
agents.
Before doing any work, call TaskCreate for each phase below. Call TaskUpdate (status in_progress) when you begin a phase and TaskUpdate (status completed) when you finish it.
Extract the target URL from the user's message.
If no URL was provided, ask:
"Which website URL should I audit?"
Normalize:
https:// if no scheme is presentCompute the host (e.g. example.com) and the working directory.
Detect the OS first, then create the directory using the appropriate shell:
uname -s 2>/dev/null || echo Windows
/tmp/site-audit-<host>/
mkdir -p /tmp/site-audit-<host>
MINGW, MSYS, CYGWIN, or Windows): working directory is $env:TEMP\site-audit-<host>\
New-Item -ItemType Directory -Force "$env:TEMP\site-audit-<host>"
The sitemap.json artifact will live at <working-directory>/sitemap.json.
Store the resolved path as WORK_DIR. Use it wherever subsequent agent prompts
show /tmp/site-audit-<host>/ — substitute the OS-appropriate path throughout.
Fetch the homepage using WebFetch. If it fails, stop and report:
"Cannot reach [URL]: [error]. Please check the URL and try again."
Extract the page title and meta description. Do not save or embed the full
HTML — the sitemap artifact produced by site-mapper is the canonical source
of page structure for all downstream agents.
Spawn site-mapper and wait for it before starting Phase 3b. The artifact
it writes is the shared input for all four downstream agents.
Prompt:
Crawl [URL] and write a sitemap artifact.
Sitemap output path: /tmp/site-audit-<host>/sitemap.json
Crawl rules and selector recording rules are in your agent definition.
Hard-fail with a JSON error message if the Playwright MCP server is
unavailable — do not fall back to passive analysis.
When site-mapper returns:
error field, stop the entire
audit and surface the message to the user:
"Site map could not be built: [error message]. The audit cannot continue without it. Please install the Playwright MCP server (
npx --yes @playwright/mcp@latest) and re-run." Do not writesite-audit-report.md.
Read of its first lines.
If the file is missing despite no explicit error, stop with the same error
message.Spawn the four specialist agents simultaneously using the Agent tool. Do not wait for one before starting the next — fire all four in the same turn. Each receives the sitemap path so it can ground its work in the same observed reality.
Prompt:
Audit the UX of [URL].
Sitemap path: /tmp/site-audit-<host>/sitemap.json
UX checklist: plugins/site-audit/references/ux-checks.md — Read this file first.
Return ONLY a JSON array of findings. No prose, no markdown fences.
Each object: {"severity":"critical|high|medium|low","category":"<from checklist>","page":"<url>","issue":"<description>","recommendation":"<specific fix>"}
Prompt:
Audit the accessibility of [URL].
Sitemap path: /tmp/site-audit-<host>/sitemap.json
WCAG checklist (includes CLI severity mapping): plugins/site-audit/references/accessibility-checks.md — Read this file first.
Return ONLY a JSON array of findings. No prose, no markdown fences.
Each object: {"severity":"critical|high|medium|low","wcag":"<criterion>","page":"<url>","element":"<selector or description>","issue":"<description>","recommendation":"<specific fix>"}
Prompt:
Audit the performance of [URL].
Sitemap path: /tmp/site-audit-<host>/sitemap.json
Performance thresholds and manual checks: plugins/site-audit/references/performance-checks.md — Read this file first.
Return ONLY a JSON object. No prose, no markdown fences.
Format: {"lighthouseScore":<0-100 or null>,"findings":[{"severity":"critical|high|medium|low","metric":"<metric>","page":"<url>","issue":"<description>","value":"<measured value or null>","recommendation":"<specific fix>"}]}
This agent reads the sitemap, generates a Playwright spec tailored to the real selectors observed during the crawl, executes it, and parses the JSON reporter output. On Windows it falls back to Playwright MCP tools directly.
Prompt:
Find functional bugs on [URL].
Sitemap path: /tmp/site-audit-<host>/sitemap.json
Working directory: /tmp/site-audit-<host>/
Bug patterns catalogue: plugins/site-audit/references/bug-patterns.md — Read this file first.
Script-authoring rules: plugins/site-audit/references/script-authoring.md — Read this file too.
Return ONLY a JSON array of findings. No prose, no markdown fences.
Each object: {"severity":"critical|high|medium|low","type":"<bug type>","page":"<url>","issue":"<description, prefix with click path or test title if useful>","recommendation":"<specific fix>"}
Wait for all four agents to complete.
For each agent response:
```json ... ```){"severity":"low","category":"other","page":"[URL]","issue":"Agent returned unparseable output: [first 200 chars]","recommendation":"Re-run the audit"}For the performance agent, extract findings array from the object; record
lighthouseScore separately.
Collect all findings in four lists: uxFindings, a11yFindings,
perfFindings, bugFindings.
Compute per-list counts by severity (critical / high / medium / low / total).
Write site-audit-report.md in the current directory. Use this exact
structure:
# Site Audit: [URL]
*Generated: [ISO 8601 date and time UTC]*
## Summary
| Category | Critical | High | Medium | Low | Total |
|----------------|----------|------|--------|-----|-------|
| UX | N | N | N | N | N |
| Accessibility | N | N | N | N | N |
| Performance | N | N | N | N | N |
| Bugs | N | N | N | N | N |
| **Total** | **N** | **N**| **N** | **N**| **N** |
[If lighthouseScore is not null: > **Lighthouse performance score: N/100**]
---
## Critical Issues
[All findings with severity=critical from any category, formatted as:]
### [category/type] — [page]
**Issue:** [issue]
**Fix:** [recommendation]
---
## UX Issues
[All UX findings with severity != critical, grouped by severity: High → Medium → Low]
### High
- **[page]** ([category]) — [issue]
*Fix: [recommendation]*
### Medium
...
### Low
...
[If no issues: *No UX issues found.*]
---
## Accessibility Issues
[Same structure as UX Issues, plus WCAG criterion where present]
---
## Performance Issues
[Same structure, with metric, page, and value where present]
---
## Bugs & Functional Issues
[Same structure, with type label. Bug findings come from a Playwright spec run
against real selectors observed during the crawl, so each entry maps to a
concrete failed assertion.]
---
## Top 5 Recommendations
Pick the 5 most impactful fixes across all categories. Rank by: severity first,
then estimated fix effort (quick wins before large refactors).
1. **[Title]** — [one sentence why this matters and what to do]
2. ...
After writing, confirm to the user:
"Audit complete. Report written to
site-audit-report.md. Found N issues: N critical, N high, N medium, N low. Generated Playwright spec preserved at/tmp/site-audit-<host>/bugs.spec.tsfor re-running."
Provides a checklist for code reviews covering functionality, security, performance, maintainability, tests, and quality. Use for pull requests, audits, team standards, and developer training.
npx claudepluginhub dan323/easier-life-skills --plugin site-audit