What problem does it solve?
This Skill helps you design and review Go concurrency so goroutines stop correctly, channels are owned and closed safely, and shared state is synchronized to avoid races and deadlocks.
Core Features & Use Cases
- Goroutine lifecycle correctness: ensures every goroutine has a clear shutdown path (context cancellation, done signal, or wait mechanism) to prevent leaks.
- Channel ownership and safety: applies rules like “only the sender closes” and uses channel direction types (chan<-, <-chan) to prevent misuse.
- Concurrency tool selection: guides when to use
errgroup vs sync.WaitGroup, and when to prefer singleflight, pipelines, mutex/RWMutex, atomics, or sync.Pool.
Real-world example: while adding fan-out/fan-in processing to a service, you can use this Skill to refactor the code into a structured pipeline that cancels cleanly on context timeout, avoids pointer-sending pitfalls, and uses bounded concurrency for error propagation.
Quick Start
Ask an AI assistant to write a structured concurrent Go worker pipeline for your task using context cancellation and bounded errgroup.SetLimit, and to review it against goroutine leak and channel ownership rules.