bench
Skill1 starsChanged 2 days agoMITView on GitHub
Time the DiffGuide review page and PR sidebar on fixed fixtures and compare runs. Use before and after any change meant to make the page, the sidebar, diff reads or syntax colors faster, and before stating any latency number in a commit, PR or chat.
11 other projects use a version of this.
Adopted by
Most recently taken up by
- MrHashMe/efficiency-playbooktheir own version, first seen Nov 8, 2026
- zedarvates/frugal-skillstheir own version, first seen Nov 8, 2026
- ddalcu/mlx-servetheir own version, first seen Nov 1, 2026
- CorvusWing/CorvusWingtheir own version, first seen Oct 25, 2026
- a-ghorbani/pocketpal-dev-teamtheir own version, first seen Oct 18, 2026
- leo1852098393-blip/mxopstheir own version, first seen Oct 13, 2026
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- FalkorDB/FalkorDB★ 11ksame name
- ddalcu/mlx-serve★ 2.7ksame name
- a-ghorbani/pocketpal-dev-team★ 6same name
- ai-agent-lead/skills★ 3same name
- deevus/skills★ 2same name
- smgglrs-ai/navra★ 2same name
- zedarvates/botte-secrete★ 2same name
- CorvusWing/CorvusWing★ 1same name
- zedarvates/frugal-skills★ 1same name
- leo1852098393-blip/mxops★ 0same name
1 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.
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
Run a baseline with a label before you change code.
- Distinctive: line 35
Put the before and after medians, the run count and the fixture in the commit message.
- Very specific: line 36
Keep timing out of npm test.
“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
Bench the review page
npm run bench times the waits a user sees, on two pinned commit ranges of this repository (typical, 34 files; large, 235 files) on the sidebar (9 PRs, 3 checked out) and on the first open of a PR without a worktree (firstOpen). GitHub answers after latencies measured with gh and git fetch, listed in test/bench/forge.ts, test/bench/sidebar.ts and test/bench/firstOpen.ts. Each host run is a fresh process, so caches start cold.
npm run bench -- --label before # all fixtures, 7 runs, writes .bench/before.json
npm run bench -- --fixture large --runs 5 # one fixture
npm run bench -- --scale 0 # GitHub answers at once
npm run bench -- --compare .bench/before.json .bench/after.json.bench/ is ignored by Git.
Metrics
host.cold.*: first open of a PR page.panelis the page shown,filesthe uncolored files,firstColorsandcoloredthe first and last color batch.host.warm.*: reopen, with colors known.host.viewed.*,host.refresh.*: ticking Viewed and pressing Refresh.host.commit.*: unfolding a commit in a thread.host.analyze.started: Claude's guide build getting its changes.host.*.git,host.*.github: process and request counts. A change that should cut calls shows here.page.*: the page script in Chromium, replaying the messages the fixture's host run sent.files.paintedis the first screen,files.drawnall diffs,longTaskMsandlongestTaskthe main-thread blocks over 50 ms,nodesthe DOM size.saved.*,fresh.*(sidebar): rows drawn with the last list saved and without.tab,files,opened(firstOpen): from the sidebar click to the tab, the files and the end of the open, worktree included.
Procedure
- Run a baseline with a label before you change code. Don't compare against an older file from another branch state.
- Find where the time goes before you pick a fix. Several obvious fixes measured as useless: loading grammars earlier (they load in 46 ms), more than four color workers, trimming GitHub search fields the rows need.
- Change one thing, run again with the same
--runs, and--compare. Use medians; read p95 for noise. - Put the before and after medians, the run count and the fixture in the commit message.
- Keep timing out of
npm test. Unit tests for a speedup count states, requests, calls or batches.
Pitfalls
- The bench can time itself. Handing the page a 3 MB message inside the timed call once counted Playwright's transfer as a 320 ms long task; delivering all color batches in one call overstated long tasks. When a number surprises you, read how
scripts/bench.mjsmeasures it first. - Showing the page earlier opens races. A state arriving during the page's first read once left the page on "Loading changes…" forever. Unit tests missed it;
npm run e2e, whose mock forge answers at once, failed 2 of 4 runs. After making a wait asynchronous, run the e2e several times. - The bench runs workers under plain Node.
npm run e2echecks that they color the local page in VS Code's extension host.
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.

