# Go Concurrency

> Go concurrency patterns. Routes to specific patterns. Use when this capability is needed.

- Skill: `tomevault-io/go-concurrency-3` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/go-concurrency-3`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/go-concurrency-3/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/go-concurrency-3

---


# Concurrency

## Route by Pattern
- Context cancellation → see [context/](context/)
- Goroutine leaks → see [goroutines/](goroutines/)
- Channel patterns → see [channels/](channels/)
- Sync primitives → see [sync/](sync/)

## Quick Check
- [ ] Every goroutine has exit path
- [ ] Context passed and checked
- [ ] Channels closed by sender only
- [ ] WaitGroup Add before go

## Common Pitfalls
1. Launching goroutines without shutdown mechanism
2. Not propagating context through call chains
3. Closing channels from receiver side
4. Using WaitGroup counter incorrectly

## Decision Tree
```
Need coordination? → Use context for cancellation
Need data flow? → Use channels
Need to wait? → Use sync.WaitGroup
Need mutual exclusion? → Use sync.Mutex
```

## References
- [Effective Go: Concurrency](https://go.dev/doc/effective_go#concurrency)
- [Go Concurrency Patterns](https://go.dev/blog/pipelines)

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/jamesprial) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-13 -->

