Agent skill
go-concurrency
Go concurrency patterns. Routes to specific patterns.
Install this agent skill to your Project
npx add-skill https://github.com/JamesPrial/claudefiles/tree/main/skills/golang/concurrency
SKILL.md
Concurrency
Route by Pattern
- Context cancellation → see context/
- Goroutine leaks → see goroutines/
- Channel patterns → see channels/
- Sync primitives → see sync/
Quick Check
- Every goroutine has exit path
- Context passed and checked
- Channels closed by sender only
- WaitGroup Add before go
Common Pitfalls
- Launching goroutines without shutdown mechanism
- Not propagating context through call chains
- Closing channels from receiver side
- 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
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
plugin-packager
Package claudefiles components into a valid Claude Code plugin
plugin-packager-validation
Plugin validation errors and fixes
plugin-packager-subset
Package language-specific subsets of claudefiles
plugin-packager-hooks
Handle hook scripts and paths for plugin packaging
go-sync-primitives
sync.WaitGroup and sync.Mutex patterns
go-context-cancellation
Context cancellation patterns for graceful shutdown
Didn't find tool you were looking for?