go-concurrency

go-concurrency is a skill for Claude Code from car12o/claude-workflows. It costs 36 tokens per session (1,043 once invoked), scanned A, original, MIT.

A guide to running multiple tasks at once in Go, a programming language. It covers cancellation, error handling, communication between tasks, synchronization, and orderly shutdown.

In plain words
What is it for?
Use it when building or reviewing Go services that fetch data concurrently, limit parallel work, pass request cancellation, or shut down gracefully.
Why use it?
It helps prevent unfinished tasks, hidden errors, data races, and programs that fail to stop cleanly.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the gopher plugin — 6 skills, 5 commands, 5 agents, 1 hook shipped together

Good fit Use it when building or reviewing Go services that fetch data concurrently, limit parallel work, pass request cancellation, or shut down gracefully.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/car12o/claude-workflows/go-concurrency
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.

Any agent
npx skills add car12o/claude-workflows --skill go-concurrency
Clone the repo
git clone --depth 1 https://github.com/car12o/claude-workflows

Made for: Claude Code.

Or install gopher, the plugin that ships this one along with the rest of its 6 skills, 5 commands, 5 agents, 1 hook.

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/car12o/claude-workflows/go-concurrency/github.svg)](https://agentmods.dev/skills/car12o/claude-workflows/go-concurrency)
Your own site
<a href="https://agentmods.dev/skills/car12o/claude-workflows/go-concurrency"><img src="https://agentmods.dev/badge/skills/car12o/claude-workflows/go-concurrency/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for go-concurrency

Your own site · 80×15
<a href="https://agentmods.dev/skills/car12o/claude-workflows/go-concurrency"><img src="https://agentmods.dev/badge/skills/car12o/claude-workflows/go-concurrency.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,043 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00036 $0.01043
Opus 5 $0.00018 $0.00522
Sonnet 5 $0.00007 $0.00209
Haiku 4.5 $0.00004 $0.00104

Measured 9d ago against content hash 0824bf16c8fd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 9d ago.

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.

data, err := fetch(ctx, id)
plugins/gopher/skills/go-concurrency/SKILL.md · 168 lines

How it starts

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

Go Concurrency Patterns

Context Propagation

// Every I/O function: context as first param
func (s *Service) Process(ctx context.Context, id string) error {
    data, err := s.repo.Get(ctx, id)
    if err != nil { return fmt.Errorf("getting data: %w", err) }

    if err := ctx.Err(); err != nil { return err } // check before expensive ops
    return s.handle(ctx, data)
}

// Timeout
ctx, cancel := context.WithTimeout(ctx, 5*time.Second)
defer cancel()

// Values (sparingly, use unexported key types)
type contextKey string
const reqIDKey contextKey = "requestID"
func WithReqID(ctx context.Context, id string) context.Context {
    return context.WithValue(ctx, reqIDKey, id)
}

errgroup

import "golang.org/x/sync/errgroup"

// Basic — concurrent fetch
g, ctx := errgroup.WithContext(ctx)
results := make([]Data, len(ids))
for i, id := range ids {
    g.Go(func() error {
        data, err := fetch(ctx, id)
        if err != nil { return fmt.Errorf("fetching %s: %w", id, err) }
        results[i] = data
        return nil
    })
}
if err := g.Wait(); err != nil { return nil, err }

// With concurrency limit
g.SetLimit(10)
for _, item := range items {
    g.Go(func() error { return process(ctx, item) })
}

Goroutine Lifecycle

func (w *Worker) Start(ctx context.Context) error {
    g, ctx := errgroup.WithContext(ctx)
    for range w.numWorkers {
        g.Go(func() error {
            for {
                select {
                case <-ctx.Done():
                    return ctx.Err()
                case job, ok := <-w.jobs:
                    if !ok { return nil }
                    if err := w.process(ctx, job); err != nil { return err }
                }
            }
        })
    }
    return g.Wait()
}

Channel Patterns

// Pipeline
func Pipeline(ctx context.Context, in <-chan int) <-chan int {
    out := make(chan int)
    go func() {
        defer close(out)
        for { select {
            case <-ctx.Done(): return
            case v, ok := <-in:
                if !ok { return }
                select { case out <- transform(v): case <-ctx.Done(): return }
        }}
    }()
    return out
}

Read the full file on GitHub · 168 lines

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. 9d ago First seen · 168 lines · 36 tokens per session scan A 0824bf16c8fd

Subscribe to this mod's changes

go-concurrency is a skill published in the GitHub repository car12o/claude-workflows (2 stars, last pushed 6mo ago), licensed MIT. It adds 36 tokens to every session and 1,043 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-08-31.

Related

Other skills, from other repositories

golang-graphql

Implements GraphQL APIs in Golang using gqlgen or graphql-go. Apply when building GraphQL servers, designing schemas, writing resolvers, handling subscriptions, or integrating GraphQL with existing Go HTTP services. Also apply when the codebase imports github.com/99designs/gqlgen or github.com/graph-gophers/graphql-go.

samber/cc-skills-golang · 77 tokens

golang-grpc

Provides gRPC usage guidelines, protobuf organization, and production-ready patterns for Golang microservices. Use when implementing, reviewing, or debugging gRPC servers/clients, writing proto files, setting up interceptors, handling gRPC errors with status codes, configuring TLS/mTLS, testing with bufconn, or…

samber/cc-skills-golang · 72 tokens

golang-pro

Implements concurrent Go patterns using goroutines and channels, designs and builds microservices with gRPC or REST, optimizes Go application performance with pprof, and enforces idiomatic Go with generics, interfaces, and robust error handling. Use when building Go applications requiring concurrent programming…

Jeffallan/claude-skills · 95 tokens

golang-swagger

Golang OpenAPI/Swagger documentation with swaggo/swag — annotation comments (@Summary, @Param, @Success, @Router, @Security), swag init code generation, framework integrations (gin, echo, fiber, chi, net/http), security definitions (Bearer/JWT, OAuth2, API key), and struct tags (swaggertype, enums, example…

samber/cc-skills-golang · 146 tokens

layered-architecture-types

Enforce primitive-at-edges / strong-types-in-Business layering and the toBus/fromBusResponse/toDB converter pattern. Use when writing, editing, or auditing Go files under app/, business/domain/, or .../stores/db.

ardanlabs/service · 56 tokens

printing-press

Set up a new integration, connector, or CLI binding for any API. Wrap or generate a ship-ready Go CLI from an OpenAPI, HAR, or Postman spec via the lean research -> generate -> build -> shipcheck loop. Use when the user says build a CLI, wrap this API, set up a new integration, add a connector, integrate with a…

mvanhorn/cli-printing-press · 86 tokens