go-concurrency

Installation
SKILL.md

Go Concurrency Skill

Guide implementation of correct, leak-free concurrent Go code using goroutines, channels, sync primitives, and context propagation. Works by assessing whether concurrency is justified, selecting the right primitive, enforcing context propagation, implementing the pattern, and verifying with the race detector.

Instructions

Phase 1: Assess Concurrency Need

Goal: Determine whether concurrency is justified before adding complexity.

Read and follow the repository's CLAUDE.md before writing any concurrent code, because project-specific conventions (naming, package structure, error handling) override general patterns.

Before writing concurrent code, answer these questions:

  1. Is the work I/O-bound? (network, database, filesystem) -- concurrency likely helps
  2. Is the work CPU-bound? -- concurrency helps only if parallelizable
  3. Is there a measured bottleneck? -- if not measured, don't assume

If none apply, write sequential code. Sequential code is correct by default -- concurrency adds goroutine lifecycle management, synchronization, and race risk. Only introduce it when I/O, CPU parallelism, or a measured bottleneck justifies the complexity. Assuming "sequential is too slow" without profiling is a common mistake; profile first, then add concurrency.

Related skills
Installs
6
GitHub Stars
366
First Seen
Mar 23, 2026