golang-concurrency
Design or review concurrent Go code involving goroutines, channels, locks, atomics, worker pools, or race and leak symptoms.
Skill by reagin
Chalk Labs
Need help deploying golang-concurrency?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/reagin-golang-concurrency
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/golang-concurrency
What's inside
- Skill name
golang-concurrency- Description
- Design or review concurrent Go code involving goroutines, channels, locks, atomics, worker pools, or race and leak symptoms. Use when ownership, synchronization, cancellation, backpressure, or shutdown is central; not for ordinary sequential code that merely accepts a context.
- License
- MIT
- Instructions
- 55 lines in SKILL.md · view on GitHub
Files (4)
- SKILL.md
- channels-and-select.md · references/
- pipelines.md · references/
- sync-primitives.md · references/
SKILL.md (first lines)
# Go Concurrency Prioritize correctness, bounded resource use, and understandable ownership. Concurrency is justified by a concrete need such as overlapping I/O, parallel computation, independent lifecycle work, or coordination—not by stylistic preference. ## Inspect before changing 1. Read repository instructions, `go.mod`, nearby synchronization conventions, tests, and shutdown wiring. 2. Trace each relevant goroutine from creation to completion: owner, inputs, outputs, cancellation, errors, panic behavior, and who waits. 3. Identify shared mutable state and the synchronization that establishes a happens-before relationship for every access. 4. Define expected concurrency, queue limits, overload behavior, ordering, and partial-result semantics. 5. Preserve existing lifecycle and API contracts unless the requested task requires changing them. ## Core invariants - Every spawned goroutine needs a defined owner and completion condition. Expose cancellation or waiting when the surrounding lifecycle must control or observe it. - Every channel needs a clear protocol: who sends, who receives, whether it closes, and who is allowed to close it. Usually the component that knows no more sends can occur closes it; receivers do not close merely to stop a sender. - A send of a pointer is not inherently unsafe. The real requirement is explicit ownership, immutability, confinement, or synchronization for the pointed-to data. - Add a cancellation case when a potentially blocking operation belongs to cancellable work. A `ctx.Done()` arm is not useful in a select whose operation must complete regardless of caller cancellation. - Concurrency and queues should be bounded when input can outpace service. Define what happens at capacity: block, reject, drop, coalesce, or spill. - Do not hold a lock while calling unknown code or performing slow I/O unless the protected invariant truly requires it and the consequence is documented. - Closing a channel is a broadcast about future sends, not a general resource cleanup mechanism. Nil channels block forever; a receive from a closed channel yields the zero value and `ok == false`. For channel protocols and cancellation details, read [channels and select](references/channels-and-select.md). ## Choose the simplest primitive | Need | Usual starting point | | --- | --- | | Guard related fields or a multi-step invariant | `sync.Mutex` | | Coordinate ownership or stream values | Channel | | Wait for tasks that do not return errors | `sync.WaitGroup` | | Propagate errors/cancel siblings and the project already uses it | `errgroup` | | Independent numeric flag or counter with a precise atomic invariant | Typed `sync/atomic` value | | One-time initialization | `sync.Once` or a supported convenience wrapper | | Specialized concurrent map access | `sync.Map`, only after its documented use cases fit | Do not choose `RWMutex`, atomics, `sync.Map`, or `sync.Pool` from a generic performance claim. Their benefit and complexity depend on access patterns; profile or benchmark hot paths. See [synchronization primitives](references/sync-primitives.md). ## Pipelines and worker pools Use a pipeline only when stages have useful independent lifecycles or concurrency. For an in-process transformation that is naturally sequential, a loop or iterator is simpler. When concurrency is warranted, ensure cancellation reaches blocked receives and sends, output is closed exactly once, worker count is bounded, and error semantics are explicit. See [pipelines and worker pools](references/pipelines.md). ## Verification Exercise the repository's focused tests first. When scope and runtime make it practical, run the race detector on affected packages: ```bash go test -race ./path/to/affected/... ``` The race detector finds executed data races, not deadlocks, leaks, logical races, or untested paths. Add deterministic tests around shutdown, cancellation, capacity, and error paths; avoid sleep-based timing where a channel or barrier can synchronize the test. In review, report the concrete interleaving and consequence. “Could race” is incomplete without identifying the unsynchronized accesses or violated protocol.
From reagin/agent-skills, MIT.
More from reagin/agent-skills
- 0.565score
golang-continuous-integration
reagin
Create, improve, or simplify GitHub Actions for a Go repository, including tests, linting, caching, matrices, and release gates.
SkillAFreshness: AClaude Code +9 - 0.565score
frontend-apple-design
reagin
Design or review Apple-inspired web interfaces with clear hierarchy, consistent typography and materials, restrained motion, and accessible interactions.
SkillAFreshness: AClaude Code +9 - 0.559score
frontend-ui-refinement
reagin
Refine existing web interfaces and simplify their behavioral tests.
SkillAFreshness: AClaude Code +9 - 0.559score
frontend-react-file-structure
reagin
Use for React TypeScript file-structure work involving ownership or folders for new or moved files, multi-file components with narrow public entries, page and…
SkillAFreshness: AClaude Code +9 - 0.529score
golang-design-patterns
reagin
Select or review idiomatic Go patterns for constructors, configuration, lifecycle, resilience, streaming, data flow, and package boundaries.
SkillBFreshness: BClaude Code +9 - 0.529score
golang-benchmark
reagin
Design, run, and interpret Go benchmarks, profiles, traces, and compiler diagnostics.
SkillBFreshness: BClaude Code +9 - 0.529score
golang-cli
reagin
Design or review the framework-independent behavior and architecture of Go command-line applications: command UX, flags, configuration, output and exit…
SkillBFreshness: BClaude Code +9 - 0.529score
golang-context
reagin
Design or repair context propagation, cancellation, deadlines, and request-scoped values in Go APIs.
SkillBFreshness: BClaude Code +9 - 0.529score
golang-error-handling
reagin
Design or review Go error creation, wrapping, inspection, aggregation, logging boundaries, transport mapping, and panic recovery.
SkillBFreshness: BClaude Code +9 - 0.529score
golang-gopls
reagin
Use gopls through an available host LSP integration, MCP surface, or CLI for semantic Go navigation, references, implementations, call hierarchy, diagnostics…
SkillBFreshness: BClaude Code +9 - 0.526score
golang-database
reagin
Implement or review Go relational-database code using database/sql, pgx, sqlx, or an existing data layer.
SkillBFreshness: BClaude Code +9 - 0.526score
golang-data-structures
reagin
Choose or review Go collections and memory representations when access patterns, ownership, copying, allocation, or generic APIs matter.
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 25, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/reagin/agent-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from reagin
- 0.565score
frontend-apple-design
reagin
Design or review Apple-inspired web interfaces with clear hierarchy, consistent typography and materials, restrained motion, and accessible interactions.
SkillAFreshness: AClaude Code +9 - 0.565score
golang-continuous-integration
reagin
Create, improve, or simplify GitHub Actions for a Go repository, including tests, linting, caching, matrices, and release gates.
SkillAFreshness: AClaude Code +9 - 0.559score
frontend-react-file-structure
reagin
Use for React TypeScript file-structure work involving ownership or folders for new or moved files, multi-file components with narrow public entries, page and…
SkillAFreshness: AClaude Code +9 - 0.559score
frontend-ui-refinement
reagin
Refine existing web interfaces and simplify their behavioral tests.
SkillAFreshness: AClaude Code +9 - 0.529score
golang-benchmark
reagin
Design, run, and interpret Go benchmarks, profiles, traces, and compiler diagnostics.
SkillBFreshness: BClaude Code +9 - 0.529score
golang-context
reagin
Design or repair context propagation, cancellation, deadlines, and request-scoped values in Go APIs.
SkillBFreshness: BClaude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get golang-concurrency running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
golang-concurrency skill. Agent Mart. https://agentmart.dev/skills/reagin-golang-concurrency (last updated 2026-10-24)