pbf: Skill for Claude Code

.claude/skills/go-benchmarks/SKILL.md

go-benchmarks is a skill for Claude Code from maguro/pbf. It costs 57 tokens per session (515 once invoked), scanned A, original, Apache-2.0.

A benchmarking procedure for measuring how a code change affects performance on a frequently used code path. It compares the old and changed versions with repeated benchmark runs and reports the difference with benchstat.

In plain words
What is it for?
It is for Go changes that affect listed hot paths, default options on those paths, dependencies, or the Go version, as well as any claimed performance improvement.
Why use it?
It replaces guesses about speed with measurements made under comparable conditions, and requires a benchmark when the changed path has no coverage.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions AGENTS.md.

This is maguro/pbf's own configuration. It tells Claude Code how to work on pbf itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything pbf configures →

View source ↗ maguro/pbf
Reuse

Borrowing it

Nothing to install: this file belongs to maguro/pbf. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/maguro/pbf/master/.claude/skills/go-benchmarks/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/maguro/pbf

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for go-benchmarks

README.md
[![agentmods](https://agentmods.dev/badge/skills/maguro/pbf/go-benchmarks/github.svg)](https://agentmods.dev/skills/maguro/pbf/go-benchmarks)
Your own site
<a href="https://agentmods.dev/skills/maguro/pbf/go-benchmarks"><img src="https://agentmods.dev/badge/skills/maguro/pbf/go-benchmarks/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for go-benchmarks

Your own site · 80×15
<a href="https://agentmods.dev/skills/maguro/pbf/go-benchmarks"><img src="https://agentmods.dev/badge/skills/maguro/pbf/go-benchmarks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 515 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00057 $0.00515
Opus 5.5 $0.00023 $0.00206
Sonnet 5.5 $0.00011 $0.00103
Haiku 4.5 $0.00006 $0.00052

Measured 5d ago against content hash 0d36c79e0471, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

go-benchmarks scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/go-benchmarks/SKILL.md · 48 lines

What it actually says

Measuring a change on a hot path

AGENTS.md lists the hot paths of this repo and the commands that measure them.

What gets measured

A change that can alter the work done on a hot path is measured before and after the change, on the same machine in the same session. This includes code on the path, default option values on the path, and updates to dependencies on the path and to the Go version.

When unsure whether a change qualifies, measure it. A change that does not alter the work done on the success path, such as an error message, error wrapping, a comment, or a rename, is not measured.

How to measure

Alternate the base runs and the working-tree runs, one sample at a time, for at least ten samples. Compare the results with benchstat. Use the compare command that AGENTS.md names. If AGENTS.md names only a plain benchmark command, check out the base in a separate worktree and alternate by hand.

Do not compare two runs made one after the other. Drift of the machine during the first run makes a false difference in time.

If no benchmark covers the path that changed, add one in the same change. A performance change is not done until the numbers show the gain. A correctness change on a hot path reports its cost.

Report the result in the commit message

The commit message states the result in a separate paragraph, for allocations and bytes per op only, with no time figures. Allocation counts do not drift between runs, and times age with every CPU and Go release.

  • No change: Benchmarks: no change (BenchmarkFoo, BenchmarkBar).
  • A change, where benchstat reports a significant difference and the values differ at three significant figures: before → after and the percentage, for each benchmark that changed. For example: BenchmarkFoo: allocs/op 8.37M → 7.10M (−15.2%), B/op 1.90 GB → 1.62 GB (−14.7%).

A change that is not measured has no benchmark paragraph.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 48 lines · 57 tokens per session scan A 0d36c79e0471

Subscribe to this mod's changes

go-benchmarks is a skill published in the GitHub repository maguro/pbf (57 stars, last pushed 2d ago), licensed Apache-2.0. It adds 57 tokens to every session and 515 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-01.

Related

go-benchmarks compared with skills from other repositories

go-benchmarks next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
go-benchmarksmaguro/pbfSkill572d agoApache-2.0A57Claude Code
golang-testingaffaan-m/ECCSkill298k4d agoMITA37Claude Code, Kiro
golang-patternsaffaan-m/ECCSkill298k4d agoMITA45Claude Code, Kiro
golang-testingsamber/cc-skills-golangSkill3.8k5d agoMITA115Claude Code
golang-uber-fxsamber/cc-skills-golangSkill3.8k5d agoMITA122Claude Code
golang-samber-oopssamber/cc-skills-golangSkill3.8k5d agoMITA74Claude Code
ax-go-agent-optimizeax-llm/axSkill3.0k3d agoApache-2.0A51Claude Code, Codex