Agent skill · Frontend

performance-optimization

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.

addyosmanigithub.com/addyosmaniGitHub ↗
claude-codecodexcursorMIT
Install
npx skills add addyosmani/agent-skills --skill performance-optimization --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 15 KB
Bundled scripts: none
Path: skills/performance-optimization/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 81,574
Language: JavaScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Performance Optimization ## Overview Measure before optimizing. Performance work without measurement is guessing — and guessing leads to premature optimization that adds complexity without improving what matters. Profile first, identify the actual bottleneck, fix it, measure again. Optimize only what measurements prove matters. ## When to Use - Performance requirements exist in the spec (load time budgets, response time SLAs) - Users or monitoring report slow behavior - Core Web Vitals scores are below thresholds - You suspect a change introduced a regression - Building features that handle large datasets or high traffic **When NOT to use:** Don't optimize before you have evidence of a problem. Premature optimization adds complexity that costs more than the performance it gains. ## Core Web Vitals Targets | Metric | Good | Needs Improvement | Poor | |--------|------|-------------------|------| | **LCP** (Largest Contentful Paint) | ≤ 2.5s | ≤ 4.0s | > 4.0s | | **INP** (Interaction to Next Paint) | ≤ 200ms | ≤ 500ms | > 500ms | | **CLS** (Cumulative Layout Shift) | ≤ 0.1 | ≤ 0.25 | > 0.25 | ## The Optimization Workflow ``` 1. MEASURE → Establish baseline with real data 2. IDENTIFY

What's inside
Steps it walks through
  1. Overview
  2. When to Use
  3. Core Web Vitals Targets
  4. The Optimization Workflow
  5. Step 1: Measure
  6. Where to Start Measuring
  7. Step 2: Identify the Bottleneck
  8. Step 3: Fix Common Anti-Patterns
  9. Step 4: Verify (Keep or Revert)
  10. Performance Budget
  11. See Also
  12. Common Rationalizations
  13. Red Flags
  14. Verification
Commands it runs
Chrome DevTools → Performance tab → Record
Chrome DevTools MCP → Performance trace
import { onLCP, onINP, onCLS } from 'web-vitals';
Response time logging
Application Performance Monitoring (APM)
Database query logging with timing
Simple timing
const result = await db.query(...);
Bundle size check
npx bundlesize --config bundlesize.config.json
More from agent-skills
All skills →
About this skill
What does the performance-optimization skill do?

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.

How do I install it?

Run `npx skills add addyosmani/agent-skills --skill performance-optimization --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From addyosmani/agent-skills, a repository with 81,574 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going