Performance audit skill for Claude Code, Codex and Cursor
The performance-audit agent skill finds what slows page loading, such as images, scripts, compression, caching and layout shift, and fixes it by template.
performance-audit is an Agent Skills SKILL.md from squirrelscan: a page speed and Core Web Vitals audit skill for coding agents. It runs squirrelscan’s performance audit rules through the squirrel CLI or the hosted squirrelscan MCP server. It then fixes slow-loading causes by template in Claude Code, Codex, Cursor and other agents. It reads markup, headers and fetched resources, so it finds causes, not real-user measurements.
New to skills? Start with the skills overview.
What it does
- Checks the largest image, render-blocking resources, script and image weight, compression, caching, server response, fonts and layout shift.
- Fixes biggest effect first: loading the main content, bytes, delivery, then stability and responsiveness.
- Does not lazy-load the main (largest) image, a common regression the audit flags.
- Gets each rule’s exact fix from its docs page, not from memory.
- Audits the live website, because only there do compression, caching, HTTP version and server response reflect production.
- Compares before and after with
--refreshandsquirrel report --diff, and reports the rules that cleared. - States the Core Web Vitals thresholds from web.dev: Largest Contentful Paint 2.5 s, Interaction to Next Paint 200 ms and Cumulative Layout Shift 0.1, at the 75th percentile.
- Says these audits do not replace field data from the Chrome UX Report or PageSpeed Insights.
- Points to where the fix usually lives in Next.js, WordPress, Shopify, Webflow, Cloudflare, Vercel and Netlify.
Questions it answers
- Why is my website slow?
- Audit page performance
- Fix layout shift
- Which images are too large or in the wrong format?
- What is blocking rendering on my pages?
- Is my website compressed and cached correctly?
- Why is my largest contentful paint slow?
- Which scripts add the most weight to my pages?
Install
Works with any Agent Skills tool (Claude Code, Codex, Cursor, Gemini CLI, Amp and others):
npx skills add squirrelscan/skills --skill performance-auditThe plugin installs all the skills and the hosted squirrelscan MCP server:
/plugin marketplace add squirrelscan/skills/plugin install squirrelscan@squirrelscannpx skills add puts the skill in .agents/skills/. To add the MCP server too, configure it in ~/.codex/config.toml. See squirrelscan for Codex.
Run npx skills add, then use the Cursor plugin from the skills repository or the one-click MCP link. See squirrelscan for Cursor.
Gemini CLI, GitHub Copilot, Amp and other Agent Skills tools: run npx skills add, then add the MCP server. See coding agents.
Requirements
The squirrel CLI installed and in your PATH, or the hosted squirrelscan MCP server connected (https://mcp.squirrelscan.com/mcp). Check the CLI with squirrel --version. Setup steps are in install and MCP clients.
Install the CLI on macOS or Linux:
curl -fsSL https://install.squirrelscan.com | bashExample prompts
Paste one of these into your coding agent:
Why is my website slow? Audit https://example.com and fix what you can in this repoFix layout shift on my product pagesRe-audit after the deploy and show the before and after performance scoreThe agent runs the performance and image rules at surface level, fixes the template-level causes in order, then re-audits and reports which rules cleared.
How it works
- Check the CLI and login status and tell you the cost.
- Run
squirrel auditwith--rule-include perf,imagesat--level surfaceagainst the live website. - Read the
perfcategory score and fix in order: main content loading, bytes, delivery, stability, hygiene. - Re-audit with
--refreshafter the deploy and diff against the baseline. - Stop when error-severity
perfissues are cleared on a--level fullre-audit and you know lab-style checks do not replace field data.
Related skills
broken-link-checker: broken assets and links.audit-website: anything else, and the fix loop.website-ci-gate: fail CI on a performance score threshold.
Related rules and guides
Source on GitHub
skills/performance-audit: the skill folder- README.md
- SKILL.md