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.5 | $0.00046 | $0.00959 |
| Sonnet 5.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 3mo 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 — 26 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.
- 3mo 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 (27 stars, last pushed 6d ago), licensed Apache-2.0. It adds 116 tokens to every session and 2,398 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 92% identical to go-concurrency, differing in 26 lines, and is treated as a copy.
go-concurrency compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| go-concurrencyinference-gateway/adk | Skill | 27 | 6d ago | Apache-2.0 | A | 116 | Claude Code, Codex |
| python-mathtrpc-group/trpc-agent-go | Skill | 1.9k | yesterday | Apache-2.0 | A | 13 | Claude Code, Codex |
| golang-testingaffaan-m/ECC | Skill | 313k | 7d ago | MIT | A | 37 | Claude Code, Kiro |
| golang-patternsaffaan-m/ECC | Skill | 313k | 7d ago | MIT | A | 45 | Claude Code, Kiro |
| adk-sample-creatorgoogle/adk-go | Skill | 9.0k | yesterday | Apache-2.0 | A | 94 | Claude Code, Codex |
| agentscope-javaagentscope-ai/agentscope-java | Skill | 6.5k | today | Apache-2.0 | A | 91 | Claude Code, Codex |
| ax-go-genax-llm/ax | Skill | 3.0k | today | Apache-2.0 | A | 54 | Claude Code, Codex |