golang-benchmark
Design, run, and interpret Go benchmarks, profiles, traces, and compiler diagnostics.
Skill by reagin
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/reagin-golang-benchmark
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/golang-benchmark
What's inside
- Skill name
golang-benchmark- Description
- Design, run, and interpret Go benchmarks, profiles, traces, and compiler diagnostics. Use when measuring a performance question, comparing implementations, or investigating a specific runtime cost.
- License
- MIT
- Instructions
- 69 lines in SKILL.md · view on GitHub
Files (5)
- SKILL.md
- benchstat.md · references/
- compiler-analysis.md · references/
- pprof.md · references/
- trace.md · references/
SKILL.md (first lines)
# Go Benchmarking
Produce evidence that is reproducible enough to support the requested decision. Keep measurement and optimization as separate, independently verified steps.
## Start with the project
Before writing or running anything:
1. Read `go.mod`, repository instructions, existing `Benchmark*` functions, performance tests, and documented commands.
2. Identify the decision, workload, metric, and correctness condition. Latency, throughput, allocations, peak memory, and contention answer different questions.
3. Reuse the project's benchmark fixtures and tooling. If an optional analysis tool is unavailable, report that before changing the environment.
4. Keep the scope narrow enough that setup, unrelated tests, I/O, or shared infrastructure do not dominate the signal.
## Measurement workflow
1. Establish a baseline before changing code.
2. Write a representative benchmark with deterministic inputs and setup outside the timed region.
3. Confirm the benchmark still exercises the intended result; guard against dead-code elimination and accidental caching.
4. Run multiple samples under comparable conditions. Avoid concurrent benchmark jobs on the same constrained machine.
5. Change one relevant variable, repeat with the same command and environment, then compare distributions rather than isolated numbers.
6. Use a profile or compiler diagnostic only when it answers a specific unresolved question.
7. Re-run correctness tests after any optimization.
Prefer `b.Loop()` when the project's toolchain supports it. Preserve existing `b.N` benchmarks when compatibility requires them. Both forms are valid; follow the local minimum Go version rather than rewriting mechanically.
```go
func BenchmarkParse(b *testing.B) {
input := loadFixture(b)
b.ReportAllocs()
for b.Loop() {
_ = Parse(input)
}
}
```
Use sub-benchmarks for meaningful dimensions such as input size or encoding. Name parameters explicitly so comparisons do not mix different workloads.
```bash
go test -run='^$' -bench='^BenchmarkParse$' -benchmem -count=10 ./path/to/pkg
```
Treat the command as an example. Match repository conventions and adjust duration or sample count based on observed variance and the size of the expected effect.
## Choose the next instrument
| Question | Instrument |
| --- | --- |
| Did before and after differ beyond normal noise? | Repeated benchmark samples; use [benchstat](references/benchstat.md) when available |
| Which functions consume CPU or allocate? | [pprof](references/pprof.md) |
| Why is wall-clock latency high while CPU is low? | [execution trace](references/trace.md) |
| Why does a hot path allocate or fail to inline? | [compiler diagnostics](references/compiler-analysis.md) |
Production capture is a separate operational action. Confirm the target, access controls, expected overhead, capture duration, and data handling before enabling or downloading profiles.
## Evidence standard
Report:
- the exact benchmark and commands;
- relevant Go version, OS, architecture, CPU, and environment constraints;
- sample counts and whether runs were comparable;
- baseline and candidate metrics, including allocation metrics when relevant;
- uncertainty, variance, and any inconclusive result;
- correctness tests used to guard the optimization.
Do not claim improvement when the comparison is inconclusive. A useful outcome can be “no measurable change under this workload.”From reagin/agent-skills, MIT.
More from reagin/agent-skills
- 0.565score
golang-continuous-integration
reagin
Create, improve, or simplify GitHub Actions for a Go repository, including tests, linting, caching, matrices, and release gates.
SkillAFreshness: AClaude Code +9 - 0.565score
frontend-apple-design
reagin
Design or review Apple-inspired web interfaces with clear hierarchy, consistent typography and materials, restrained motion, and accessible interactions.
SkillAFreshness: AClaude Code +9 - 0.559score
frontend-ui-refinement
reagin
Refine existing web interfaces and simplify their behavioral tests.
SkillAFreshness: AClaude Code +9 - 0.559score
frontend-react-file-structure
reagin
Use for React TypeScript file-structure work involving ownership or folders for new or moved files, multi-file components with narrow public entries, page and…
SkillAFreshness: AClaude Code +9 - 0.529score
golang-design-patterns
reagin
Select or review idiomatic Go patterns for constructors, configuration, lifecycle, resilience, streaming, data flow, and package boundaries.
SkillBFreshness: BClaude Code +9 - 0.529score
golang-cli
reagin
Design or review the framework-independent behavior and architecture of Go command-line applications: command UX, flags, configuration, output and exit…
SkillBFreshness: BClaude Code +9 - 0.529score
golang-concurrency
reagin
Design or review concurrent Go code involving goroutines, channels, locks, atomics, worker pools, or race and leak symptoms.
SkillBFreshness: BClaude Code +9 - 0.529score
golang-context
reagin
Design or repair context propagation, cancellation, deadlines, and request-scoped values in Go APIs.
SkillBFreshness: BClaude Code +9 - 0.529score
golang-error-handling
reagin
Design or review Go error creation, wrapping, inspection, aggregation, logging boundaries, transport mapping, and panic recovery.
SkillBFreshness: BClaude Code +9 - 0.529score
golang-gopls
reagin
Use gopls through an available host LSP integration, MCP surface, or CLI for semantic Go navigation, references, implementations, call hierarchy, diagnostics…
SkillBFreshness: BClaude Code +9 - 0.526score
golang-database
reagin
Implement or review Go relational-database code using database/sql, pgx, sqlx, or an existing data layer.
SkillBFreshness: BClaude Code +9 - 0.526score
golang-data-structures
reagin
Choose or review Go collections and memory representations when access patterns, ownership, copying, allocation, or generic APIs matter.
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 25, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/reagin/agent-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from reagin
- 0.565score
frontend-apple-design
reagin
Design or review Apple-inspired web interfaces with clear hierarchy, consistent typography and materials, restrained motion, and accessible interactions.
SkillAFreshness: AClaude Code +9 - 0.565score
golang-continuous-integration
reagin
Create, improve, or simplify GitHub Actions for a Go repository, including tests, linting, caching, matrices, and release gates.
SkillAFreshness: AClaude Code +9 - 0.559score
frontend-react-file-structure
reagin
Use for React TypeScript file-structure work involving ownership or folders for new or moved files, multi-file components with narrow public entries, page and…
SkillAFreshness: AClaude Code +9 - 0.559score
frontend-ui-refinement
reagin
Refine existing web interfaces and simplify their behavioral tests.
SkillAFreshness: AClaude Code +9 - 0.529score
golang-cli
reagin
Design or review the framework-independent behavior and architecture of Go command-line applications: command UX, flags, configuration, output and exit…
SkillBFreshness: BClaude Code +9 - 0.529score
golang-context
reagin
Design or repair context propagation, cancellation, deadlines, and request-scoped values in Go APIs.
SkillBFreshness: BClaude Code +9
Cite this page
golang-benchmark skill. Agent Mart. https://agentmart.dev/skills/reagin-golang-benchmark (last updated 2026-10-24)