perf-loop
Skill4 starsChanged 2 days agoMITView on GitHub
Make code faster by measurement, not by guess: set a target, build a repeatable benchmark, profile to find where time or memory really goes, change one thing at a time, keep a table of numbers, and keep only changes that beat the noise. Use for "make this faster", "why is this slow", "optimize", "reduce memory", "speed up the build/tests/query", or a performance regression.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- ryanportfolio/winuse-mcptheir own version, first seen Nov 8, 2026
- ryanportfolio/Harness-Firmwaretheir own version, first seen Nov 7, 2026
- ryanportfolio/HarnessFirmware.comtheir own version, first seen Nov 5, 2026
- ryanportfolio/Corewise.Academytheir own version, first seen Nov 5, 2026
- ryanportfolio/STKtheir own version, first seen Oct 20, 2026
- ryanportfolio/savetokenstheir own version, first seen Oct 20, 2026
Used with
Projects with it also use addskill, apply-firmware 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.
ryanportfolioSkilladdskill
Create, import, update, or install repo or personal skills: runtime ownership, resources, discovery checks.
Also in 5 projects that use this
ryanportfolioSkillapply-firmware
Bring current folder (plain folder, existing repo, old or partial firmware copy) up to full Harness Firmware in place. Mirror external repo → adopt-repo.
Also in 5 projects that use this
- +10 more from ryanportfolio
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- fallow-rs/fallow★ 5.3ksame name
- baseballyama/rsvelte★ 249same name
- ryanportfolio/winuse-mcp★ 2same name
- ryanportfolio/Corewise.Academy★ 1same name
- ryanportfolio/Harness-Firmware★ 1same name
- ryanportfolio/savetokens★ 1same name
- ryanportfolio/STK★ 1same name
- ryanportfolio/HarnessFirmware.com★ 0same name
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 repository50 other files it gives its agents.
- agent-writingSkill
- arenaSkill
- blast-radiusSkill
- bun-playwright-runner-selectionSkill
- cinematic-shotSkill
- clean-ui-shotSkill
- codebase-designSkill
- debug-loopSkill
- dep-upgradeSkill
- diagnosing-bugsSkill
- discoverSkill
- domain-modelingSkill
- earshotSkill
- eval-judgeSkill
- flaky-testSkill
- grillingSkill
- grillSkill
- idea-scoutSkill
- improve-codebase-architectureSkill
- interrogateSkill
- make-mediaSkill
- migrate-to-rustSkill
- migration-planSkill
- multi-agent-windows-hazardsSkill
- postmortemSkill
- prototypeSkill
- prSkill
- real-soundSkill
- recallSkill
- release-notesSkill
- repo-mapSkill
- researchSkill
- retroSkill
- secure-diffSkill
- sellSkill
- subagent-report-recoverySkill
- tasteSkill
- taste-skillSkill
- tddSkill
- teachSkill
- to-questionnaireSkill
- to-specSkill
- to-ticketsSkill
- wayfinderSkill
- weeklySkill
- windows-bash-backslash-halvingSkill
- wizardSkill
- writing-for-agentsSkill
- ycSkill
- ystack-upgradeSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
3
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 27
Write what is measured and what counts as done: "p95 of GET /search under 200 ms on the fixture data", "build under 60 s", "peak memory …
- Very specific: line 41
Use a real profiler for the stack (a CPU or sampling profiler, a flame graph, the database's query plan via EXPLAIN ANALYZE, a heap …
- Distinctive: line 53
Run the benchmark and the tests.
- Distinctive: line 62
Keep a change only if it beats the noise and the tests pass.
- Distinctive: line 72
No optimization without a number before and after.
“Common” is measured: kept by at least 6 in 10 of the 7 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
Perf loop
Most guesses about where time goes are wrong. Measure, change one thing, measure again, keep the numbers.
When it applies
- Something is too slow or too memory-hungry and there is a number that would count as fixed.
- A regression: it got slower between two versions (for that, bisect it with the benchmark as the test; see step 2).
Skip it for code that runs once and already finishes in a time nobody minds.
Procedure
1. Set the target
Write what is measured and what counts as done: "p95 of GET /search under 200 ms on the fixture
data", "build under 60 s", "peak memory under 1 GB". No target, no stopping point.
2. Build the benchmark
One command that runs the slow path on realistic input and prints the number. Make it repeatable: same data, warm-up runs discarded, other load off the machine, at least 5 runs. Record the median and the spread. The spread is the noise: a later change must beat it to count.
For a regression, the benchmark plus a threshold is a pass/fail command, so git bisect run can find
the commit.
3. Profile before changing anything
Use a real profiler for the stack (a CPU or sampling profiler, a flame graph, the database's query
plan via EXPLAIN ANALYZE, a heap snapshot, the build tool's timing report). Write down the top 3
hot spots with their share of the total. Optimizing something that takes 2% can save at most 2%.
4. Change one thing
Pick the biggest hot spot. Typical wins, in rough order of payoff: do less work (cache, skip, batch, remove an N+1 query, add an index), a better algorithm or data structure, less allocation or copying, then parallelism. Make one change.
5. Measure and record
Run the benchmark and the tests. Add a row:
| # | Change | Median | Spread | vs base | Tests | Kept |
| 0 | baseline | 840 ms | ±30 | - | pass | - |
| 1 | index on orders.user_id | 310 ms | ±12 | -63% | pass | yes |
| 2 | memoize price lookup | 305 ms | ±15 | -1% | pass | no (noise) |Keep a change only if it beats the noise and the tests pass. Revert the rest; they are complexity with no payoff.
6. Repeat or stop
Re-profile after each kept change: the hot spots move. Stop at the target, or when the top hot spot is something you can't change (network, disk, an external service), and say so.
Rules
- No optimization without a number before and after.
- One change per measurement.
- Correctness first: tests pass on every kept row.
- Report the table, the target, and whether it was met.
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.

