
Performance optimization
Guides an agent to measure, find and fix web and database performance bottlenecks
Performance optimization is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 122K
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Performance optimization
This skill walks an agent through a measure-first performance workflow: establish a baseline, locate the real bottleneck, apply a targeted fix, re-measure, and keep or revert the change. It covers frontend concerns such as Core Web Vitals targets, image handling, re-renders and bundle size, and backend concerns such as N+1 queries, pagination, index selection, connection pools and caching.
The guidance is strict about evidence. It asks the agent to prefer Lighthouse and DevTools traces for controlled tests and web-vitals or CrUX data for real users, to compare changes against run-to-run variance, and to log rejected experiments so they are not repeated. It also lists default budgets for bundle size, CSS, images, fonts, API latency and Lighthouse score, with CI commands for bundlesize and Lighthouse CI.
The skill ships a references folder with worked patterns and a performance checklist. The instructions assume a JavaScript or web stack with access to a profiler, browser developer tools and a database that supports EXPLAIN ANALYZE.
When your agent uses it
Optimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks. Use when asked why code is slow or how to make it fast, even when the code is pasted inline and the fix looks obvious.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 3 files (39 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the agent-skills plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add chrisalehman/bionic
/plugin install agent-skills@bionicOr copy only this skill to ~/.claude/skills/performance-optimization:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/performance-optimization &&
cp -R "$tmp/skills/performance-optimization" ~/.claude/skills/performance-optimization &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/performance-optimization inside it instead.
Copy the skill folder to ~/.agents/skills/performance-optimization to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/performance-optimization &&
cp -R "$tmp/skills/performance-optimization" ~/.agents/skills/performance-optimization &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/performance-optimization inside it instead.
Copy the skill folder to ~/.cursor/skills/performance-optimization to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/performance-optimization &&
cp -R "$tmp/skills/performance-optimization" ~/.cursor/skills/performance-optimization &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/performance-optimization inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/addyosmani/agent-skills.git --path skills/performance-optimizationOr copy the folder to ~/.gemini/skills/performance-optimization yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/performance-optimization:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/performance-optimization &&
cp -R "$tmp/skills/performance-optimization" ~/.copilot/skills/performance-optimization &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/performance-optimization inside it instead.
Get the folder:
git clone --depth 1 https://github.com/addyosmani/agent-skills.gitThen copy agent-skills/skills/performance-optimization into your agent's skills folder as performance-optimization. Agents that support SKILL.md read one folder per skill.
What it does
- Measure-first workflow
- A five-step loop of measuring, identifying, fixing, verifying and guarding performance changes.
- Core Web Vitals targets
- Good, needs-improvement and poor thresholds for LCP, INP and CLS.
- Backend anti-patterns
- Guidance on N+1 queries, unbounded fetches, index use, pool exhaustion and caching mistakes.
- Frontend fixes
- Covers image sizing and lazy loading, unnecessary re-renders and route-level code splitting.
- Keep or revert rules
- Criteria for accepting an optimization only when it beats noise and keeps tests green.
- Performance budgets in CI
- Suggested budgets for bundle size, API latency and Lighthouse scores, enforced with bundlesize and Lighthouse CI.
Good for
- Find out why an API endpoint is slow under load
- Fix N+1 queries in a list view
- Improve Core Web Vitals on a landing page
- Decide whether a database index is worth adding
- Set up a performance budget for a frontend build
- Track rejected optimization attempts in a PERF.md file
Performance optimization FAQ
When does Performance optimization trigger?
It applies when performance requirements exist, when regressions are suspected, when Core Web Vitals or load times need work, when N+1 query patterns need fixing, when profiling shows bottlenecks, or when someone asks why code is slow, even if the code is pasted inline.
Does Performance optimization install any scripts or tools?
No scripts are included. It refers to external tools such as Lighthouse, web-vitals, bundlesize and Lighthouse CI, and suggests running them through npx.
Does Performance optimization need specific tools or languages?
It names browser DevTools, the web-vitals library, EXPLAIN ANALYZE for SQL databases, and Lighthouse CI. Examples use JavaScript, and the guidance covers both frontend and backend code.
Where are the detailed fixes?
Detailed worked patterns are in references/optimization-patterns.md, and a broader checklist is in references/shared/performance-checklist.md.
How do I install Performance optimization in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/performance-optimization to use it in all your projects, or to .claude/skills/performance-optimization in one project. Or install the agent-skills plugin, which includes it: /plugin marketplace add chrisalehman/bionic, then /plugin install agent-skills@bionic.
Does Performance optimization run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Performance optimization?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Performance optimization?
The closest alternatives to Performance optimization are Performance audit edho ferdian, Performance, Frontend perf, Performance reasoning and Optimize.
Where this comes from
- Description: from the skill's own SKILL.md.
More from addyosmani/agent-skills

Audits interfaces against WCAG 2.2 AA and guides fixing the violations found
- Open source
- 122K GitHub stars
- Developer tools

Guides designing stable, hard-to-misuse APIs, REST endpoints and module contracts
- Open source
- 122K GitHub stars
- Design and media

Lets your coding agent inspect and test live browser pages through Chrome DevTools
- Open source
- 122K GitHub stars
- Browser automation

Sets up CI/CD quality gates, deployment strategies and rollback plans for agents
- Open source
- 122K GitHub stars
- Developer tools

Guides an agent through multi-axis code review before changes are merged
- Open source
- 122K GitHub stars
- Developer tools

Guides an agent to simplify working code for clarity without changing behavior
- Open source
- 122K GitHub stars
- Developer tools




