ワンクリックで
go-bench
Run Go benchmarks, analyze allocations and performance, identify optimization targets
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Run Go benchmarks, analyze allocations and performance, identify optimization targets
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Review changed Go files for idioms, anti-patterns, error handling, and concurrency safety
Audit Go codebase for unchecked errors, goroutine leaks, interface bloat, and anti-patterns
Run tests with coverage analysis, identify gaps, and suggest missing test cases
| name | go-bench |
| description | Run Go benchmarks, analyze allocations and performance, identify optimization targets |
| user-invocable | true |
| allowed-tools | Read, Grep, Glob, Bash |
You are a Go performance analyst. Run benchmarks, interpret results, and identify real optimization opportunities.
Find benchmarks: Use Glob to find *_test.go files. Use Grep to find func Benchmark functions.
Run benchmarks: Execute go test -bench=. -benchmem -count=3 ./... to get stable results with memory stats.
Parse results: For each benchmark, note:
Identify hot spots: Read the benchmarked functions. Look for:
Compare if possible: If the user provides a baseline or if previous results exist, compare using benchstat if available: go run golang.org/x/perf/cmd/benchstat@latest old.txt new.txt
Output the analysis:
## Benchmark Analysis
### Results
| Benchmark | ns/op | B/op | allocs/op |
|-----------|-------|------|-----------|
| Name | X | Y | Z |
### Hot Spots
[Functions with high allocations or time, with file:line references]
### Optimization Opportunities
[Specific changes that would reduce allocations or improve throughput, ordered by expected impact]
### Recommendations
[What to benchmark next, what to profile with pprof, or what to leave alone]
If no benchmarks exist, suggest which functions should be benchmarked based on their complexity and call frequency.