go-benchmark

go-benchmark is a skill for Claude Code from RaNDoM6913/claude-code-superkit. It costs 72 tokens per session (2,163 once invoked), scanned A, original, MIT.

A methodology guide for measuring Go code performance with the testing.B benchmark API. Benchmarks repeatedly run code so speed, memory use, and allocations can be compared.

In plain words
What is it for?
Use it to write and run benchmarks, compare results with benchstat, create sub-benchmarks, and capture CPU, memory, or execution traces.
Why use it?
It reduces misleading conclusions caused by noisy measurements, setup work, compiler optimization, or visual comparison of results.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions Codex.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is go test -bench=. ./pkg/cache/....

Good fit Use it to write and run benchmarks, compare results with benchstat, create sub-benchmarks, and capture CPU, memory, or execution traces.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/RaNDoM6913/claude-code-superkit
agentmods
npx agentmods add skills/random6913/claude-code-superkit/go-benchmark

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-benchmark

README.md
[![agentmods](https://agentmods.dev/badge/skills/random6913/claude-code-superkit/go-benchmark/github.svg)](https://agentmods.dev/skills/random6913/claude-code-superkit/go-benchmark)
Your own site
<a href="https://agentmods.dev/skills/random6913/claude-code-superkit/go-benchmark"><img src="https://agentmods.dev/badge/skills/random6913/claude-code-superkit/go-benchmark/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-benchmark

Your own site · 80×15
<a href="https://agentmods.dev/skills/random6913/claude-code-superkit/go-benchmark"><img src="https://agentmods.dev/badge/skills/random6913/claude-code-superkit/go-benchmark.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,163 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.00072 $0.02163
Opus 5.5 $0.00029 $0.00865
Sonnet 5.5 $0.00014 $0.00433
Haiku 4.5 $0.00007 $0.00216

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

Security

Grade A, and why

go-benchmark 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 12d 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.

packages/codex/skills/go-benchmark/SKILL.md · 222 lines

How it starts

The opening of the file, as written. The whole thing — 222 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Go Benchmark Methodology

Upstream: https://pkg.go.dev/testing#hdr-Benchmarks · https://pkg.go.dev/golang.org/x/perf/cmd/benchstat

Why Methodology Matters

Repeated samples expose variation. Choose the number of samples for the workload and comparison.

  1. Collect repeated samples under comparable conditions. Six samples alone cannot establish significance.
  2. Compare with benchstat, not eyeball percentages.
  3. Quiet machine — close heavy apps; plug in the laptop.
  4. Always use -benchmem. Allocations are usually what changed.

testing.B Basics

func BenchmarkUserLookup(b *testing.B) {
    repo := newRepo(b)
    b.ReportAllocs() // force B/op + allocs/op output
    b.ResetTimer()   // drop setup cost
    for i := 0; i < b.N; i++ {
        _, err := repo.FindByID(context.Background(), 42)
        if err != nil { b.Fatal(err) }
    }
}
  • b.N is adjusted by the framework until total runtime hits -benchtime (default 1s).
  • Write the body so b.N iterations make sense.
  • Don't swallow errors — use b.Fatal.

Timing Control

b.StopTimer()
for i := 0; i < b.N; i++ {
    data := buildHeavyInput(i)
    b.StartTimer()
    _ = process(data)
    b.StopTimer()
}

For a traditional b.N loop, reset after one-time setup. From Go 1.24, for b.Loop() { … } resets the timer on its first call and stops it on return of false. Per-iteration preparation inside either loop is timed unless explicitly excluded.

Throughput

payload := make([]byte, 4096)
b.SetBytes(int64(len(payload)))
b.ResetTimer()
for i := 0; i < b.N; i++ { _ = json.Unmarshal(payload, &out) }
// Output: ... 250 MB/s

Sub-Benchmarks

func BenchmarkSort(b *testing.B) {
    for _, n := range []int{100, 1_000, 10_000, 100_000} {
        b.Run(fmt.Sprintf("n=%d", n), func(b *testing.B) {
            data := randInts(n)
            b.ResetTimer()
            for i := 0; i < b.N; i++ {
                cp := slices.Clone(data)
                slices.Sort(cp)
            }
        })
    }
}

Read the full file on GitHub · 222 lines

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. 12d ago Changed · +4 lines 12c95d403b37
  2. 1mo ago Changed · +5 lines 01a87391322a
  3. 3mo ago First seen · 213 lines · 72 tokens per session scan A e36062267c1e

Subscribe to this mod's changes

go-benchmark is a skill published in the GitHub repository RaNDoM6913/claude-code-superkit (3 stars, last pushed yesterday), licensed MIT. It adds 72 tokens to every session and 2,163 once invoked, about $0.0003 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-08-31.

Related

go-benchmark compared with skills from other repositories

go-benchmark next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
go-benchmarkRaNDoM6913/claude-code-superkitSkill3yesterdayMITA72Claude Code
golang-testingaffaan-m/ECCSkill314kyesterdayMITA37Claude Code, Kiro
golang-patternsaffaan-m/ECCSkill314kyesterdayMITA45Claude Code, Kiro
go-ops0xDarkMatter/claude-modsSkill867d agoMITA89Claude Code
chiclaude-dev-suite/claude-dev-suiteSkill51todayMITA119Claude Code
echoclaude-dev-suite/claude-dev-suiteSkill51todayMITA112Claude Code
ginclaude-dev-suite/claude-dev-suiteSkill51todayMITA114Claude Code