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.
npx skills add inference-gateway/adk --skill go-concurrencygit clone --depth 1 https://github.com/inference-gateway/adkWrote 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.
[](https://agentmods.dev/skills/inference-gateway/adk/go-concurrency)<a href="https://agentmods.dev/skills/inference-gateway/adk/go-concurrency"><img src="https://agentmods.dev/badge/skills/inference-gateway/adk/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.
<a href="https://agentmods.dev/skills/inference-gateway/adk/go-concurrency"><img src="https://agentmods.dev/badge/skills/inference-gateway/adk/go-concurrency.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00116 | $0.02398 |
| Opus 5 | $0.00058 | $0.01199 |
| Sonnet 5 | $0.00023 | $0.00480 |
| Haiku 4.5 | $0.00012 | $0.00240 |
Grade A, and why
go-concurrency 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 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.
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.
This is a copy
92% identical to go-concurrency — 6 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 277 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Go Concurrency
A quick-reference for writing and reviewing concurrent Go. Reach for the table
that fits the problem, copy the nearest pattern, then check it against the
gotchas. Verify everything with go test -race.
Don't communicate by sharing memory; share memory by communicating. Use channels to pass ownership of data, distribute work, and signal. Use a mutex for in-place shared state (caches, counters, registries).
Pick your tool
| Need | Use |
|---|---|
| Hand off / stream values between goroutines | chan |
| Protect shared state in place | sync.Mutex / sync.RWMutex (read-heavy) |
| Wait for N goroutines to finish | sync.WaitGroup |
| Run exactly once (lazy init) | sync.Once |
| Reuse expensive allocations, cut GC pressure | sync.Pool |
| Wake goroutines on a condition | sync.Cond (rare; a channel is usually clearer) |
| Lock-free counters / flags | sync/atomic |
| Cancellation, deadlines, request-scoped values | context.Context |
Always defer mu.Unlock() right after mu.Lock() so a panic can't leave the
lock held.
In this repo: the streaming task path (
StreamableTaskHandler,server/agent_streamable.go) is channel-based -RunWithStreamreturns a<-chan cloudevents.Eventthe caller ranges over. The producer owns andcloses that channel; consumers only receive. The done-channel / context patterns below are exactly how a streaming handler should honor cancellation.
Channel states
Behaviour is defined by the operation × the channel's state. Memorize this:
| Operation | nil channel | open channel | closed channel |
|---|---|---|---|
receive v := <-c |
blocks forever | a value (or blocks if empty) | zero value, ok==false (drains buffer first) |
send c <- v |
blocks forever | sends (or blocks if full) | panic |
close(c) |
panic | closes it | panic |
- Unbuffered (
make(chan T)): send and receive rendezvous - each blocks until the other is ready. This is the synchronization. - Buffered (
make(chan T, n)): send blocks only when full, receive only when empty. A buffer decouples timing; it does not remove backpressure. - Ownership rule: exactly one goroutine owns a channel - it creates, writes,
and
closes it, then hands consumers a receive-only<-chan T. This makes the panics above structurally impossible. Receivers never close. range creads until the channel is closed;v, ok := <-cdetects closure.
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.
- 9d ago First seen · 277 lines · 116 tokens per session scan A 70eb4d29487a
go-concurrency is a skill published in the GitHub repository inference-gateway/adk (25 stars, last pushed 5d ago), licensed Apache-2.0. It adds 116 tokens to every session and 2,398 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. It is 92% identical to go-concurrency, differing in 6 lines, and is treated as a copy.
Other skills, from other repositories
python-math
Small Python utilities for math and text files.
adk-sample-creator
Author or rework a runnable example under examples/ in the ADK Go repository — the directory, main.go, the README with its Mermaid diagram and real transcript, and the index row. Use when adding a sample for a feature (workflow graph, tool, registry client, model backend, server), when asked to "add an example" for…
stack-trace-go-probe
Internal helper for meta-stack-trace-investigator. Use when a Go panic or stack trace needs Go-specific nil/error checks, go test reproducer guidance, and patch targets.
ax-go-gen
Use when writing Go code with github.com/ax-llm/ax/packages/go for AxGen programs, forward calls, indexed multi-sampling, result pickers, streaming, tools, assertions, traces, usage, and output parsing.
ax-go-agent
Use when writing Go code with github.com/ax-llm/ax/packages/go for agents, child delegation, tools, MCP, citations, persistent playbook learning, stage instructions, runtime state, final typed responses, and direct-respond executor skipping.
ax-go-audio
Use when writing Go code with github.com/ax-llm/ax/packages/go for audio input/output, OpenAI Responses audio mapping, realtime event folding, and generated package audio examples.