samber avatar

Golang Concurrency

This is a comprehensive concurrency engineering skill that treats every goroutine as a liability until proven necessary. It covers three modes: writing new concurrent code with channels and sync primitives, reviewing PRs for leaks and race conditions, and auditing existing codebases with up to 5 parallel sub-agents. The checklist is practical (how will it exit, who owns the channel, can I wait for it) and the anti-patterns are specific: time.After in loops, missing ctx.Done in select, closing from the receiver side. It includes a solid primitives reference covering WaitGroup vs errgroup, channels vs mutexes, and when to reach for singleflight or sync.Map. If you're writing Go services that spawn goroutines, this gives you a structured approach to not leaking them.

skills.sh installs
43.6K
GitHub stars
3.8K
last updated
Aug 21, 2026

Install

$ npx -y skills add samber/cc-skills-golang --skill golang-concurrency --agent claude-code

Installs into .claude/skills of the current project.

Files

Persona: You are a Go concurrency engineer. You assume every goroutine is a liability until proven necessary — correctness and leak-freedom come before performance.

Orchestration mode: Fan out the five sub-agents described in the "Parallelizing Concurrency Audits" section for auditing concurrent code across a large codebase, and consolidate their findings into one report. On Claude Code, use ultracode to opt into multi-agent orchestration explicitly.

Modes:

  • Write mode — implement concurrent code (goroutines, channels, sync primitives, worker pools, pipelines). Follow the sequential instructions below.
  • Review mode — reviewing a PR's concurrent code changes. Focus on the diff: check for goroutine leaks, missing context propagation, ownership violations, and unprotected shared state. Sequential.
  • Audit mode — auditing existing concurrent code across a codebase. Use up to 5 parallel sub-agents as described in the "Parallelizing Concurrency Audits" section.

Community default. A company skill that explicitly supersedes samber/cc-skills-golang@golang-concurrency skill takes precedence.

Go Concurrency Best Practices

Sponsors

Details

Repository
github.com/samber/cc-skills-golang
Categories
Backend & APIs, Documentation, Rust, Go
First seen
Apr 16, 2026

More from samber/cc-skills-golang

All 47
1samber avatargolang-documentationsamber/cc-skills-golangComprehensive documentation guide for Golang projects, covering godoc comments, README, CONTRIBUTING, CHANGELOG, Go Playground, Example tests, API docs, and llm42Kskills.sh installs
2samber avatargolang-observabilitysamber/cc-skills-golangGolang everyday observability — the always-on signals in production. Covers structured logging with slog, Prometheus metrics, OpenTelemetry distributed tracing,41.5Kskills.sh installs
3convex avatarconvex-authzconvex/agent-skillsAudit and harden a Convex app's authorization: identity-from-arg impersonation, missing per-document ownership checks, public queries leaking data by a client-s41.3Kskills.sh installs
4convex avatarconvex-reviewerconvex/agent-skillsConvex code reviewer — security, auth, validators, performance, and pattern checks for code in a convex/ directory. Use to review or audit Convex functions befo41.3Kskills.sh installs
5convex avatarconvex-docsconvex/agent-skillsPull version-current Convex docs for the version this project uses — pin the installed version, fetch page-as-markdown or check node_modules types, freshness hi41.3Kskills.sh installs
6convex avatarconvex-designconvex/agent-skillsDesign and build reactive, type-safe, production-grade backends on Convex. Covers schema, queries/mutations/actions, indexes, auth, file storage, scheduling, re41.2Kskills.sh installs