optimize-codebase-performance
Skill2 starsChanged 11 days agoMITView on GitHub
Measure and improve a named performance bottleneck while preserving correctness. Use when reducing latency, CPU, memory, I/O, rendering cost, startup time, or infrastructure cost. Not for unmeasured cleanup, correctness bugs, or migrations.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- cmdr-chara/chara-toolkitword for word, first seen Oct 13, 2026
Other versions1 project uses a version of this.
Word for word · 1
- cmdr-chara/chara-toolkit★ 2100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
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 repository34 other files it gives its agents.
- AGENTS.mdAGENTS.md
- bin/AGENTS.mdAGENTS.md
- evaluations/AGENTS.mdAGENTS.md
- orchestration/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- skills/AGENTS.mdAGENTS.md
- skills/llms.txtllms.txt
- bug-finderSkill
- codebase-evolution-controllerSkill
- codebase-improvement-plannerSkill
- completion-proofSkill
- content-provenance-hygieneSkill
- cpp-engineeringSkill
- debugging-investigatorSkill
- delegate-with-mission-cardsSkill
- documentation-synchronizerSkill
- expo-react-native-builderSkill
- flutter-production-builderSkill
- go-engineeringSkill
- kotlin-engineeringSkill
- mobile-architecture-directorSkill
- multi-agent-work-coordinatorSkill
- product-design-directorSkill
- production-web-builderSkill
- python-engineeringSkill
- repository-intelligenceSkill
- review-and-refactor-codeSkill
- rust-engineeringSkill
- screenshot-to-interfaceSkill
- security-reviewSkill
- swift-engineeringSkill
- toolchain-preflightSkill
- typescript-quality-enforcerSkill
- verification-and-releaseSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 8 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Use this skill for a named latency/throughput/CPU/memory/GPU/I/O/startup/rendering/database/bundle/infrastructure-cost problem that can be …
- Distinctive: line 14
Do not trigger for unmeasured cleanup, an unknown correctness failure, migration, broad platform audit, or final release approval.
- Distinctive: line 23
Start with measurement; do not rewrite code on intuition.
- Distinctive: line 24
Keep baseline and candidate workloads comparable.
- Distinctive: line 25
Never claim a percentage improvement without paired measurements.
- Very specific: line 31
Establish the baseline: Use references/measurement-and-reporting.md.
- Very specific: line 32
Attribute the bottleneck: Use references/bottleneck-playbook.md across relevant application, data, dependency, runtime, infrastructure, and …
- Distinctive: line 35
Implement one attributable batch at a time: Run focused correctness checks and the same representative benchmark.
- Distinctive: line 36
Report honestly: Keep negative results, noise limits, before/after numbers, trade-offs, and residual bottlenecks.
- Very specific: line 40
Use repository-intelligence for unclear hot paths, debugging-investigator for incorrect behavior, codebase-evolution-controller for …
- Distinctive: line 44
If the workload is not representative or measurement variance hides the effect, improve the measurement before changing more code.
- Distinctive: line 48
Stop when the target is met with comparable evidence, the next change is no longer justified by expected value/risk, or a concrete …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Optimize Codebase Performance
Optimize measured critical paths, not code that merely looks expensive.
Trigger boundary
Use this skill for a named latency/throughput/CPU/memory/GPU/I/O/startup/rendering/database/bundle/infrastructure-cost problem that can be measured.
Do not trigger for unmeasured cleanup, an unknown correctness failure, migration, broad platform audit, or final release approval.
Required inputs
Resolve the critical path, target metric, representative workload, environment, baseline or baseline plan, correctness invariants, budget/stop condition, working-tree state, and approval state.
Safety baseline
- Preserve uncommitted user work.
- Start with measurement; do not rewrite code on intuition.
- Keep baseline and candidate workloads comparable.
- Never claim a percentage improvement without paired measurements.
- Broad optimization edits stop at a proposal unless already authorized.
Workflow
- Define the target. Name the user/system path, metric, workload, environment, and success/stop criteria.
- Establish the baseline. Use
references/measurement-and-reporting.md; collect enough samples/profiles to distinguish signal from noise. - Attribute the bottleneck. Use
references/bottleneck-playbook.mdacross relevant application, data, dependency, runtime, infrastructure, and UI layers. - Form falsifiable hypotheses. Each candidate change needs evidence, mechanism, expected metric movement, correctness risk, and a measurement that can reject it.
- Propose a bounded batch. Without authorization, stop at
AWAITING_APPROVAL. - Implement one attributable batch at a time. Run focused correctness checks and the same representative benchmark. Revert/revise changes that do not help enough or create unjustified regressions.
- Report honestly. Keep negative results, noise limits, before/after numbers, trade-offs, and residual bottlenecks.
Handoffs and interaction boundaries
Use repository-intelligence for unclear hot paths, debugging-investigator for incorrect behavior, codebase-evolution-controller for version/contract transitions, a platform builder (production-web-builder, flutter-production-builder, or expo-react-native-builder) for broader product work, security-review if a performance change crosses a security boundary, and verification-and-release for final ship judgment.
Failure handling
If the workload is not representative or measurement variance hides the effect, improve the measurement before changing more code. If the true bottleneck is outside authorized scope, report it and hand off rather than optimizing a proxy.
Stop conditions
Stop when the target is met with comparable evidence, the next change is no longer justified by expected value/risk, or a concrete scope/environment blocker prevents meaningful measurement.
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.

