performance-optimization
Skill1 starsChanged 4 days agoMITView on GitHub
Identify and resolve performance bottlenecks via static analysis — N+1 queries, algorithmic complexity, query optimization, caching, memory leaks, bundle size, connection management. Triggers: this is slow, optimize, performance, N+1, query optimization, caching, bundle size, memory leak, latency, response time, scale, bottleneck.
125 other projects use a version of this.
Adopted by
Most recently taken up by
- valentinesamuel/claude-skillstheir own version, first seen Nov 8, 2026
- ishandutta2007/Awesome-Claude-Skillstheir own version, first seen Nov 8, 2026
- ishandutta2007/Awesome-Agent-Skillstheir own version, first seen Nov 8, 2026
- paramcodes/skillstheir own version, first seen Nov 8, 2026
- nisarth/claude-skills-storetheir own version, first seen Nov 8, 2026
- DnsQueen/orcinus-skillstheir own version, first seen Nov 8, 2026
Used with
Projects 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 15 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 42 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 33 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 39 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 31 projects that use this
- +6 more from LLl0k0laD
Other versions125 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 125
- addyosmani/agent-skills★ 114ksame name
- sanity-io/sanity★ 6.4ksame name
- gamedev-skills/awesome-gamedev-agent-skills★ 6.4ksame name
- compozy/compozy★ 2.9ksame name
- ollaya-dev/ollaya★ 1.4ksame name
- buddy-compiler/buddy-mlir★ 773same name
- ThibautBaissac/rails_ai_agents★ 665same name
- derHaken/SuperAntigravity★ 439same name
- ukanwat/aaabench★ 399same name
- ukanwat/overtime★ 399same name
115 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.
In this repository68 other files it gives its agents.
- AGENTS.mdAGENTS.md
- accessibility-designSkill
- ai-evaluationSkill
- api-designSkill
- architecture-designSkill
- architecture-documentationSkill
- brainstormingSkill
- browser-verificationSkill
- bug-investigatingSkill
- build-vs-buySkill
- cicd-pipelineSkill
- code-archaeologySkill
- code-reviewingSkill
- code-slop-cleanupSkill
- compliance-privacySkill
- configuration-strategySkill
- containerizationSkill
- data-modelingSkill
- data-pipeline-designSkill
- data-qualitySkill
- dependency-impact-analysisSkill
- dependency-managementSkill
- deployment-checklistSkill
- deployment-repoSkill
- dx-auditSkill
- effort-estimationSkill
- exploratory-data-analysisSkill
- feature-planningSkill
- finops-cost-optimizationSkill
- frontend-architectureSkill
- gitops-deliverySkill
- git-workflowSkill
- incident-responseSkill
- infrastructure-as-codeSkill
- llm-app-engineeringSkill
- metrics-and-okrsSkill
- ml-experiment-trackingSkill
- ml-model-deploymentSkill
- ml-pipeline-designSkill
- mobile-architectureSkill
- mobile-releaseSkill
- notebook-to-productionSkill
- observability-designSkill
- plan-executionSkill
- prd-writingSkill
- project-documentationSkill
- project-proposalSkill
- project-reviewSkill
- refactoringSkill
- release-managementSkill
- research-methodologySkill
- resilience-engineeringSkill
- retrospectiveSkill
- rollback-strategySkill
- security-auditSkill
- skill-routerSkill
- statistical-analysisSkill
- strategic-reviewSkill
- subagent-orchestrationSkill
- tdd-workflowSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 8 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 110 edited versions we read keep these.
8
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 18
Before touching code, establish baselines:
- Distinctive: line 26
If the user doesn't have measurements, help them instrument first (see Step 2).
- Distinctive: line 57
Write or confirm a performance test exists (even a simple timing assertion)
- Distinctive: line 60
Check for regressions (functional tests still pass, other paths not degraded)
- Distinctive: line 66
Document what was changed and why (this prevents someone from "cleaning up" the optimization later)
- Distinctive: line 71
Premature optimization: Don't optimize code that runs once at startup or handles 10 requests/day
- Distinctive: line 72
Micro-optimization: Don't optimize individual array operations when the real bottleneck is a database query taking 2 seconds
- Distinctive: line 75
Sacrificing readability: If the optimization makes the code unmaintainable, it's a bad trade unless the performance gain is critical
“Common” is measured: kept by at least 6 in 10 of the 110 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
Performance Optimization
Identify and resolve performance bottlenecks through static analysis and design review. Good performance optimization is measurement-driven — identify the bottleneck first, optimize second.
Core Rule
Never optimize without understanding the bottleneck. Random optimization wastes time and often makes things worse. The workflow is always: measure → identify → optimize → verify.
Workflow
Step 1: Understand the Problem
Before touching code, establish baselines:
- What is slow? Specific endpoint, page load, batch job, query?
- How slow? Current latency/throughput numbers (or perceived slowness)
- What's acceptable? Target latency, throughput, or response time
- When did it start? Was it always slow, or is this a regression?
- Under what conditions? Load-dependent, data-size-dependent, time-dependent?
If the user doesn't have measurements, help them instrument first (see Step 2). Optimization without measurement is guessing.
Step 2: Identify the Bottleneck
The bottleneck is almost always in one of these areas. Check in this order (most common first):
- Database queries — N+1 problems, missing indexes, full table scans, unoptimized joins
- External API calls — Sequential calls that could be parallel, no caching of responses
- Algorithmic complexity — O(n²) or worse hiding in loops, nested iterations over large datasets
- Memory usage — Leaks, loading entire datasets into memory, unbounded caches
- Network/I/O — Large payloads, no compression, chatty protocols, missing CDN
- Serialization — Expensive JSON parsing/generation, unnecessary data transformation
- Concurrency issues — Race conditions, lock contention, thread pool exhaustion, async bottlenecks. See references/concurrency.md for patterns and common bugs.
See references/bottleneck-patterns.md for the detailed detection guide.
Step 3: Analyze and Recommend
For each identified bottleneck:
- Explain what the problem is and why it causes slowness
- Quantify the impact (e.g., "This makes 50 DB queries per page load instead of 2")
- Propose a specific fix with expected improvement
- Assess the complexity and risk of the fix
Order recommendations by impact-to-effort ratio. The best optimizations are high impact and low effort.
Step 4: Implement the Fix
Apply one optimization at a time. For each:
- Write or confirm a performance test exists (even a simple timing assertion)
- Apply the change
- Verify the improvement
- Check for regressions (functional tests still pass, other paths not degraded)
Step 5: Verify and Document
After optimization:
- Compare before/after metrics
- Document what was changed and why (this prevents someone from "cleaning up" the optimization later)
- Set up monitoring to alert if performance regresses
Anti-patterns
- Premature optimization: Don't optimize code that runs once at startup or handles 10 requests/day
- Micro-optimization: Don't optimize individual array operations when the real bottleneck is a database query taking 2 seconds
- Caching everything: Caches add complexity and staleness bugs. Cache only what's measured as slow and frequently accessed
- Optimizing the wrong layer: Frontend optimization won't fix a slow API. Database optimization won't fix a slow algorithm
- Sacrificing readability: If the optimization makes the code unmaintainable, it's a bad trade unless the performance gain is critical
Principles Applied
- KISS: The simplest optimization that meets the target wins. Don't build a distributed cache when a database index will do.
- YAGNI: Optimize for current scale, not hypothetical future scale. Document triggers for when to revisit.
- DRY: Centralize caching logic, query optimization, and connection management — don't optimize the same pattern in 10 places.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

