go-expert

go-expert is a skill for Claude Code from shennawardana23/skillme. It costs 107 tokens per session (1,575 once invoked), scanned A, original, Apache-2.0.

A guide to keeping low-level Go concurrency correct when code starts goroutines, uses mutexes, or closes channels. A goroutine is a lightweight concurrent function; a race condition occurs when concurrent code accesses shared data unsafely.

In plain words
What is it for?
Defining goroutine ownership and stop signals, protecting shared state, deciding who closes channels, and checking code with race, vet, and leak-detection tools.
Why use it?
It helps catch leaks, lock mistakes, and channel-ownership errors that may only appear under load rather than during ordinary tests.

Skill for Claude Code

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

Part of the skillme plugin — 137 skills, 2 commands shipped together

Good fit Defining goroutine ownership and stop signals, protecting shared state, deciding who closes channels, and checking code with race, vet, and leak-detection tools.

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

Made for: Claude Code.

Or install skillme, the plugin that ships this one along with the rest of its 137 skills, 2 commands.

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-expert

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/shennawardana23/skillme/go-expert"><img src="https://agentmods.dev/badge/skills/shennawardana23/skillme/go-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 107 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,575 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 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.00107 $0.01575
Opus 5 $0.00053 $0.00788
Sonnet 5 $0.00021 $0.00315
Haiku 4.5 $0.00011 $0.00158

Measured 8d ago against content hash 21b8e10b501c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

go-expert 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 8d 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.

skills/go-expert/SKILL.md · 176 lines

How it starts

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

Go Concurrency Correctness

Race conditions and goroutine leaks are the Go bugs that pass every test run and only surface under load, months later. go-service-idioms covers composing concurrent work with errgroup; this skill covers the lower-level ownership rules that make individual goroutines, mutexes, and channels safe to combine that way in the first place. Apply these rules whenever code starts a goroutine, takes a lock, or closes a channel — then run the detection tooling in the last section to confirm you didn't miss one, since these bugs are usually invisible without instrumentation.

Goroutine lifecycle: every goroutine needs an owner and a stop signal

Never start a goroutine without a way to observe when it's done or tell it to stop — a context.Context, a done channel, or a sync.WaitGroup someone actually waits on.

// Bad: fire-and-forget, no one can wait for it or cancel it
go worker(items)

// Good: owned, cancelable, and its completion is observable
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
done := make(chan struct{})
go func() {
    defer close(done)
    worker(ctx, items)
}()

Pair every wg.Add(1) with a defer wg.Done() on the next line inside the goroutine, not somewhere later in the function body — a return or panic between Add and a non-deferred Done hangs every caller of wg.Wait() forever.

wg.Add(1)
go func() {
    defer wg.Done() // immediately, before any other logic
    process(item)
}()

Mutex hygiene: lock and defer-unlock are one atomic thought

defer mu.Unlock() goes on the line immediately after mu.Lock() — never lock, do conditional work, and defer the unlock later based on a branch. A goroutine that panics while holding a lock without a deferred unlock poisons every future caller with a permanent deadlock, since Go mutexes don't auto-release on panic.

// Bad: unlock is reachable but not guaranteed on every path
mu.Lock()
if invalid(state) {
    mu.Unlock()
    return errors.New("invalid")
}
mutate(state)
mu.Unlock()

// Good: unlock guaranteed regardless of how the function returns
mu.Lock()
defer mu.Unlock()
if invalid(state) {
    return errors.New("invalid")
}
mutate(state)

Read the full file on GitHub · 176 lines

Files

What ships with it

1 file 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. 8d ago First seen · 176 lines · 107 tokens per session scan A 21b8e10b501c

Subscribe to this mod's changes

go-expert is a skill published in the GitHub repository shennawardana23/skillme (2 stars, last pushed 13d ago), licensed Apache-2.0. It adds 107 tokens to every session and 1,575 once invoked, about $0.0005 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

go-logging

Use when choosing a Go logger, configuring slog, writing structured log statements, picking log levels, or attaching request-scoped fields. Apply proactively whenever code calls log/fmt to emit operational information, migrates off log/logrus/zap/zerolog, or sets up production logging. Covers structured logging only …

muratmirgun/gophers · 83 tokens

golang-performance

Go performance workflow: benchmark and profile (pprof/trace), identify hotspots, reduce allocations/GC and contention, and verify improvements with repeatable measurement. Use only after you have evidence the Go code is the bottleneck.

AeonDave/malskill · 49 tokens

cmd_go_build

Fix Go build errors, go vet warnings, and linter issues incrementally. Invokes the go-build-resolver agent for minimal, surgical fixes.

majiang213/OpenClaw-MAS · 34 tokens

go-lint

Skill "go-lint" from rootwarp/claude-code-plugins-monorepo, covering /go-lint and instructions.

rootwarp/claude-code-plugins-monorepo · 0 tokens

dart-run-static-analysis

Execute dart analyze to identify warnings and errors, and use dart fix --apply to automatically resolve mechanical lint issues. Use during development to ensure code quality and before committing changes.

sutchan/Agent-Skills-Hub · 43 tokens

printing-press-polish

Polish a generated CLI to pass verification and become publish-ready. Runs diagnostics (dogfood, verify, scorecard, go vet, gosec), automatically fixes all issues (verify failures, static-analysis findings, dead code, descriptions, README, MCP tool quality), reports the before/after delta, and offers to publish. Use…

mvanhorn/cli-printing-press · 125 tokens