performance-optimizationcommit ee3e850SKILL.md · Performance
Performance Optimization
Optimizes frontend, backend and database performance via a measure, identify, fix, verify and guard loop, keeping only changes that measure better.
npx skills add addyosmani/agent-skills --skill performance-optimizationCommand selected. Copy it manually.
- Permissions
- read-repo
- write-files
- shell
- network
- Compatible with
- Claude Code, Codex, Cursor, Copilot, Gemini CLI
- GitHub
- 112.3k
- Source
- Community · Addy Osmani
- Status
- Scan passed
- License
- MIT
- Category
- Performance
Core rule
Measure before optimizing and keep only what re-measurement proves; a neutral change is a revert.
Execution Phases
Phase 01Measure
Establish a baseline with synthetic tools (Lighthouse, DevTools) and RUM (web-vitals, CrUX), using the symptom to decide what to measure first.
Phase 02Identify the bottleneck
Match symptoms to likely causes such as N+1 queries, missing indexes, large bundles or long main-thread tasks.
Phase 03Fix one bottleneck
Fix only what the previous step found, using the patterns for N+1, pagination, EXPLAIN ANALYZE, caching, images and bundles.
Phase 04Verify: keep or revert
Re-measure under the same conditions against run-to-run variance; keep only if past the threshold with tests green, otherwise revert, and log every attempt.
Phase 05Guard against regression
Add a synthetic CI budget (bundlesize, Lighthouse CI) and field monitoring for the user-facing metric.
Permissions (summarised from SKILL.md)
| Capability | Needed | Details |
|---|---|---|
| File writes | Required | Edits application code, queries and config, and logs attempts in PERF.md or the PR description. |
| Command execution | Required | Runs measurement and test commands such as Lighthouse CI, bundlesize, EXPLAIN ANALYZE and the test suite. |
| Network outbound | Not required | The skill does not call external services; measurements target your own app. |
SKILL.md frontmatter (YAML)
---
name: performance-optimization
description: 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.
---