go-concurrency

go-concurrency is a skill for Claude Code from fusengine/agents. It costs 40 tokens per session (1,300 once invoked), scanned A, original, MIT.

A guide for writing and reviewing concurrent Go programs, where multiple tasks run at the same time. It explains goroutines, channels, cancellation with context, error groups, and how to detect data races and leaked goroutines.

In plain words
What is it for?
Use it when working with goroutines, channels, errgroup, context cancellation, race detection, or goroutine-leak investigation.
Why use it?
Concurrent code can hang, leak work, or produce inconsistent results when tasks are not stopped and coordinated correctly. This helps developers structure that code safely and test it for races.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the fuse-go plugin — 5 skills, 1 agent shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/fusengine/agents/go-concurrency
Any agent
npx skills add fusengine/agents --skill go-concurrency
Clone the repo
git clone --depth 1 https://github.com/fusengine/agents

Made for: Claude Code.

Or install fuse-go, the plugin that ships this one along with the rest of its 5 skills, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for go-concurrency

README.md
[![agentmods](https://agentmods.dev/badge/skills/fusengine/agents/go-concurrency.svg)](https://agentmods.dev/skills/fusengine/agents/go-concurrency)
Your own site
<a href="https://agentmods.dev/skills/fusengine/agents/go-concurrency"><img src="https://agentmods.dev/badge/skills/fusengine/agents/go-concurrency.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,300 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00040 $0.01300
Opus 5 $0.00020 $0.00650
Sonnet 5 $0.00008 $0.00260
Haiku 4.5 $0.00004 $0.00130

Measured yesterday against content hash 01974753e24c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

go-concurrency scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

g.Go(func() error { return fetch(ctx, u) })
plugins/go-expert/skills/go-concurrency/SKILL.md · 136 lines

How it starts

The opening of the file, as written. The whole thing — 136 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 tests/CI to catch data races
Leak profile (1.26) GOEXPERIMENT=goroutineleakprofile / /debug/pprof/goroutineleak

Critical Rules

  1. context.Context is the first parameter - named ctx, never stored in a struct
  2. Every started goroutine must be able to exit - or it leaks (see rule 4)
  3. Prefer errgroup for fan-out with errors - it handles wait + first error + cancel
  4. Unbuffered channel + early return = leak - senders block forever; buffer or drain
  5. Test with -race - a passing test without -race proves nothing about races

Read the full file on GitHub · 136 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed 01974753e24c
  2. 2d ago First seen · 136 lines · 40 tokens per session scan A f87f5b0232ad

Subscribe to this mod's changes

go-concurrency is a skill published in the GitHub repository fusengine/agents (25 stars, last pushed yesterday), licensed MIT. It adds 40 tokens to every session and 1,300 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

craft-pest

Testing Craft CMS 5 plugins and modules with Pest — test isolation, database safety, and the markhuot/craft-pest-core harness. ALWAYS load when writing, running, fixing, or reviewing tests for a Craft plugin or module, and whenever a suite touches a real Craft install. Covers why rollback is opt-in, tests/Pest.php +…

michtio/craftcms-claude-skills · 353 tokens

bootstrap-solution

Bootstrap or guide a reproducible .NET solution with explicit F# or C# language choice, SDK selection, project layout, test project setup, and initial validation commands.

gaelic-ghost/socket · 38 tokens

build-csharp-project

Build or modify idiomatic C# .NET projects using nullable-aware APIs, records/classes, async/task behavior, analyzer conventions, tests, and repo-local validation.

gaelic-ghost/socket · 37 tokens

build-fsharp-project

Build or modify idiomatic F# .NET projects using explicit modules, domain types, functional data flow, file ordering, async/task interop, tests, and repo-local validation.

gaelic-ghost/socket · 41 tokens

go-testing

Use when writing or fixing Go tests — table-driven cases, parallel safety, helpers, fakes, fuzzing, deterministic time (testing/synctest), goroutine leak detection (goleak), HTTP handlers. Apply proactively when a function gets a new test or a test is flaky. Benchmark methodology: see go-benchmark.

muratmirgun/gophers · 70 tokens

go-test

When the user wants to design, implement, debug, or optimize Go tests using the standard testing package, testify, and related Go ecosystem libraries. Use when the user mentions "go test," "table-driven tests," "t.Run," "subtests," "testify," "require / assert," "go test -race," "go test -bench," "go test -fuzz,"…

aks-builds/quality-skills · 132 tokens