goroutine-patterns

goroutine-patterns is a skill for Claude Code from armanzeroeight/fastagent-plugins. It costs 60 tokens per session (1,786 once invoked), scanned A, original, MIT.

A guide to running several pieces of Go code at the same time using goroutines, channels, and synchronization tools. Goroutines are lightweight concurrent tasks, while channels pass data between them.

In plain words
What is it for?
Use it for parallel work, worker pools, pipelines, fan-out and fan-in designs, and other concurrent Go systems.
Why use it?
It helps choose a suitable concurrency design and avoid lifecycle, coordination, and cancellation problems.

Skill for Claude Code

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

Part of the go-toolkit plugin — 2 skills shipped together

Good fit Use it for parallel work, worker pools, pipelines, fan-out and fan-in designs, and other concurrent Go systems.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/armanzeroeight/fastagent-plugins/goroutine-patterns
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 armanzeroeight/fastagent-plugins --skill goroutine-patterns
Clone the repo
git clone --depth 1 https://github.com/armanzeroeight/fastagent-plugins

Made for: Claude Code.

Or install go-toolkit, the plugin that ships this one along with the rest of its 2 skills.

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 goroutine-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/armanzeroeight/fastagent-plugins/goroutine-patterns.svg)](https://agentmods.dev/skills/armanzeroeight/fastagent-plugins/goroutine-patterns)
Your own site
<a href="https://agentmods.dev/skills/armanzeroeight/fastagent-plugins/goroutine-patterns"><img src="https://agentmods.dev/badge/skills/armanzeroeight/fastagent-plugins/goroutine-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,786 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00060 $0.01786
Opus 5 $0.00030 $0.00893
Sonnet 5 $0.00012 $0.00357
Haiku 4.5 $0.00006 $0.00179

Measured 4d ago against content hash 5f0aab907f2a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

goroutine-patterns scanned grade A with 0 findings 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 4d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/go-toolkit/skills/goroutine-patterns/SKILL.md · 368 lines

How it starts

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

Goroutine Patterns

Implement Go concurrency patterns for efficient parallel processing.

Quick Start

Basic goroutine:

go func() {
    // Runs concurrently
}()

With channel:

ch := make(chan int)
go func() {
    ch <- 42
}()
result := <-ch

Instructions

Step 1: Choose Concurrency Pattern

Simple parallel execution:

var wg sync.WaitGroup

for i := 0; i < 10; i++ {
    wg.Add(1)
    go func(id int) {
        defer wg.Done()
        process(id)
    }(i)
}

wg.Wait()

Worker pool:

jobs := make(chan Job, 100)
results := make(chan Result, 100)

// Start workers
for w := 0; w < numWorkers; w++ {
    go worker(jobs, results)
}

// Send jobs
for _, job := range allJobs {
    jobs <- job
}
close(jobs)

// Collect results
for range allJobs {
    result := <-results
    handleResult(result)
}

Pipeline:

// Stage 1: Generate
gen := func() <-chan int {
    out := make(chan int)
    go func() {
        defer close(out)
        for i := 0; i < 10; i++ {
            out <- i
        }
    }()
    return out
}

// Stage 2: Process
process := func(in <-chan int) <-chan int {
    out := make(chan int)
    go func() {
        defer close(out)
        for n := range in {
            out <- n * 2
        }
    }()
    return out
}

// Use pipeline
for result := range process(gen()) {
    fmt.Println(result)
}

Step 2: Implement Channel Communication

Unbuffered channel (synchronous):

ch := make(chan int)

go func() {
    ch <- 42 // Blocks until received
}()

value := <-ch // Blocks until sent

Buffered channel (asynchronous):

ch := make(chan int, 10) // Buffer of 10

ch <- 1 // Doesn't block until buffer full
ch <- 2

value := <-ch // Doesn't block if buffer has data

Select for multiple channels:

select {
case msg := <-ch1:
    fmt.Println("Received from ch1:", msg)
case msg := <-ch2:
    fmt.Println("Received from ch2:", msg)
case <-time.After(time.Second):
    fmt.Println("Timeout")
}

Read the full file on GitHub · 368 lines

Files

What ships with it

3 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. 4d ago First seen · 368 lines · 60 tokens per session scan A 5f0aab907f2a

Subscribe to this mod's changes

goroutine-patterns is a skill published in the GitHub repository armanzeroeight/fastagent-plugins (29 stars, last pushed 1mo ago), licensed MIT. It adds 60 tokens to every session and 1,786 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. 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

chat-sdk

Build multi-platform chat bots with Chat SDK (chat npm package). Use when developers want to (1) Build a Slack, Teams, Google Chat, Discord, Telegram, GitHub, Linear, or WhatsApp bot, (2) Use Chat SDK to handle mentions, direct messages, subscribed threads, reactions, slash commands, cards, modals, files, or AI…

vercel-labs/open-agents · 191 tokens

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-samber-ro

Reactive streams and event-driven programming in Golang using samber/ro — ReactiveX implementation with 150+ type-safe operators, cold/hot observables, 5 subject types (Publish, Behavior, Replay, Async, Unicast), declarative pipelines via Pipe, 40+ plugins (HTTP, cron, fsnotify, JSON, logging), automatic backpressure…

samber/cc-skills-golang · 156 tokens

golang-samber-slog

Structured logging extensions for Golang using samber/slog- packages — multi-handler pipelines (slog-multi), log sampling (slog-sampling), attribute formatting (slog-formatter), HTTP middleware (slog-fiber, slog-gin, slog-chi, slog-echo), and backend routing (slog-datadog, slog-sentry, slog-loki, slog-syslog…

samber/cc-skills-golang · 123 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-samber-do

Dependency injection in Golang using samber/do — service containers, lifecycle management, scopes, health checks, graceful shutdown, and module organization. Apply when using or adopting samber/do, when the codebase imports github.com/samber/do or github.com/samber/do/v2, or when refactoring manual constructor…

samber/cc-skills-golang · 74 tokens