go-performance-review

Solid

Review Go code for performance issues including slice/map pre-allocation, string concatenation, N+1 queries, connection pool configuration, sync.Pool, memory alignment, lock scope, buffered I/O, and HTTP transport tuning. Trigger when code contains make(), loops, database queries, string building, sync primitives, HTTP clients, or hot-path operations. Use for performance-focused review.

AI & Automation 27 stars 5 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 85/100

Stars 20%
48
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Go Performance Review ## Purpose Identify performance issues and resource inefficiency in Go code. This skill exists because performance findings are almost all Medium severity and get systematically crowded out when mixed with High-severity Security/Concurrency findings. Important distinction: **lock contention** is performance (here); **race condition** is concurrency (`go-concurrency-review`). This skill does NOT cover: security, concurrency correctness, code style, test quality, error handling, or business logic — those belong to sibling vertical skills. ## When To Use - Code contains `make([]T, ...)` or `make(map[K]V, ...)` - Code builds strings in loops - Code queries DB/Redis inside loops - Code configures connection pools or HTTP clients - Code runs on hot paths (per-request, high-frequency) ## When NOT To Use - Security vulnerabilities → `go-security-review` - Race conditions, goroutine leaks → `go-concurrency-review` - Code style/lint → `go-quality-review` - Error handling → `go-error-review` ## Mandatory Gates ### 1) Go Version Gate Read `go.mod`. Key: `strings.Clone` (1.20+), `slices.Clone` (1.21+). ### 2) Anti-Example Suppression Gate MUST quote specific evidence. Category match alone insufficient. Embedded anti-examples: - **"Should pre-allocate slice"** — when slice is small (<16 elements) or size is truly unknown at creation time. Must cite evidence the slice is large and size is known. - **"Should use sync.Pool"** — when object is small and alloca...

Details

Author
johnqtcg
Repository
johnqtcg/awesome-skills
Created
4 months ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category