squirrelscan
GitHub

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 --refresh and squirrel 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-audit

The plugin installs all the skills and the hosted squirrelscan MCP server:

/plugin marketplace add squirrelscan/skills
/plugin install squirrelscan@squirrelscan

npx 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 | bash

Example 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 repo
Fix layout shift on my product pages
Re-audit after the deploy and show the before and after performance score

The 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

  1. Check the CLI and login status and tell you the cost.
  2. Run squirrel audit with --rule-include perf,images at --level surface against the live website.
  3. Read the perf category score and fix in order: main content loading, bytes, delivery, stability, hygiene.
  4. Re-audit with --refresh after the deploy and diff against the baseline.
  5. Stop when error-severity perf issues are cleared on a --level full re-audit and you know lab-style checks do not replace field data.

Source on GitHub

Type to search…

↑↓ navigate↵ openesc close