/oss-skills:performance-benchmarkingfrom oss-skills
Guides building credible benchmarks with statistical rigor, fair comparisons, and honest reporting. Covers profiling, methodology, and CI regression detection.
Ships in oss-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
"Blazing fast" in a README is worth nothing. A reproducible benchmark with a stated methodology is worth a great deal — and a benchmark that gets caught being unfair costs more than never publishing one.
Non-negotiable order: measure → find the actual hot spot → change one thing → measure again. Programmer intuition about hot paths is wrong most of the time, and optimizing cold code adds complexity for zero benefit.
# Sampling profilers — start here
py-spy record -o profile.svg -- python app.py # Python, no code changes
node --cpu-prof app.js # Node
cargo flamegraph --bench my_bench # Rust
go test -cpuprofile cpu.out -bench . && go tool pprof -http=: cpu.out
perf record -g ./binary && perf report # anything on Linux
Read the flame graph for width, not height. Deep stacks are normal; wide frames are where time goes. And check allocation profiles too — in managed languages, GC pressure is frequently the real answer and never appears as an obvious hot function.
A benchmark nobody can reproduce is marketing. Requirements:
Use a harness that handles the statistics for you rather than hand-rolled timing loops:
hyperfine --warmup 3 --runs 50 'old-bin input.json' 'new-bin input.json' # CLI tools
cargo bench # criterion: statistics + regression detection
pytest-benchmark / asv # Python
node --expose-gc + tinybench / mitata
go test -bench . -benchmem -count=10 | benchstat # benchstat gives significance
benchstat and criterion do the thing most hand-written benchmarks skip: telling you
whether the difference is statistically significant at all.
Microbenchmarks lie more often than they inform.
std::hint::black_box, benchmark.Keep, or assert on the output.When in doubt, benchmark at a level users can perceive: a whole request, a whole file parse, a whole build.
The highest-risk content you can publish. Do it fairly or not at all — the maintainers of the project you benchmarked will read it, and being publicly corrected on an unfair benchmark is a reputational event that outlives the blog post.
Rules:
State the workload in the claim itself: not "3× faster" but "parses a 50 MB NDJSON file 3.1× faster than X v4.2 on an M3 Pro (median of 50 runs, ±3%)."
Continuous benchmarking is valuable, but shared CI runners have 10–30% variance — naive thresholds produce constant false alarms and get muted within a month.
Approaches that survive contact with reality:
cachegrind /
iai-callgrind / valgrind --tool=callgrind make this practical, and a 2% change
in instruction count is real signal.github-action-benchmark) and investigate sustained slopes.In the README, keep it to one line with a link. In docs/benchmarks.md, give the full
picture: methodology, hardware, versions, dataset, raw numbers, the harness link, and
the caveats. Include a "when this project is slower" section — it is the most credible
paragraph you will write.
Re-run before every major release. A benchmark from three versions ago is a claim you are no longer making truthfully.
Questions that expose most bad benchmarks in under a minute:
If a benchmark cannot answer 1–3, it is not evidence. Say so plainly and without hostility.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub the-open-agent/oss-skills --plugin oss-skills18 skills in this plugin
/api-designDesign public interfaces for libraries and tools that other people depend on. Use when designing or reviewing a public API surface, deciding what to export, naming functions and CLI flags, adding configuration options, planning deprecations, or when the user asks "is this a good API" or "how do I change this without breaking users". Covers minimal surface area, error design, async and extension patterns, CLI ergonomics, config precedence, and stability guarantees. Also use before a 1.0 release to freeze the interface./ci-pipelinesDesign continuous integration for an open-source repository. Use when setting up GitHub Actions from scratch, when CI is slow or flaky, when adding a build matrix across OS and language versions, when configuring caching, or when handling PRs from forks that need secrets. Covers workflow structure, concurrency and cancellation, caching strategy, required checks and branch protection, self-hosted runner risks, and keeping CI cheap. Also use for "our CI takes 40 minutes" or "why is CI failing on forks"./code-reviewReview a pull request the way a good open-source maintainer does. Use when reviewing an incoming PR, when the user asks "review this PR" or "is this ready to merge", when triaging a stale PR queue, or when writing review feedback to an external contributor. Covers what to check and in what order, severity levels, phrasing feedback so people come back, handling large or unwanted PRs, first-time contributors, AI-generated submissions, and closing PRs kindly. Complements the built-in /code-review command by adding the maintainer and community dimension./contributor-experienceTurn users into contributors and make their first PR succeed. Use when a project gets stars but no contributions, when first-time PRs stall or get abandoned, when writing or improving CONTRIBUTING.md, when setting up a dev environment that works on the first try, or when the user asks "how do I get contributors" or "why does nobody contribute". Covers the contribution funnel, good first issues, local setup, mentorship, recognition, and onboarding a contributor into a maintainer./dependency-hygieneManage a project's dependencies so they stay small, current, and safe. Use when deciding whether to add a dependency, auditing an existing dependency tree, configuring Dependabot or Renovate, dealing with upgrade churn or a flood of bot PRs, resolving version conflicts, choosing between dependency ranges and pinning, or removing an unmaintained dependency. Also use for "our install is huge", "too many Dependabot PRs", or before publishing a library that others will depend on./docs-architectureStructure and write project documentation beyond the README. Use when docs have sprawled into an unnavigable pile, when users keep asking questions the docs already answer, when choosing a docs site generator (Docusaurus, MkDocs, VitePress, mdBook, Sphinx), or when planning a docs information architecture. Covers the Diataxis framework (tutorial/how-to/reference/explanation), versioning docs across releases, API reference generation, doc testing, and migration guides. Also use for "write docs for this project" or "our docs are bad".