Golang concurrency patterns. Use when writing or reviewing concurrent Go code involving goroutines, channels, select, locks, sync primitives, errgroup, singleflight, worker pools, or fan-out/fan-in pipelines. Also triggers when you detect goroutine leaks, race conditions, channel ownership issues, or need to choose between channels and mutexes.
The golang-concurrency skill is designed to assist developers in writing, reviewing, and auditing concurrent Go code with correctness and leak prevention as top priorities. It addresses common challenges in Go's concurrency model, including goroutine leaks, race conditions, improper channel usage, and mismanagement of synchronization primitives. By providing guidance and structured patterns, this skill ensures that developers can safely implement concurrent programs while maintaining clarity in ownership, lifecycle, and error propagation of goroutines.
Key features include guidance on implementing concurrent code using goroutines, channels, select statements, locks, sync primitives, errgroup, singleflight, worker pools, and fan-out/fan-in pipelines. The skill also provides review and audit capabilities, identifying potential issues in code diffs or across an entire codebase, such as missing context propagation, unprotected shared state, and channel ownership violations. It emphasizes best practices like sending copies over channels, proper use of WaitGroup versus errgroup, including context cancellation in select loops, and tracking goroutine leaks using testing tools.
This skill is intended for Go developers, code reviewers, and engineers responsible for maintaining large-scale concurrent systems. Typical use cases include writing new concurrent components, reviewing pull requests for concurrency correctness, auditing existing codebases for goroutine leaks and unsafe access patterns, and mentoring teams on Go concurrency best practices. It is compatible with AI coding agents like Claude Code and integrates with Go development environments to improve productivity and code reliability.
This skill is user-invocable and can be triggered whenever you are writing, reviewing, or auditing concurrent Go code.
It supports goroutines, channels, select statements, sync primitives (like Mutex, RWMutex), WaitGroup, errgroup, singleflight, worker pools, and fan-out/fan-in pipelines.
It is designed for projects using Golang and for AI coding agents similar to Claude Code. No specific Go version restrictions are mentioned, but the Go tool must be available.
Yes, it can identify potential goroutine leaks, race conditions, channel ownership issues, and misuse of synchronization primitives during code review or audit.
The skill requires the Go binary to be available and uses standard tools like Bash and globbing for code inspection. No additional installation steps are specified.
Quick Setup:
.claude/skills/Repository
samber/cc-skills-golang