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.
84
81%
Does it follow best practices?
Impact
92%
1.39xAverage score across 3 eval scenarios
Passed
No known issues
Sync primitives: typed atomics, RWMutex, Once, Pool
Typed atomic counter
0%
100%
Atomic increment/decrement
62%
100%
RWMutex for registry
100%
100%
RLock for registry reads
100%
100%
No RLock-to-Lock upgrade
100%
100%
Mutex embedded in struct
100%
100%
Mutex above protected fields
100%
100%
sync.Once or OnceValue for config
100%
100%
sync.Pool for buffers
100%
100%
Reset before Pool.Put
0%
100%
No persistent state in pool
100%
100%
Race detector test
100%
75%
goroutine leak detection, wg.Go, directional channels, bounded fan-out
goleak in TestMain
100%
100%
Directional channel params
100%
100%
ctx.Done in parse select
100%
100%
ctx.Done in enrich select
100%
100%
Producer closes output channel
100%
100%
Bounded fan-out workers
100%
100%
wg.Go for simple goroutines
0%
0%
errgroup for bounded fan-out
0%
0%
Cancellation test
100%
100%
iterators vs goroutines, errgroup SetLimit, context propagation
No goroutine pipeline for transforms
100%
100%
Iterators or plain loops for transforms
100%
100%
errgroup for concurrent fetches
0%
100%
errgroup.WithContext for cancellation
0%
100%
errgroup.SetLimit(8)
0%
100%
No hand-rolled worker pool
0%
100%
Copies not pointers in goroutines
100%
100%
Context propagated to fetches
100%
100%
First error returned
100%
100%
a5e0e59
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.