Go Concurrency Patterns Skill for Claude Code: Goroutines and Channels
A reference that helps your agent write and debug concurrent Go code with goroutines, channels, sync primitives and context.
- Installs
- 11.5K
- on skills.sh
- Stars
- 42.1K
- on GitHub
- Files
- 1
- besides SKILL.md
- Updated
- Oct 2026
- last repo commit
This skill gives your agent a short rulebook for Go concurrency plus seven worked patterns. The rulebook covers goroutines, channels, select, mutexes, wait groups and context, and the Go mantra "Don't communicate by sharing memory; share memory by communicating."
The patterns are in references/details.md. They include worker pools, fan-out and fan-in pipelines, bounded concurrency, graceful shutdown, error groups and a section on running Go's race detector.
Good for
- Go developers building worker pools, pipelines or servers with graceful shutdown
- Anyone chasing a race condition or a goroutine leak
- Teams that want one set of concurrency rules for their agent
Install go-concurrency-patterns
Claude Code
- 1
Copy this prompt.
Install the go-concurrency-patterns skill in Claude Code. Run this command: /plugin marketplace add wshobson/agents /plugin install systems-programming@claude-code-workflows Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Pick one route. The plugin routes install the whole systems-programming plugin: 4 agents, 1 command and 3 skills (counted from the plugin folder in the repo tree, which has no hooks or MCP config files). The skills-only routes install just this skill, with no agents or commands. The skill needs Go installed in your own project.
From the project README. Source.
What's in the skill
When it loads
Master Go concurrency with goroutines, channels, sync primitives, and context. Use when building concurrent Go applications, implementing worker pools, or debugging race conditions.
Sections in SKILL.md
- When to Use This Skill
- Core Concepts
- 1. Go Concurrency Primitives
- 2. Go Concurrency Mantra
- Quick Start
- Detailed patterns and worked examples
- Best Practices
- Do's
- Don'ts
Key facts
- Installs on skills.sh
- 11,487 as of 2026-11-02
- License
- MIT
- Last repo commit
- 2026-10-30
- What is inside
- 2 files: SKILL.md and references/details.md
What it includes
Six building blocks: goroutine, channel, select, Mutex, WaitGroup, Context.
A one-line purpose for each.
Read ·
Concurrency primitives tableA runnable example of context, workers and a results channel.
Three workers send results over a channel, with a five second timeout.
Write ·
Quick startA fixed set of workers pulling jobs from a channel.
Named in the pattern title as a worker pool.
Write ·
Pattern 1: Worker poolSplits work across goroutines and merges results.
Stages connected by channels.
Write ·
Pattern 2: Fan-out/fan-in pipelineCaps parallel work with a semaphore.
Uses a semaphore to cap parallel work.
Write ·
Pattern 3: Bounded concurrency with semaphoreStops workers cleanly on cancel or signal.
The example uses os/signal and a WaitGroup.
Write ·
Pattern 4: Graceful shutdownRuns concurrent calls and stops on the first error.
The example makes HTTP requests with context.
Write ·
Pattern 5: Error group with cancellationShares a map between goroutines safely.
Uses sync.Map.
Write ·
Pattern 6: Concurrent map with sync.MapHandles timeouts and non-blocking channel operations.
Shows select with a timeout case and a default case.
Write ·
Pattern 7: Select with timeout and defaultShows go test -race, go build -race and go run -race.
The commands run your tests or program with Go's race detector turned on.
Runs code ·
Race detection
From the official docs
Permissions
Low risk
The skill is guidance and bundles no scripts, but the agent may write Go code and run your tests with the race detector. Work on a branch and read the diff.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
The race detector runs your code
go test -race and go run -race execute your tests or program. Run them only on code you trust. github.com
Technical details
| Turning on read-only | No switch. Ask for review only if you do not want edits. |
|---|---|
| Talks to | Pattern 5 example makes HTTP requests when you run it |
| Scopes |
|
Questions
What does the go-concurrency-patterns skill do?
It gives your agent Go concurrency rules and seven worked patterns, so it writes and debugs goroutines, channels and context in a consistent way.
How do I install it?
Use the install box at the top of this page. It offers the systems-programming plugin (3 skills, 4 agents, 1 command, no hooks or MCP config; counts from the repo tree) or just this skill through the skills CLI or GitHub CLI. The skills-only routes add no agents or commands.
What are its main rules?
Use context for cancellation, close channels only from the sender, use errgroup for concurrent work that can fail, and always give goroutines an exit path. Do not use time.Sleep to synchronize.
Does it help find race conditions?
It shows the race detector commands (go test -race ./..., go build -race ., go run -race main.go) in its reference file. Your agent can run them in your project.
Does it need an API key?
SKILL.md names no API key. You need Go installed to run the code.
Is it safe to use?
It bundles no scripts. The agent writes Go code and may run tests with the race detector in your project, so run it on a branch and read the changes.
Information
updated Nov 2, 2026
- Repository
- wshobson/agents
- Folder
plugins/systems-programming/skills/go-concurrency-patterns
Sources
Docs, issue trackers and discussions this page is built from.
Show all 5Hide
- https://github.com/wshobson/agents/blob/HEAD/plugins/systems-programming/skills/go-concurrency-patterns/SKILL.md · github.com
- wshobson/agents README · github.com
- systems-programming plugin.json · github.com
- wshobson/agents marketplace.json · github.com
- go-concurrency-patterns details.md · github.com