go-engineering

go-engineering is a command for Gemini CLI from mfmezger/ai_agent_dotfiles. It costs 92 tokens per session (832 once invoked), scanned A, original, MIT.

A set of guidance for writing, reviewing, refactoring, and debugging Go code. Go is a programming language known for explicit error handling and built-in support for concurrent programs.

In plain words
What is it for?
Use it when designing Go packages, writing exported APIs, handling errors, adding concurrency, reviewing pull requests, or running tests and code-quality checks.
Why use it?
It helps keep Go packages and APIs small, understandable, and predictable. It also covers errors, interfaces, cancellation, concurrency, tests, formatting, and static checks.

Command for Gemini CLI

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 commands/mfmezger/ai_agent_dotfiles/go-engineering
Clone the repo
git clone --depth 1 https://github.com/mfmezger/ai_agent_dotfiles

Made for: Gemini CLI.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/mfmezger/ai_agent_dotfiles/go-engineering.svg)](https://agentmods.dev/commands/mfmezger/ai_agent_dotfiles/go-engineering)
Your own site
<a href="https://agentmods.dev/commands/mfmezger/ai_agent_dotfiles/go-engineering"><img src="https://agentmods.dev/badge/commands/mfmezger/ai_agent_dotfiles/go-engineering.svg" alt="Measured on agentmods" height="20"></a>
Per session 92 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 832 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.00092 $0.00832
Opus 5 $0.00046 $0.00416
Sonnet 5 $0.00018 $0.00166
Haiku 4.5 $0.00009 $0.00083

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

Security

Grade A, and why

go-engineering 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 5d 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.

gemini/.gemini/commands/go-engineering.md · 65 lines

How it starts

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

Go Engineering

Produce Go that is small in surface area, explicit in behavior, and easy to read under review. Prefer straightforward package boundaries, concrete types first, small interfaces where they help callers, explicit error handling, and concurrency that can be reasoned about.

Workflow

  1. Identify the package boundary. Library: optimize for small exports, concrete behavior, and compatibility. Application: optimize for operability, wiring clarity, and cancellation-aware execution.
  2. Model the package API before adding helpers. Keep exported identifiers minimal and make zero values useful when practical.
  3. Choose concrete types first. Introduce interfaces where consumers benefit, not as a reflex.
  4. Design error flow early. Wrap with context, support errors.Is and errors.As, and keep sentinel errors narrow.
  5. Add concurrency only where it simplifies latency or throughput. Cancellation, shutdown, ownership, and goroutine lifetime must be explicit.
  6. Verify before finalizing. Run gofmt, go test ./..., and go vet ./... when appropriate. Add go test -race ./... for concurrency-sensitive code. Keep examples and benchmarks honest.

Load References By Need

Need Reference
Package layout, modules, exported API shape, CLI/app structure references/workflow.md
Errors, wrapping, sentinels, concrete types vs interfaces references/api-and-errors.md
Concurrency, channels, contexts, goroutines, shutdown references/concurrency.md
Testing, table tests, fuzzing, benchmarks, temp dirs references/testing-and-quality.md
Performance, allocations, slices, maps, common footguns references/performance-and-footguns.md

Default Standards

  • Keep packages focused and exports intentional.
  • Start with concrete types; accept interfaces when they improve the consuming code.
  • Pass context.Context explicitly for request-scoped or cancelable work.
  • Return errors, wrap them with context, and avoid panic for ordinary failures.
  • Prefer simple loops and data flow over abstraction-heavy “framework” patterns.
  • Keep goroutine ownership clear. Every goroutine should have a reason to exit.
  • Make the zero value useful when practical and not misleading.

Read the full file on GitHub · 65 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. 5d ago First seen · 65 lines · 92 tokens per session scan A 0adbc625dce4

Subscribe to this mod's changes

go-engineering is a command published in the GitHub repository mfmezger/ai_agent_dotfiles (5 stars, last pushed 1mo ago), licensed MIT. It adds 92 tokens to every session and 832 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-08-31.