performance-optimization
An agent skill by addyosmani, from addyosmani/agent-skills. Tags: api, debugging, developer-tools, web.
What it does
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.
Install
With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:
npx skills add addyosmani/agent-skills --skill performance-optimization
Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):
git clone --depth 1 https://github.com/addyosmani/agent-skills
cp -r agent-skills/skills/performance-optimization ~/.claude/skills/performance-optimization
Safety box score
Grade B, low risk: 14 of 100 risk points, rated 2026-09-25. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.
This is a documentation-only performance-optimization skill: it mainly tells an agent how to profile, benchmark, and edit application code for speed. The main safety impact comes from its verification commands, which can run registry-fetched tools via `npx` and may contact external measurement services while benchmarking.
| Category | Level | Why |
|---|---|---|
| Code & shell execution | 1 (low) | The skill recommends running CLI tools with `npx bundlesize --config bundlesize.config.json` and `npx lhci autorun`, which executes code during verification. |
| Network access | 1 (low) | Its workflow explicitly uses external measurement paths like “RUM (web-vitals library, CrUX)” and `npx`, so using it can fetch packages and contact remote services. |
| Filesystem reach | 1 (low) | The guidance is mostly repo-local, but it does instruct keeping a `PERF.md` ledger and making code/config changes in the project tree. |
| Secrets & credentials | 0 (none) | No step asks for passwords, tokens, `.env` files, browser sessions, or other credential stores. |
| Privilege & persistence | 0 (none) | There is no `sudo`, service registration, shell startup modification, or other privilege-changing instruction. |
| Instruction hijack surface | 0 (none) | I found no prompt-injection text, hidden instructions, or requests to ignore higher-priority rules. |
| Irreversible actions | 0 (none) | The skill is about measurement and code fixes; it does not instruct the agent to publish, pay, send messages, deploy, or delete data. |
| Transparency | 1 (low) | It references `../../references/performance-checklist.md`, which is not included in the provided bundle, and it relies on runtime-fetched `npx` packages rather than fully local, pinned tooling. |
Before installing
- Preinstall or pin `bundlesize` and `lhci` instead of letting `npx` fetch them on demand.
- Read `../../references/performance-checklist.md` if it exists in the repo; it is referenced but not included here.
- If you let an agent use this skill, try the benchmark commands in a scratch branch first and confirm they only touch the intended project files.
Rated 2026-09-25 by an automated review of 1 file from the skill's repository.
Source
- Repository
- addyosmani/agent-skills (all skills from this repository)
- Path
- skills/performance-optimization/SKILL.md
- Branch
- main
- Updated
- 2026-09-19
Related skills
- debugging-and-error-recovery — Guides systematic root-cause debugging.
- observability-and-instrumentation — Instruments code so production behavior is visible and diagnosable. Use when adding logging, metrics, tracing, or alerting.
- security-and-hardening — Hardens code against vulnerabilities.
- systematic-debugging — Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
- browser-testing-with-devtools — Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser.
- deprecation-and-migration — Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another.