What problem does it solve?
This Skill helps you design, review, and fix concurrent Go code so goroutines stop cleanly, shared state is protected correctly, and cancellation works predictably.
Core Features & Use Cases
- Structured concurrency: Choose the right primitive for goroutines, worker pools, fan-out/fan-in pipelines, and first-error cancellation.
- Ownership-safe channels: Apply channel direction, sender-only closing, and ctx-aware select loops to avoid leaks and panics.
- Shared-state guidance: Decide between mutexes, atomics, sync.Map, sync.Once, sync.Pool, and singleflight for the right concurrency pattern.
- Verification and testing: Add leak checks with goleak, deterministic timing with synctest, and race-safe validation for production-grade code.
- Use case: Review a Go service that spawns background workers and ensure every goroutine has a stop path, every channel has a clear owner, and every critical section is safe.
Quick Start
Ask for a review of your Go concurrency code and have it checked for goroutine leaks, unsafe channel usage, and the correct synchronization primitive.