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.
86
81%
Does it follow best practices?
Impact
98%
1.18xAverage score across 3 eval scenarios
Passed
No known issues
Goroutine leak detection in tests
goleak import
100%
100%
goleak in TestMain
100%
100%
TestMain signature
100%
100%
Race flag usage
100%
100%
Context-based goroutine exit
100%
100%
WaitGroup Add before go
100%
100%
Channel direction in functions
50%
50%
Sender closes channel
62%
75%
ctx.Done in select
100%
100%
No time.After in loops
100%
100%
Typed atomics and mutex embedding
Typed atomic counter
0%
100%
Typed atomic flag
0%
100%
Mutex above protected fields
100%
100%
Mutex is unexported
100%
100%
RWMutex for read-heavy fields
100%
100%
No mutex across I/O
100%
100%
Atomic over mutex for simple values
100%
100%
sync.Map only for read-heavy
100%
100%
No RLock-to-Lock upgrade
100%
100%
Context-based goroutine lifecycle
100%
100%
sync.Once modern helpers and wg.Go
OnceValue or OnceFunc usage
0%
100%
wg.Go() for goroutines
100%
100%
errgroup.SetLimit for bounded fan-out
100%
100%
errgroup.WithContext cancellation
100%
100%
No unbounded goroutine spawning
100%
100%
ctx.Done in select
100%
100%
Channel direction specified
100%
100%
Sender closes channel
100%
100%
No hand-rolled worker pool
100%
100%
e9761db
Table of Contents
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.