What problem does it solve?
Concurrent Go programs are hard to get right: goroutine leaks, race conditions, improper cancellation, and unbounded parallelism can cause instability, resource exhaustion, and subtle bugs. This Skill consolidates proven patterns and best practices to coordinate goroutines, manage communication, and implement safe shutdowns so systems remain responsive and maintainable.
Core Features & Use Cases
- Worker pool and pipeline patterns for processing jobs concurrently while controlling throughput.
- Fan-out/fan-in and merge strategies to compose parallel stages with context-aware cancellation.
- Bounded concurrency and semaphore patterns to limit resource usage and rate of work.
- Graceful shutdown and errgroup-based coordination to cancel work on error or signal and collect results.
- Race detection and concurrent map strategies for safe shared-state access in high-read or write-heavy scenarios.
- Use Case: Convert a monolithic background processor into a cluster-friendly service with cancellable workers, limited concurrency, and deterministic shutdown.
Quick Start
Use the go-concurrency-patterns skill to design or review a Go service that requires worker pools, context cancellation, bounded concurrency, and graceful shutdown.