go-concurrency

Featured

Use when writing or reviewing Go concurrency — goroutines, channels, errgroup, context cancellation, or goroutine leaks. Not for sequential idioms (go-core-idioms).

AI & Automation 28 stars 4 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 89/100

Stars 20%
49
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

<objective> Covers Go concurrency for Go 1.26: goroutines and channels, golang.org/x/sync/errgroup, context propagation and cancellation, sync.WaitGroup vs channels, the -race detector, and diagnosing goroutine leaks (including the 1.26 goroutineleak profile). Does not cover sequential error handling, slog, generics, or interface style (see go-core-idioms), non-Go languages, or framework-specific code. </objective> # Go Concurrency Goroutines, channels, `context`, and `errgroup` for Go 1.26 — plus the number-one documented pitfall: **leaking goroutines on an unbuffered channel + early return.** ## Agent Workflow (MANDATORY) Before ANY implementation, spawn 3 agents in parallel, one `Agent` call each with a `name`: 1. **fuse-ai-pilot:explore-codebase** - Map existing goroutine/channel/context usage 2. **fuse-ai-pilot:research-expert** - Verify errgroup/context docs via Context7/Exa 3. **mcp__context7__query-docs** - Confirm `golang.org/x/sync/errgroup` signatures After implementation, run **fuse-ai-pilot:sniper** for validation, and run tests with `go test -race ./...`. --- ## Overview | Feature | Description | |---------|-------------| | **Goroutines & channels** | Lightweight concurrency + typed communication | | **errgroup** | Parallelism + error aggregation + context cancellation | | **context** | First param, propagated strictly, carries cancellation/deadline | | **WaitGroup vs channels** | Counting-only vs result/error passing | | **Race detector** | `-race` in ...

Details

Author
fusengine
Repository
fusengine/agents
Created
8 months ago
Last Updated
2 days ago
Language
CSS
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

go-concurrency

Use when writing or reviewing Go code that starts goroutines, passes context, uses channels, sync primitives, worker pools, or errgroup — goroutine lifecycle and leaks, context propagation and cancellation, timeouts, and safe shared state. Triggers on `go func`, `context.Context`, `sync.`, `select`, or reports of leaks, races, and hangs.

0 Updated 1 months ago
Markuysa
Data & Documents Listed

go-concurrency

Use when writing or reviewing concurrent Go code — goroutines, channels, select, mutexes, atomics, errgroup, singleflight, worker pools, or fan-out/fan-in pipelines. Apply proactively whenever a goroutine is spawned, a shared field is mutated, or a channel is created, even if the user has not asked about concurrency. Does not cover context.Context patterns (see go-context).

9 Updated 1 months ago
muratmirgun
Code & Development Listed

golang-concurrency

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).

0 Updated 1 weeks ago
rzisso