Skip to content

Performance Optimization skill

Measure a real bottleneck, test one change and keep only evidence-backed improvements.

Community · Addy Osmani
AuthorAddy Osmani
LicenceMIT
Sourceaddyosmani/agent-skills · SKILL.md on GitHub
Project websiteskills.addy.ie
Works inClaude Code · Codex, Gemini CLI, Cursor, Copilot
Read from the source on

The performance-optimization skill organizes frontend and backend optimization around measured evidence.

It distinguishes synthetic checks from real-user data, isolates one change and compares gains with noise. Unmeasured or regressing changes should not become claimed wins.

From the skill's SKILL.md: # Performance Optimization

This is a community skill by Addy Osmani, not checked by us or by Anthropic. Skills can tell the agent to run code, read files or call the network. Before installing, read its SKILL.md and every script in the folder, and look for anything that does not match what it says it does.

What it does

  1. Establish a representative baseline and primary metric.
  2. Profile the bottleneck and change one hypothesis.
  3. Repeat measurements, check correctness and record the decision.

What you get

  • A before/after record, scoped change proposal and regression guard plan.

When to use it

  • Investigate an observed performance problem with measurable conditions.

When not to use it

  • Promising a fixed speedup or optimizing without a demonstrated bottleneck.

What it needs

  • A code/shell-capable agent, the target project and appropriate profiling tools; monitoring and provider services have separate setup and costs.

Files in the skill

File or folderWhat it is for
SKILL.mdProfiling workflow, optimization patterns and evidence requirements.
references/optimization-patterns.mdLocal optimization patterns accompany the instructions; shared checklists and runtime profilers remain separate requirements.

Licence as found in the repository on 2026-11-23: MIT.

Example prompts

Type one of these after installing; naming the skill makes sure it is used.

  • Find the bottleneck from these traces before suggesting a fix.
  • Compare one change under the same cache and network conditions.
  • Record a reverted attempt so we do not repeat it later.

How to install performance-optimization

Keep patterns and shared checklists

Copy the complete skill folder, including references. Retain the source clone for its root performance checklist; install any profiling tool deliberately rather than assuming it is bundled.

Local optimization patterns accompany the instructions; shared checklists and runtime profilers remain separate requirements.

A skill is a folder with a SKILL.md file. You install it once; the agent reads its short description at the start of each session and loads the full instructions only when a request matches. Pick the place you use:

Claude Code: from the plugin marketplace

  1. Start Claude Code in a terminal with claude.
  2. Add the marketplace (once per computer):
    /plugin marketplace add addyosmani/agent-skills
  3. Install the plugin. Claude Code opens its details first: check what it will add (skills, hooks, MCP servers), then choose whether it is for you, for everyone on this repository, or for you in this repository only.
    /plugin install agent-skills@addy-agent-skills
  4. Type / and look for /agent-skills:performance-optimization, or simply ask for the task.

From your shell instead of a session:

claude plugin marketplace add addyosmani/agent-skills
claude plugin install agent-skills@addy-agent-skills

The plugin installs as a whole, so other skills come with it, including accessibility-engineering, api-and-interface-design, browser-testing-with-devtools, ci-cd-and-automation, code-review-and-quality, code-simplification, constraint-driven-development, context-engineering, debugging-and-error-recovery, deprecation-and-migration, documentation-and-adrs, doubt-driven-development, frontend-ui-engineering, git-workflow-and-versioning, idea-refine, incremental-implementation, interview-me, observability-and-instrumentation, planning-and-task-breakdown, security-and-hardening, shipping-and-launch, source-driven-development, spec-driven-development, test-driven-development, using-agent-skills.

Claude Code: copy the folder into your skills folder

Put the skill's folder in ~/.claude/skills/ to use it in every project on this computer, or in .claude/skills/ inside a repository to share it with everyone who works there (commit it).

git clone --depth 1 https://github.com/addyosmani/agent-skills.git
mkdir -p ~/.claude/skills
cp -R agent-skills/skills/performance-optimization ~/.claude/skills/

Claude Code notices new or changed skills in these folders during the session. If the skills folder did not exist when the session started, run /reload-skills once. Then type /performance-optimization or just describe the task.

On Windows, run the commands in Git Bash or WSL, or copy the folder into the same place with File Explorer.

Codex, Gemini CLI, Cursor and GitHub Copilot

These agents read the same SKILL.md folders. The one folder all four accept inside a project is .agents/skills/, so this copies the skill there:

git clone --depth 1 https://github.com/addyosmani/agent-skills.git
mkdir -p .agents/skills
cp -R agent-skills/skills/performance-optimization .agents/skills/
AgentProject folderYour user folderNotes
OpenAI Codex
.agents/skills/
~/.agents/skills/
Type $ or run /skills to pick a skill; Codex also chooses one when your task matches.
Gemini CLI
.agents/skills/
.gemini/skills/
~/.agents/skills/
~/.gemini/skills/
Or install from Git with gemini skills install <git URL> --path <folder> --consent. Google replaced Gemini CLI with Antigravity CLI for free-tier and Google One users on 18 June 2026; Antigravity uses .agents/skills/ in a project and ~/.gemini/config/skills/ for you.
Cursor
.agents/skills/
.cursor/skills/
~/.agents/skills/
~/.cursor/skills/
Type / in Agent chat to pick a skill. Cursor also reads Claude Code's .claude/skills/ folders.
GitHub Copilot
.github/skills/
.agents/skills/
.claude/skills/
~/.copilot/skills/
~/.agents/skills/
Works in Copilot CLI, the cloud agent, and agent mode in VS Code, Visual Studio and JetBrains (IDE support depends on the version). Or run gh skill install OWNER/REPOSITORY SKILL (public preview, GitHub CLI 2.90.0 or later).
Only install skills you trust. Anthropic's advice is to use skills only from trusted sources, and to read every file of any other skill before using it: a skill can direct the agent to run commands, read files or send data in ways its description does not mention.

Sources for these steps

Checked against each vendor's documentation on 2026-11-14:

Compare equivalent conditions

Cold and warm caches, different hardware or different request samples can change the result independently of code. Report those conditions with the numbers.

Keep a decision ledger

Record failed ideas as well as retained changes. Field monitoring and synthetic budgets catch different kinds of regression.

Questions about performance-optimization

Does installing it measure performance?

No. Actual traces, measurements and runtime tools still need to be run on the target system.

Is a small average gain enough?

Not when it is inside run-to-run variation; repeat comparable measurements.

Can tests be removed to improve a score?

No. Correctness gates the result; dropping required behavior is a regression.

Are the sample budgets universal?

No. Agree on meaningful project metrics and budgets for the actual users and environment.

More AI skills

Related skills

Skill categories

Buy me a coffee