Skip to content
Back to skills

Performance Optimization

ASecurity

Investigate slow paths and optimize measured bottlenecks.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 9, 2026
ai-agentsperformance

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned November 9, 2026

npx -y skills add jaydubya818/MissionControl --skill performance-optimization --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Performance Optimization?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Performance Optimization
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jaydubya818-performance-optimization/badge)](https://www.skillsdirectory.com/skills/jaydubya818-performance-optimization)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: performance-optimization
description: "Investigate slow paths and optimize measured bottlenecks."
license: MIT
metadata:
  author: Addy Osmani and Skillz contributors
  source: addyosmani/agent-skills
  source-commit: 301b02b12bff98e4688e6984af6556802322bbde
  adaptation: curated-rewrite
  owner: software-factory
  risk: medium
  capabilities: addyosmani,performance-optimization
---

# Performance optimization

Use measurements to choose a bottleneck, change one cause, and compare the
result under the same workload. A suspected regression justifies investigation;
it does not justify speculative caching, rewrites, or larger infrastructure.

## Establish the baseline

Name the user journey or operation, observed symptom, and agreed performance
budget. Record revision, dataset, runtime, hardware or device class, network,
cache state, concurrency, and measurement method. Repeat enough to identify
noise and state the sample size. Keep cold-start and warm measurements separate.

For web work, distinguish field data from laboratory traces. Field Core Web
Vitals use real user experiences; a Lighthouse run or synthetic interaction
cannot establish production INP. Verify current metric definitions and thresholds
against [web.dev's Web Vitals guide](https://web.dev/articles/vitals) when using
them. Report device segments and the period covered by field measurements.

For services, inspect latency distributions, throughput, errors, saturation,
queue time, and query counts. CPU time alone does not explain I/O waits. Use
representative payloads and concurrency within the authorized test budget.

## Find and change the cause

Trace one slow path through rendering, network, application code, queries, and
external dependencies as relevant. Optimize the measured bottleneck:

- Remove unnecessary requests or N+1 queries after verifying the access pattern.
- Reduce shipped or decoded bytes when transfer or parsing dominates.
- Break up long main-thread work when it blocks measured interactions.
- Change indexing or query shape after examining the actual execution plan.
- Reduce retained objects or concurrency when memory or saturation is the limit.

Keep correctness checks alongside the benchmark. Do not trade away authorization,
data freshness, error handling, or output quality to improve a metric. Request
architecture or product decisions when the tradeoff exceeds the agreed scope.

## Cache only with a consistency contract

Include every response-varying input in the key, including tenant, permissions,
locale, and feature state where relevant. Define invalidation, retention,
acceptable staleness, and behavior after authorization changes. Bound memory,
handle concurrent misses, and distinguish missing data from dependency failure.

For money, permissions, or inventory decisions that require freshness, use the
authoritative state at the decision boundary. A faster stale answer can be a
correctness bug. Test cross-tenant isolation and stale-data behavior explicitly.

## Compare, keep, or revert

Repeat the baseline workload with the same method. Report absolute values,
relative change, noise, and any cost or error regression. If the result does not
support the hypothesis, revert only this task's experiment and record what was
learned. Stop when the agreed budget is met or a dependency blocks measurement.

Add a representative regression check or monitoring signal where it will catch
the demonstrated failure. Avoid brittle timing assertions in ordinary unit
tests. Do not claim a production improvement from a local microbenchmark.

Files in this skill

  • LICENSE1 KB
  • SKILL.md3.5 KB
  • agents/openai.yaml224 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.