golang-concurrency

golang-concurrency is a skill for Claude Code from Harmeet10000/skills. It costs 74 tokens per session (1,874 once invoked), scanned A, a copy of golang-concurrency, MIT.

A guide to running concurrent work in Go, where goroutines perform tasks independently and channels or synchronisation tools coordinate them. It focuses on correct ownership, cancellation, and error handling.

In plain words
What is it for?
Writing or reviewing goroutines, channels, locks, worker pools, fan-out and fan-in pipelines, and code with race conditions or goroutine leaks.
Why use it?
Concurrent programs can leak goroutines, race when sharing data, or leave work running after failure. The guide helps review and structure this work so it can stop predictably.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents; mentions Claude Code; built for openclaw.

Good fit Writing or reviewing goroutines, channels, locks, worker pools, fan-out and fan-in pipelines, and code with race conditions or goroutine leaks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/harmeet10000/skills/golang-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 Harmeet10000/skills --skill golang-concurrency
Clone the repo
git clone --depth 1 https://github.com/Harmeet10000/skills

Made for: Claude Code.

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 golang-concurrency

README.md
[![agentmods](https://agentmods.dev/badge/skills/harmeet10000/skills/golang-concurrency/github.svg)](https://agentmods.dev/skills/harmeet10000/skills/golang-concurrency)
Your own site
<a href="https://agentmods.dev/skills/harmeet10000/skills/golang-concurrency"><img src="https://agentmods.dev/badge/skills/harmeet10000/skills/golang-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 golang-concurrency

Your own site · 80×15
<a href="https://agentmods.dev/skills/harmeet10000/skills/golang-concurrency"><img src="https://agentmods.dev/badge/skills/harmeet10000/skills/golang-concurrency.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,874 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.
Origin 86% copy Near-identical to another mod 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.00074 $0.01874
Opus 5 $0.00037 $0.00937
Sonnet 5 $0.00015 $0.00375
Haiku 4.5 $0.00007 $0.00187

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

Security

Grade A, and why

golang-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 12d 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.

Origin

This is a copy

86% identical to golang-concurrency — 47 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.

skills/backend/Golang/golang-concurrency/SKILL.md · 134 lines

How it starts

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

Persona: You are a Go concurrency engineer. You assume every goroutine is a liability until proven necessary — correctness and leak-freedom come before performance.

Modes:

  • Write mode — implement concurrent code (goroutines, channels, sync primitives, worker pools, pipelines). Follow the sequential instructions below.
  • Review mode — reviewing a PR's concurrent code changes. Focus on the diff: check for goroutine leaks, missing context propagation, ownership violations, and unprotected shared state. Sequential.
  • Audit mode — auditing existing concurrent code across a codebase. Use up to 5 parallel sub-agents as described in the "Parallelizing Concurrency Audits" section.

Community default. A company skill that explicitly supersedes samber/cc-skills-golang@golang-concurrency skill takes precedence.

Go Concurrency Best Practices

Go's concurrency model is built on goroutines and channels. Goroutines are cheap but not free — every goroutine you spawn is a resource you must manage. The goal is structured concurrency: every goroutine has a clear owner, a predictable exit, and proper error propagation.

Core Principles

  1. Every goroutine must have a clear exit — without a shutdown mechanism (context, done channel, WaitGroup), they leak and accumulate until the process crashes
  2. Share memory by communicating — channels transfer ownership explicitly; mutexes protect shared state but make ownership implicit
  3. Send copies, not pointers on channels — sending pointers creates invisible shared memory, defeating the purpose of channels
  4. Only the sender closes a channel — closing from the receiver side panics if the sender writes after close
  5. Specify channel direction (chan<-, <-chan) — the compiler prevents misuse at build time
  6. Default to unbuffered channels — larger buffers mask backpressure; use them only with measured justification
  7. Always include ctx.Done() in select — without it, goroutines leak after caller cancellation
  8. Never use time.After in loops — each call creates a timer that lives until it fires, accumulating memory. Use time.NewTimer + Reset
  9. Track goroutine leaks in tests with go.uber.org/goleak

Read the full file on GitHub · 134 lines

Files

What ships with it

4 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. 12d ago First seen · 134 lines · 74 tokens per session scan A 4c727eb03aa2

Subscribe to this mod's changes

golang-concurrency is a skill published in the GitHub repository Harmeet10000/skills (7 stars, last pushed 4mo ago), licensed MIT. It adds 74 tokens to every session and 1,874 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to golang-concurrency, differing in 47 lines, and is treated as a copy.

Related

Other skills, from other repositories

langgraph-docs

Fetches and references LangGraph Python documentation to build stateful agents, create multi-agent workflows, and implement human-in-the-loop patterns. Use when the user asks about LangGraph, graph agents, state machines, agent orchestration, LangGraph API, or needs LangGraph implementation guidance.

langchain-ai/deepagents · 62 tokens

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

hpp

HTTP Parameter Pollution — parser discrepancies between proxy/server/app, WAF bypass, auth/ACL bypass, injection delivery.

PurpleAILAB/Decepticon · 25 tokens

php-type-juggling

PHP type juggling and magic hash attacks — exploit loose comparison (==) with 0e-prefixed hash collisions and NULL returns to bypass authentication.

PurpleAILAB/Decepticon · 34 tokens

verb-tampering

HTTP verb/method tampering — auth bypass via HEAD/OPTIONS/arbitrary methods, X-HTTP-Method-Override, TRACE/PUT/DELETE exposure, framework routing flaws.

PurpleAILAB/Decepticon · 41 tokens

csrf

Cross-Site Request Forgery — missing/invalid tokens, method override, JSON CSRF, SameSite gaps, double-submit flaws, login/logout CSRF, and CSRF-via-XSS chains to account takeover.

PurpleAILAB/Decepticon · 46 tokens