performance-optimization
Skill47 starsChanged 4 months agoMITView on GitHub
Use when performance is a real concern — measure first, isolate the bottleneck, and prove the improvement instead of guessing
83 other projects use a version of this.
Adopted by
Most recently taken up by
- Lukk17/agent-standardstheir own version, first seen Oct 5, 2026
- GuillemRoca/agent-skills-androidtheir own version, first seen Oct 3, 2026
- addyosmani/agent-skillstheir own version, first seen Oct 3, 2026
- weisser-dev/agentic-skillstheir own version, first seen Oct 3, 2026
- Rvey/agent-engineering-kittheir own version, first seen Oct 1, 2026
- JPeetz/agent-skillstheir own version, first seen Sep 29, 2026
Used with
Projects with it also use constraint-driven-development, using-agent-skills and 8 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.
vinvcnSkillconstraint-driven-development
把一个项目的质量线确立为书面契约,并阻止 agent 悄悄降低它。通过访谈确定用户在意哪些维度,当用户心里没有数字时提供合理的默认阈值,把一切记录进 CONSTRAINTS.md,并盯住 diff 中质量线被削弱的迹象——新增的 @ts-ignore 或 eslint-disable 抑制注释、被跳过或删除的测试、被剥掉的断言、未实现的 stub、被调低的阈值。当没有任何质量线被写下来时使用;当用户说 "set up constraints" 或 "define our standards" 时;当用户希望把他们在意的维度——无障碍性、Web 性能、覆盖率——设置成被强制执行的约束时;当 agent 为了变绿不断静默检查或跳过测试时;当你需要一个覆盖率或性能阈值却不知道该选什么数字时;或者当 agent 写下的代码超出任何人会读的体量时。
Also in 4 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 21 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 23 projects that use this
borhen68Skillobservability-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 12 projects that use this
az9713Skillcode-simplification
Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.
Also in 29 projects that use this
- +5 more from LLl0k0laD
Other versions83 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 83
- addyosmani/agent-skills★ 101ksame name
- rohitg00/awesome-claude-code-toolkit★ 2.7ksame name
- gamedev-skills/awesome-gamedev-agent-skills★ 1.3ksame name
- ukanwat/overtime★ 387same name
- Mindrally/skills★ 266same name
- shashankswe2020-ux/whoop-mcp★ 165same name
- magnus919/agent-skills★ 109same name
- thiientv/godmode★ 96same name
- dylantarre/animation-principles★ 94same name
- DevelopersGlobal/ai-agent-skills★ 69same name
73 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 repository111 other files it gives its agents.
- AGENTS.mdAGENTS.md
- COPILOT-INSTRUCTIONS.mdCopilot instructions
- .github/copilot-instructions.mdCopilot instructions
- ai-visibilitySkill
- content-strategySkill
- seoSkill
- actions-debuggingSkill
- agentic-engineeringSkill
- autopilot-patternsSkill
- background-agentSkill
- context-primeSkill
- copilot-memorySkill
- cross-session-memorySkill
- ecosystem-intakeSkill
- fleet-parallelSkill
- github-code-searchSkill
- github-codespaces-efficiencySkill
- github-issue-triageSkill
- github-pr-workflowSkill
- ide-switchingSkill
- knowledge-curatorSkill
- mcp-builderSkill
- mcp-ecosystemSkill
- multi-model-strategySkill
- plan-mode-masterySkill
- scope-guardSkill
- session-managementSkill
- stack-detectorSkill
- sub-agent-sandboxingSkill
- task-intake-routerSkill
- team-plannerSkill
- token-cost-optimizerSkill
- api-and-interface-designSkill
- code-reviewSkill
- context-engineeringSkill
- cpp-debuggingSkill
- deprecation-and-migrationSkill
- diagnoseSkill
- fix-build-errorsSkill
- fix-github-issueSkill
- implementSkill
- improve-codebase-architectureSkill
- nestjs-prismaSkill
- nextjs-prismaSkill
- pr-multi-perspective-reviewSkill
- prototypeSkill
- react-vitestSkill
- receiving-code-reviewSkill
- refactor-cleanSkill
- reviewSkill
- skill-creatorSkill
- source-driven-developmentSkill
- spec-driven-developmentSkill
- systematic-debuggingSkill
- tdd-workflowSkill
- zoom-outSkill
- add-to-changelogSkill
- api-documentationSkill
- architecture-decisionsSkill
- code-tourSkill
- 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 72 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 12
Do not optimize by instinct.
- Distinctive: line 42
Write the target in one line:
- Distinctive: line 63
Keep the baseline numbers in the task notes, PR, or issue.
- Distinctive: line 67
Look for the one thing consuming most of the time:
- Distinctive: line 75
Use the 80/20 rule: fix the dominant bottleneck before touching minor inefficiencies.
- Distinctive: line 93
Keep or revert based on evidence
- Distinctive: line 95
If performance improves but correctness or maintainability regresses sharply, it is not a win.
- Distinctive: line 124
Leave micro-optimizations for last
“Common” is measured: kept by at least 6 in 10 of the 72 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
Do not optimize by instinct. Start with measurement, change one thing at a time, and confirm the result with the same metric you used at the beginning.
When to Use
- A user or monitoring system reports a slow page, endpoint, query, or job
- A new feature needs a performance baseline before release
- You suspect a regression and need evidence before changing code
- A hot path is doing real work at scale and latency or throughput matters
When NOT to Use
| Instead of performance-optimization | Use |
| Obvious correctness bug | systematic-debugging |
| General frontend inspection without a clear perf question | browser-devtools |
| Micro-tuning without user impact | leave it alone |
| "Feels slow" with no measurement plan | define a measurable target first |
Workflow
1. Define the metric that matters
Pick the metric before touching code:
- Web UI: LCP, INP, CLS, bundle size, render time
- API: p50 / p95 / p99 latency, throughput, error rate
- Database: query duration, rows scanned, lock wait time
- Background jobs: wall-clock duration, queue time, memory growth
Write the target in one line:
Goal: reduce p95 /search latency from 850ms to under 400ms.2. Capture a baseline
Measure the current state using the closest native tool:
# Node.js CPU profiling
node --prof server.js
# Frontend runtime inspection
# Use browser devtools / Lighthouse and record the before numbers
# Database query analysis
# EXPLAIN ANALYZE <query>Keep the baseline numbers in the task notes, PR, or issue.
3. Find the dominant bottleneck
Look for the one thing consuming most of the time:
- Repeated expensive work
- N+1 queries or redundant network calls
- Heavy rendering or oversized bundles
- Serialization / parsing cost
- Synchronous work on the critical path
Use the 80/20 rule: fix the dominant bottleneck before touching minor inefficiencies.
4. Form one optimization hypothesis
Hypothesis: caching the normalized search filters will reduce repeated query-building work and cut p95 latency by ~30%.
Test: add the cache, rerun the same benchmark, compare p95 latency.
Rollback: remove the cache if latency does not improve or invalidation gets messy.One hypothesis, one change, one measurement.
5. Re-measure with the same test
After each change:
- Re-run the same benchmark or profiling flow
- Compare against the original baseline
- Keep or revert based on evidence
If performance improves but correctness or maintainability regresses sharply, it is not a win.
6. Document the result
Record:
- Baseline metric
- Final metric
- What changed
- Why the change helped
- Any tradeoff introduced (memory, complexity, cache invalidation, eventual consistency)
Practical Targets
| Area | Healthy target |
| LCP | <= 2.5s |
| INP | <= 200ms |
| CLS | <= 0.1 |
| API p95 latency | Fits product SLO; usually far below 1s for interactive endpoints |
| Slow DB query | Moves from table scan / many-row scan toward indexed, explainable execution |
Optimization Order
- Remove unnecessary work
- Fix algorithmic complexity
- Eliminate duplication or N+1 patterns
- Parallelize or pipeline safe independent work
- Cache with explicit invalidation rules
- Leave micro-optimizations for last
Common Mistakes
| Mistake | Fix |
| Optimizing before measuring | Record a baseline first |
| Changing five things at once | Make one testable change at a time |
| Chasing average latency only | Track tail latency (p95 / p99) too |
| Adding a cache without invalidation strategy | Define freshness, eviction, and rollback before shipping |
| Keeping a "faster" change that hurts readability for no user-visible gain | Revert it |
Verification
- Baseline metric was recorded before optimization
- The dominant bottleneck was identified with data, not intuition
- Each optimization had a written hypothesis
- Final measurement used the same method as the baseline
- Performance improved without breaking correctness
See Also
browser-devtools— inspect runtime behavior in the browsersystematic-debugging— root-cause workflow for non-performance bugstest-coverage— protect the optimized path with regression tests
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.

