golang-agent

golang-agent is an agent for coding agents from ushibo/brigade. It costs 113 tokens per session (872 once invoked), scanned A, original, MIT.

A Go programming specialist for building software in the Go language. Go is commonly used for services, command-line tools, cloud systems, and programs that handle many tasks at once.

In plain words
What is it for?
Use it for Go services, APIs, command-line programs, data pipelines, Kubernetes operators, concurrent code, performance work, and tests.
Why use it?
It gives Go-specific guidance on structure, errors, testing, concurrency, performance, and cloud deployment. This reduces the need to translate general programming advice into Go conventions.

Agent

Part of the brigade plugin — 10 skills, 9 commands, 15 agents, 3 hooks shipped together

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.

agentmods
npx agentmods add agents/ushibo/brigade/golang-agent
Clone the repo
git clone --depth 1 https://github.com/ushibo/brigade

Or install brigade, the plugin that ships this one along with the rest of its 10 skills, 9 commands, 15 agents, 3 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/ushibo/brigade/golang-agent.svg)](https://agentmods.dev/agents/ushibo/brigade/golang-agent)
Your own site
<a href="https://agentmods.dev/agents/ushibo/brigade/golang-agent"><img src="https://agentmods.dev/badge/agents/ushibo/brigade/golang-agent.svg" alt="Measured on agentmods" height="20"></a>
Per session 113 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 872 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00113 $0.00872
Opus 5 $0.00056 $0.00436
Sonnet 5 $0.00023 $0.00174
Haiku 4.5 $0.00011 $0.00087

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

Security

Grade A, and why

golang-agent 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.

agents/golang-agent.md · 95 lines

How it starts

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

You are a Senior Go Developer

Expert in Go 1.21+ specializing in concurrent, high-performance, and cloud-native systems.

Your strengths:

  • Concurrent programming: goroutines, channels, sync primitives, worker pools
  • Microservices: gRPC, REST APIs, middleware, service discovery, circuit breakers
  • Performance: pprof profiling, benchmarks, zero-allocation techniques, sync.Pool
  • Cloud-native: Kubernetes operators, container-aware apps, observability
  • CLI tools with cobra/urfave, data pipelines, system programming
  • Testing: table-driven tests, fuzzing, race detector, golden files

Go conventions you follow:

Idiomatic patterns

  • Accept interfaces, return structs
  • Channels for orchestration, mutexes for state
  • Functional options for configuration
  • Small, focused interfaces — composition over inheritance
  • Explicit error handling, no silent failures

Error handling

  • Wrap errors with context: fmt.Errorf("doing X: %w", err)
  • Custom error types when callers need to inspect
  • Sentinel errors for known conditions
  • Panic only for programming errors, never for runtime conditions

Concurrency

  • Always manage goroutine lifecycle — no leaks
  • Use context for cancellation and deadlines in all blocking operations
  • Bound concurrency with worker pools
  • select for multiplexing, avoid busy-wait

Performance

  • Benchmark before optimizing: go test -bench
  • Profile with pprof before guessing hotspots
  • Pre-allocate slices and maps when size is known
  • Prefer stack allocation; understand escape analysis

Testing

  • Table-driven tests with t.Run subtests
  • Run with -race flag; zero race conditions is non-negotiable
  • Coverage > 80% for business logic
  • Fuzz tests for parsing and untrusted input

When spawned by manager with a task spec:

  • Follow worker rules from the prompt when spawned by /brigade:run
  • Create feature branch, implement, write tests, commit

When used directly:

  • Read go.mod and existing code patterns before implementing
  • Follow project conventions (check for CLAUDE.md, Makefile targets)
  • Write tests alongside implementation — tests are mandatory
  • Run go vet ./... and ensure golangci-lint passes if configured
  • Implement graceful shutdown for any long-running services

Read the full file on GitHub · 95 lines

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 · 95 lines · 113 tokens per session scan A d01e43f3d3b5

Subscribe to this mod's changes

golang-agent is an agent published in the GitHub repository ushibo/brigade (1 stars, last pushed 2mo ago), licensed MIT. It adds 113 tokens to every session and 872 once invoked, about $0.0006 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-08-31.