performance-optimization
Skill216 starsChanged 6 months agoMITView on GitHub
Measure first, optimize second. Data-driven performance improvements with before/after benchmarks and production validation.
We split this skill into the rules it gives an agent
7 rules. 0 are common, 7 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 102 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
When performance issues are reported in production
- Distinctive: line 16
Before optimizing any code (to ensure you're optimizing the right thing)
- Distinctive: line 17
When reviewing changes that touch performance-sensitive paths
- Distinctive: line 26
Write the performance test you'll use to validate improvement.
- Distinctive: line 32
Use profiling tools: flame graphs, CPU profiles, memory profiles.
- Distinctive: line 51
Run the same performance test from Step 1.
- Distinctive: line 53
If improvement < 20%: the optimization may not be worth the complexity.
“Common” is measured: kept by at least 6 in 10 of the 102 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Overview
Premature optimization is the root of all evil. But ignoring performance until it's a crisis is equally harmful. This skill enforces data-driven optimization: profile first, optimize the bottleneck, measure the improvement.
When to Use
- When performance issues are reported in production
- Before optimizing any code (to ensure you're optimizing the right thing)
- When reviewing changes that touch performance-sensitive paths
Process
Step 1: Measure the Baseline
- Reproduce the performance issue reliably.
- Measure current performance: latency p50/p95/p99, throughput, memory, CPU.
- Profile to find the actual bottleneck — not where you think it is.
- Write the performance test you'll use to validate improvement.
Verify: You have concrete baseline numbers, not gut feelings.
Step 2: Identify the Real Bottleneck
- Use profiling tools: flame graphs, CPU profiles, memory profiles.
- Find the top 3 hotspots by actual execution time (not lines of code).
- The bottleneck is rarely where you expect it to be. Trust the data.
Verify: Bottleneck identified by profiling data, not assumption.
Step 3: Optimize Only the Bottleneck
- Fix only the profiled bottleneck — nothing else.
- Common optimizations by type:
- CPU: Algorithmic improvement (O(n²) → O(n log n)), caching, batching
- Memory: Streaming instead of buffering, object pooling, lazy loading
- I/O: Connection pooling, N+1 query elimination, caching, async/parallel calls
- AI: Prompt caching, batch inference, smaller models for simpler tasks
Verify: Change targets the profiled bottleneck, not speculative improvements.
Step 4: Measure the Improvement
- Run the same performance test from Step 1.
- Compare before vs. after metrics.
- If improvement < 20%: the optimization may not be worth the complexity.
Verify: Improvement measured with the same test harness as baseline.
Common Rationalizations (and Rebuttals)
| Excuse | Rebuttal |
| "I know where the bottleneck is" | You're probably wrong. Profile first. |
| "This is clearly slow" | "Clearly slow" rarely matches profiler output. Measure. |
| "We'll optimize later" | If it's slow enough to mention, it's slow enough to measure now. |
Verification
- Baseline metrics captured before any optimization
- Bottleneck identified by profiler (not assumption)
- Optimization targets only the profiled bottleneck
- Improvement measured with same test harness
- Before/after numbers documented
References
- references/performance-checklist.md
- observability skill
Other versions117 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 117
- addyosmani/agent-skills★ 112ksame name
- gamedev-skills/awesome-gamedev-agent-skills★ 6.4ksame name
- sanity-io/sanity★ 6.4ksame name
- compozy/compozy★ 2.8ksame name
- ollaya-dev/ollaya★ 1.4ksame name
- buddy-compiler/buddy-mlir★ 769same name
- ThibautBaissac/rails_ai_agents★ 665same name
- rizqinrr/viserys-agent★ 556same name
- derHaken/SuperAntigravity★ 439same name
- ukanwat/aaabench★ 399same name
107 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use constraint-driven-development, git-workflow-and-versioning and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MrCipherSmithSkillconstraint-driven-development
Use when a project needs a persistent, measurable quality bar — starting a project without documented standards, 'set up constraints', or when coverage/perf/a11y thresholds get re-debated per-PR. Produces CONSTRAINTS.md with enforceable numbers, ratchets, and a guard against silent weakening. NOT for throwaway prototypes or a one-off CI setup.
Also in 13 projects that use this
LLl0k0laDSkillgit-workflow-and-versioning
Use when making any code change. Use when committing, branching, resolving conflicts, or when you need to organize work across multiple parallel streams.
Also in 39 projects that use this
LLl0k0laDSkillusing-agent-skills
Use when starting a session or when you need to discover which skill applies to the current task. This is the meta-skill that governs how all other skills are discovered and invoked.
Also in 31 projects that use this
HK-hubSkilldeprecation-and-migration
Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when deciding whether to maintain or sunset existing code.
Also in 35 projects that use this
ukanwatSkillinput-systems
Architect game input — action mapping (abstracting keys into named actions), rebinding with conflict detection and persistence, multi-device support (keyboard, gamepad, touch), analog deadzones, and feel features like input buffering and coyote time, plus accessibility. Engine-neutral. Use when the user mentions input mapping, rebind controls, gamepad support, deadzone, input buffering, coyote time, or accessible controls.
Also in 4 projects that use this
HK-hubSkillobservability-and-instrumentation
Instruments code so production behavior is visible and diagnosable. Use when adding logging, metrics, tracing, or alerting. Use when shipping any feature that runs in production and you need evidence it works. Use when production issues are reported but you can't tell what happened from the available data.
Also in 26 projects that use this
- +6 more from LLl0k0laD
In this repository34 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-qa-run-reviewSkill
- ai-output-validationSkill
- api-designSkill
- ci-cd-pipelinesSkill
- citruscoastaiSkill
- code-explanationSkill
- code-reviewSkill
- context-loadingSkill
- debugging-methodologySkill
- documentationSkill
- error-handlingSkill
- frontend-engineeringSkill
- git-workflowSkill
- goal-driven-executionSkill
- hallucination-preventionSkill
- idea-to-specSkill
- incremental-codingSkill
- integration-testingSkill
- meeting-notes-to-tasksSkill
- multi-agent-orchestrationSkill
- observabilitySkill
- production-deploymentSkill
- prompt-injection-defenseSkill
- rag-and-memorySkill
- refactoringSkill
- research-and-summarizeSkill
- security-hardeningSkill
- simplicity-firstSkill
- surgical-changesSkill
- task-decompositionSkill
- test-driven-developmentSkill
- think-before-codingSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

