audit-page-budget
Skill4 starsChanged 6 months agoMITView on GitHub
Audit a page's weight against a declared byte budget. Loads the URL, records a HAR, classifies entries by asset category (js/css/image/font), tags third-party requests, and compares totals to budget. Returns violations + graduated pass/warn/fail status. Driven by Playwright, observed entirely in-browser.
In this repository8 other files it gives its agents.
- audit-a11ySkill
- audit-seoSkill
- check-errorsSkill
- discover-flowsSkill
- measure-cwvSkill
- scaffold-e2eSkill
- verify-uiSkill
- visual-diffSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 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.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 69
Run artifacts are saved under:
- Distinctive: line 86
Do not attempt another backend (D-024).
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
/audit-page-budget
Single-backend skill. Calls audit_page_budget on the
rolepod-uiproof MCP server. No fallback (D-024).
When to use
- Gating a UI change on a declared page-weight budget.
- Sanity-checking total page weight after adding an image, font, or third-party script.
- Establishing a baseline weight for a critical landing page.
- Running alongside
/measure-cwvand/audit-a11yas a Verify-phase triple.
When NOT to use
- Build-time bundle inspection (webpack-bundle-analyzer style) — the
parent rolepod's
rolepod-builderagent owns build-output concerns. - Backend p95 / p99 latency — same.
- Synthetic load tests (k6, Locust) — same.
- Pages that fail to load (server 500, network error) — fix the page first.
Inputs
url— URL to audit.viewport— optional{ width, height }.budget— optional overrides. Defaults:total_kb: 1500js_kb: 300css_kb: 100image_kb: 500font_kb: 100third_party_kb: 200request_count: 100
third_party_hostnames[]— explicit allowlist. When supplied, an entry is only counted as third-party if its hostname matches one of these. When omitted, all non-page hostnames count as third-party (with an eTLD+1 heuristic for subdomains of the page).wait_for_idle_ms— wait fornetworkidleafter load. Default 2000.
Outputs
run_id— folder under the run root (see Evidence routing).totals_bytes— totals per category in bytes.request_count— total requests recorded.violations[]— each{ category, actual_kb, budget_kb, over_pct }.status—pass(no violations) |warn(≤50% over) |fail(any category >50% over budget).report_path— path tobudget.json.har_path— path to the HAR file (re-loadable in DevTools).
Process
- Build
audit_page_budgetinput from the user's intent (URL, optional budget overrides, optional third-party allowlist). - Call the tool.
- Surface status + violations inline. Reference the HAR path for detailed network inspection.
Evidence routing
Run artifacts are saved under:
- Standalone:
.rolepod-uiproof/artifacts/audit_page_budget_<ts>_<uuid>/ - With
rolepodparent (detected via the marker file<git-root>/.rolepod/parent-activewritten by the parent's SessionStart hook):<git-root>/.rolepod/evidence/<ts>-rolepod-uiproof-audit-page-budget/
Either way the run directory contains budget.json, network.har, and
a manifest.json per Extension Protocol v1 so the parent's check-work
skill can aggregate the result into the verify report.
If the tool is unavailable
Surface plainly:
The
/audit-page-budgetskill needs the rolepod-uiproof MCP server, which is not currently available. Confirm the plugin is installed and try again.
Do not attempt another backend (D-024).
Examples
Default budget on a landing page
{
"url": "https://example.com"
}Strict JS budget for a critical route
{
"url": "https://example.com/checkout",
"budget": { "js_kb": 150, "total_kb": 800 }
}Tag a specific third-party only
{
"url": "https://example.com",
"third_party_hostnames": ["googletagmanager.com", "doubleclick.net"]
}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.

