agentleFS
pigligpiglig/go-qr/.claude/skills/perf-check/SKILL.md

perf-check

Skill69 starsChanged 39 days agoMITView on GitHub

Measure the speed, allocations and decode accuracy of the current go-qr changes against main on this machine, the way the project requires for hot-path and decoder changes. Use before opening a pull request that touches encoding, rendering or decoding, or when asked whether a change is slower.

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. NinjaSln-labs/agent-skills★ 1same name
    2. MrCipherSmith/goodai-base★ 0same name
    3. TJM-NZ/claude-skills★ 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 repository3 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 3

    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
  1. Distinctive:

    Never check out base files into the working tree.

    line 14
  2. Very specific:

    If the maintainer has the BoofCV dataset locally, also run TestBoofCV on both versions (see tools/bench/README.md) and compare the decoded …

    line 50
  3. Distinctive:

    Never copy the dataset into the repository.

    line 52
  4. Distinctive:

    Put the tables in the pull request description, stating the machine and how many runs each side had.

    line 56

“Common” is measured: kept by at least 6 in 10 of the 3 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Performance and accuracy check

CI compares every pull request with its base, but its runners are noisy and it holds no real photos. This skill produces the before-and-after numbers that AGENTS.md asks for, on this machine.

1. Build the base in a worktree

Never check out base files into the working tree.

base=$(git merge-base HEAD origin/main)
git worktree add --detach ../go-qr-base "$base"

Both trees need the workspace for the tools module: go work init . ./tools in each, if go.work does not exist.

2. Benchmarks

Pick the benchmarks the change can affect, for example Decode for the decoder, Encode|Segments for encoding, PNG|SVG|Image|Styled for rendering. Alternate the two versions so that drifts in the machine's speed affect both, and run nothing else heavy meanwhile:

for i in $(seq 10); do
  (cd ../go-qr-base && go test -run='^$' -bench='<pattern>' -benchmem -count=1 .) >> /tmp/old.txt
  go test -run='^$' -bench='<pattern>' -benchmem -count=1 . >> /tmp/new.txt
done
(cd tools && go run ./regress bench /tmp/old.txt /tmp/new.txt)

regress prints a Markdown table and exits with status 1 on the same regressions as CI: more allocations, or more than 25% slower.

3. Decode accuracy (decoder changes)

(cd ../go-qr-base/tools && go test -run=TestRobustness ./bench/ -sweep -sweep-native -sweep-out /tmp/old-sweep.json)
(cd tools && go test -run=TestRobustness ./bench/ -sweep -sweep-native -sweep-out /tmp/new-sweep.json)
(cd tools && go run ./regress sweep /tmp/old-sweep.json /tmp/new-sweep.json)

If the maintainer has the BoofCV dataset locally, also run TestBoofCV on both versions (see tools/bench/README.md) and compare the decoded images. Never copy the dataset into the repository.

4. Report

  • Put the tables in the pull request description, stating the machine and how many runs each side had.
  • Name every regression, even a small one, with its numbers. If a feature makes the default path clearly slower, say so and evaluate whether to drop it or make it opt-in. Leave the accept-regression label to the maintainer.
  • Report only what you measured.

5. Clean up

git worktree remove ../go-qr-base

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.