# Go concurrency

> Golang concurrency design, goroutine lifecycle and leak prevention, channels and select, channel ownership and direction.

- Page: https://youraiskill.com/skill/samber-golang-concurrency
- What it does: Golang concurrency design — goroutine lifecycle and leak prevention, channels and `select`, channel ownership and direction, `sync.Mutex`/`RWMutex`/`sync.Map`/`sync.Once`/atomics, `errgroup`, `singleflight`, worker pools, and fan-out/fan-in pipelines. Use when writing or reviewing concurrent Go code, when choosing between channels and mutexes, when protecting a shared map or counter, or when a goroutine has no clear exit. Not for defensive coding unrelated to concurrency such as nil panics, slice aliasing, or numeric overflow (→ See `samber/cc-skills-golang@golang-safety` skill), and not for debugging a specific hung, crashing, or racing program after the fact (→ See `samber/cc-skills-golang@golang-troubleshooting` skill).
- Niches: coding
- Licence: MIT
- Status: Free on GitHub: not rated 7 or higher by Claude yet, or it does something a person should look at first (for example runs programs or calls the internet), or its licence or authorship needs a look. Never sold.
- Contents: instructions and reference files only (5 files)

To add it, see https://youraiskill.com/guides/how-to-add-a-skill-to-claude
