golang-performance
Golang performance optimization patterns and methodology - if X bottleneck, then apply Y. Covers allocation reduction, CPU efficiency, memory layout, GC tuning, pooling, caching, and hot-path optimization. Use when profiling or benchmarks have identified a bottleneck and you need the right optimization pattern to fix it. Also use when performing performance code review to suggest improvements or benchmarks that could help identify quick performance gains. Not for measurement methodology (see gol
Security Assessment
Detected risks:
About golang-performance
The golang-performance skill provides a structured methodology for optimizing Go applications after performance bottlenecks have been identified through profiling or benchmarking. It focuses on practical performance engineering patterns rather than speculative micro-optimizations, emphasizing a disciplined workflow of measuring, diagnosing, optimizing, and re-measuring. The skill is designed to help developers identify the correct optimization strategy for specific bottlenecks, including CPU inefficiencies, excessive memory allocations, garbage collection overhead, poor memory layout, hot-path inefficiencies, and unnecessary I/O or concurrency costs. It also reinforces the principle that external systems such as databases or APIs should be ruled out as bottlenecks before attempting application-level optimizations.
The skill includes multiple operating modes tailored to different optimization scenarios. Review mode supports architecture-level analysis to detect structural performance anti-patterns such as unbounded goroutines, missing connection pools, inefficient data structures, and caching gaps. A separate hot-path review mode focuses on tight loops or specific functions identified through profiling. Optimize mode guides users through an iterative improvement cycle that prioritizes atomic benchmarking, single-change experimentation, and benchmark comparison using tools such as pprof, fgprof, benchstat, staticcheck, and fieldalignment. The skill also encourages documenting optimization rationale and benchmark results to preserve long-term maintainability.
This skill is intended for Go developers, backend engineers, and AI coding agents working on performance-sensitive services or applications. It is especially useful during profiling-driven optimization work, performance-oriented code reviews, and scalability improvement efforts. The skill is compatible with Claude Code and similar AI coding agents, and is designed for projects using Golang with access to standard Go performance tooling.
FAQ
When should I use the golang-performance skill?
Use this skill after profiling or benchmarking has identified a performance bottleneck in a Go application. It is also useful during performance-focused code reviews to identify optimization opportunities.
Does this skill include benchmarking methodology?
No. The skill focuses on optimization patterns and performance diagnosis rather than benchmark design or measurement methodology. Benchmark-specific workflows are referenced separately.
What tools or dependencies are required?
The skill requires Go and benchstat. It also references additional tooling such as pprof, fgprof, staticcheck, and fieldalignment for profiling and analysis workflows.
Can this skill help with database or external API latency issues?
The skill helps identify whether external systems are the real bottleneck, but it does not directly optimize databases or external services. It recommends addressing query tuning, caching, or connection pooling when external latency dominates.
Is this skill compatible with AI coding agents?
Yes. The skill is designed for Claude Code and similar AI coding agents, as well as developers working on Golang projects.
Install golang-performance
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
samber/cc-skills-golang