performance-optimization
Skill177 starsChanged 7 days agoApache-2.0View on GitHub
Measure before optimizing; collect profiles, identify the dominant bottleneck, and verify controlled improvements. Use for performance analysis, hotspot profiling, latency, CPU/GPU, memory growth, throughput, lock contention, and scheduler waits.
133 other projects use a version of this.
Adopted by
Most recently taken up by
- ForgeyClap/Forge-Coretheir own version, first seen Nov 16, 2026
- zademy/lu-querytheir own version, first seen Nov 16, 2026
- Alter-ai/skill-labtheir own version, first seen Nov 15, 2026
- tkbk-online/skillstheir own version, first seen Nov 15, 2026
- adymire/CraftLayertheir own version, first seen Nov 15, 2026
- tayyebi/skillstheir own version, first seen Nov 15, 2026
Used with
Projects with it also use constraint-driven-development, using-agent-skills 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 16 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 34 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 43 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 40 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 32 projects that use this
- +7 more from LLl0k0laD
Other versions133 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 133
- addyosmani/agent-skills★ 118ksame name
- gamedev-skills/awesome-gamedev-agent-skills★ 9ksame name
- sanity-io/sanity★ 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
123 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 repository19 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- agent-evaluationSkill
- algorithm-developmentSkill
- buildSkill
- change-reviewSkill
- container-buildSkill
- engineering-solution-designSkill
- interface-migrationSkill
- issue-localizationSkill
- lintSkill
- long-horizon-developmentSkill
- model-artifact-integrationSkill
- multi-repo-devSkill
- repository-agent-setupSkill
- simulation-regressionSkill
- test-impact-analysisSkill
- unified-core-runtimeSkill
- vendorSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 0 are common, 14 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 118 edited versions we read keep these.
14
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Use for resource-consumption or real-time-budget issues.
- Very specific: line 13
If the primary symptom is a functional error, start with issue-localization.
- Distinctive: line 15
Read the module contract, existing performance tools, and test entry points.
- Distinctive: line 17
Use approved environments and permissions.
- Distinctive: line 34
Do not stop another person's process or automatically change CPU frequency, affinity, or GPU power settings.
- Distinctive: line 39
Use low-cost counters and per-stage timing to locate the area first, then select call-stack sampling, tracing, memory, lock, or GPU tools …
- Distinctive: line 61
Check queue waits, upstream supply, and consumer rate limits so that waiting is not misdiagnosed as slow computation.
- Distinctive: line 71
Test one primary causal hypothesis at a time.
- Distinctive: line 74
Before implementation, check correctness, thread safety, data freshness, memory, and worst-case latency constraints.
- Distinctive: line 93
If the difference falls within noise, state that no reliable improvement has been demonstrated.
- Distinctive: line 97
Use a comparison without heavyweight profiling to confirm that an apparent gain is not merely a profiler artifact.
- Distinctive: line 100
Run correctness regressions covering the change.
- Distinctive: line 111
If only analysis was completed, report the confirmed bottleneck and next discriminating experiment.
- Distinctive: line 116
If a tool is missing, permissions are insufficient, or profiling overhead is too high, stop that collection and use existing low-cost …
- Distinctive: line 118
If the alternative cannot support a conclusion, state the blocker.
- Distinctive: line 120
If no hotspot is found, continue narrowing the scope rather than optimizing randomly.
“Common” is measured: kept by at least 6 in 10 of the 118 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
Evidence-Driven Performance Optimization
Scope and prerequisites
Use for resource-consumption or real-time-budget issues. Analyze, measure, and
attribute the bottleneck before optimizing; do not guess hotspots from code
appearance.
If the primary symptom is a functional error, start with
issue-localization.
Read the module contract, existing performance tools, and test entry points;
see the skill index for authoritative command references.
Use approved environments and permissions. Do not automatically install a
profiler or change shared-machine runtime settings.
Workflow
1. Define metrics and freeze conditions
Define metrics, measurement intervals, the current problem, and target budgets, based on user-visible behavior or contractual requirements. Distinguish end-to-end latency, per-stage time, CPU time, throughput, memory peak, and long-term growth. Select mean, tail latency, deadline misses, or frame-drop rate as appropriate; they are not interchangeable.
Fix code and dependency versions, build mode, hardware, container, data, configuration, concurrency, and replay rate. Record warm-up, cache state, input volume, other loads, and measurement overhead. If a shared environment cannot be isolated, report the limitation. Do not stop another person's process or automatically change CPU frequency, affinity, or GPU power settings.
2. Measure a baseline, then localize the bottleneck layer by layer
Use low-cost counters and per-stage timing to locate the area first, then select call-stack sampling, tracing, memory, lock, or GPU tools based on evidence. Do not enable every heavyweight profiler before understanding the problem. Save the profiling scope, tool parameters, and raw results; do not repeat collection when existing evidence is sufficient.
Distinguish bottleneck types:
- Compute: CPU/GPU core work, repeated computation, or growth in problem size.
- Data: Copying, allocation, serialization, I/O, cache, or memory bandwidth.
- Waiting: Locks, queues, scheduling, inter-process communication, and downstream backpressure.
- Memory: Peak, retention, fragmentation, and continued growth; an increase in RSS does not by itself mean a leak.
Explain hotspots using call counts, input size, inclusive/self time, and the critical path. A CPU hotspot does not necessarily cause wall-clock latency. Asynchronous GPU submission time does not mean the kernel has completed; measure at the appropriate completion boundary and state how synchronization perturbs production execution. Check queue waits, upstream supply, and consumer rate limits so that waiting is not misdiagnosed as slow computation.
3. Form an optimization hypothesis
State the chain “evidence → dominant bottleneck → cause → minimal change → expected observable change.” Prioritize the modifiable cause that contributes most to the target metric, estimate the upper bound of its overall benefit, and avoid optimizing expensive functions that are not on the critical path. Test one primary causal hypothesis at a time; do not combine algorithm, thread-count, precision, and cache-policy changes in one experiment.
Before implementation, check correctness, thread safety, data freshness, memory, and worst-case latency constraints. Reducing precision, scenario coverage, or data; increasing caches; or changing behavior is not a free optimization. Make the trade-off explicit and obtain necessary confirmation.
4. Validate a comparison under equivalent conditions
Compare baseline and change using the same input, build mode, metric definition, and timing boundaries. Warm up for steady-state metrics. Keep separate cold-start measurements for cold-start issues; do not use warm-up to hide the cost. Repeat samples based on variability and required decision precision. When useful, interleave baseline and candidate runs to reduce environmental drift. Preserve every sample, sample count, and distribution; do not present a microbenchmark's repeated mean as per-frame P99.
Report absolute values, relative changes, variability, and whether pre-agreed thresholds were met. If the difference falls within noise, state that no reliable improvement has been demonstrated; do not cherry-pick the best run. Microbenchmarks validate local mechanisms; end-to-end performance claims still require evidence under the relevant workload. Use a comparison without heavyweight profiling to confirm that an apparent gain is not merely a profiler artifact.
Run correctness regressions covering the change. Confirm that cost was not shifted to other threads, the GPU, memory, or downstream components and that algorithm quality and tail latency were not sacrificed. Stop once evidence is sufficient.
Deliverables and acceptance
Report workload and environment, metrics and budgets, baseline, profiling evidence, bottleneck attribution, changes, comparison samples, correctness results, and remaining limitations. Performance conclusions must be traceable to raw results. If only analysis was completed, report the confirmed bottleneck and next discriminating experiment; do not claim optimization.
Failure handling
If a tool is missing, permissions are insufficient, or profiling overhead is too high, stop that collection and use existing low-cost evidence. If the alternative cannot support a conclusion, state the blocker. Ask before installing tools or changing the environment. If no hotspot is found, continue narrowing the scope rather than optimizing randomly. Recheck the hypothesis when gains are unstable or functional regressions occur. Revert only experimental changes that are clearly separable and yours; preserve others' work.
Basis
Reuse the performance-layering approach from existing context; comparative
measurement is informed by Google Benchmark.
This workflow includes its own validation steps and does not depend on the
currently missing performance-testing.md or require a new benchmark library.
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.

