# Go performance review

> Go performance review is an open-source agent skill for developer tools. Guides an agent through profiling and optimizing Go code with benchmarks and pprof. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/eduardo-sl/go-agent-skills/tree/main/skills/(safety)/go-performance-review
- **Repository:** https://github.com/eduardo-sl/go-agent-skills
- **GitHub stars:** 90
- **License:** MIT
- **Skill name:** go-performance-review
- **Collection:** https://github.com/eduardo-sl/go-agent-skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill helps an agent find and fix performance problems in Go code. It is built around a measure-first loop: name a target, benchmark the isolated path, profile to find the cause, change one thing, and confirm the gain with benchstat before keeping it. The guidance covers allocation reduction, hot-path choices, map sizing, benchmark setup with b.Loop, CPU, heap, goroutine and trace profiling, GOGC and GOMEMLIMIT tuning, PGO, and HTTP client and body handling.

The skill also carries a table of common anti-patterns with suggested fixes, such as preallocating slices, reusing HTTP clients, streaming bodies instead of reading them whole, and compiling regexps once. It repeatedly warns against optimizing code that a benchmark has not shown to be a bottleneck, and asks for a gain of more than 10% before a change is accepted. Detailed material on benchmarking, profiling, memory and I/O, runtime tuning and logging sits in separate reference files that the agent reads on demand.

The skill expects a Go project with the Go toolchain available, and it may run go, gofmt and benchstat commands. Concurrency correctness and general style are handled by other skills in the same repository.

## When your agent uses it

> Detect performance anti-patterns and apply optimization techniques in Go. Covers allocations, benchmarks and benchstat, pprof and traces, GC and GOMEMLIMIT tuning, PGO, and HTTP client reuse. Use when checking performance, finding slow code, reducing allocations, profiling, or reviewing hot paths. Trigger examples: "check performance", "find slow code", "reduce allocations", "benchmark this", "profile", "optimize Go code". Not for: concurrency correctness (go-concurrency-review), general style (go-coding-standards).

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/eduardo-sl/go-agent-skills/tree/HEAD/skills/(safety)/go-performance-review)
- [Asks for: Read, Edit, Write, Glob, Grep, Bash(go:*), Bash(gofmt:*), Bash(benchstat:*)](https://github.com/eduardo-sl/go-agent-skills/blob/HEAD/skills/(safety)/go-performance-review/SKILL.md)
- [License: MIT](https://github.com/eduardo-sl/go-agent-skills/tree/HEAD/skills/(safety)/go-performance-review)

## Features

- **Measure-first optimization cycle:** A step-by-step loop that sets a target, benchmarks, profiles, changes one thing and re-measures.
- **Allocation reduction patterns:** Guidance on preallocating slices and maps, using strings.Builder, and spotting hidden heap escapes.
- **Benchmark authoring:** Benchmark shape using b.Loop and ReportAllocs, with repeated runs compared via benchstat.
- **Profiling guide:** Maps symptoms such as high CPU or lock contention to the right pprof, block, mutex or trace profile.
- **Runtime tuning:** Advice on GOMEMLIMIT in containers, GOMAXPROCS, and committing a default.pgo profile for PGO.
- **HTTP client and I/O review:** Covers shared clients with timeouts, connection pool sizing, body draining and streaming decodes.

## Good for

- Find why a Go service's CPU usage is high and suggest fixes
- Reduce allocations in a parsing function and prove it with a benchmark
- Compare two benchmark runs and check whether the change is significant
- Review HTTP client code for connection reuse and missing timeouts
- Set GOMEMLIMIT for a Go service running in a container

## Install

### Any agent

Download the skill folder from https://github.com/eduardo-sl/go-agent-skills and copy it into your agent's skills folder.

## FAQ

### What does the skill need to run?

The Go toolchain. benchstat is optional and used for comparing benchmark runs.

### Does Go performance review change code automatically?

It is allowed to read, edit and write files and run go, gofmt and benchstat commands, and it works one change at a time with measurements.

### When should Go performance review be used instead of a general style check?

Concurrency correctness is handled by a separate concurrency review skill and general style by a coding standards skill.

### Does Go performance review apply optimizations to all code?

No. It states that most Go code is not performance-critical and only applies optimizations when a benchmark shows a bottleneck with a gain above 10% and readable results.

### Does Go performance review run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Go performance review?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Go performance review?

The closest alternatives to Go performance review are M10 performance, Performance reasoning, Optimize, Go test quality and Performance audit edho ferdian.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [M10 performance](https://ai-powered.com/skills/m10-performance): M10 performance is an open-source agent skill for developer tools.
- [Performance reasoning](https://ai-powered.com/skills/performance-reasoning): Performance reasoning is an open-source agent skill for developer tools.
- [Optimize](https://ai-powered.com/skills/optimize-jasgujral): Optimize is an open-source agent skill for developer tools.
- [Go test quality](https://ai-powered.com/skills/go-test-quality): Go test quality is an open-source agent skill for developer tools.
- [Performance audit edho ferdian](https://ai-powered.com/skills/performance-audit-edho-ferdian): Performance audit edho ferdian is an open-source agent skill for developer tools.
- [Go troubleshooting](https://ai-powered.com/skills/go-troubleshooting): Go troubleshooting is an open-source agent skill for developer tools.
- [Go code review](https://ai-powered.com/skills/go-code-review): Go code review is an open-source agent skill for developer tools.
- [Performance](https://ai-powered.com/skills/performance): Performance is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/go-performance-review
