Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add muratmirgun/gophers/plugin install gophersWrote 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/muratmirgun/gophers/go-logging)<a href="https://agentmods.dev/skills/muratmirgun/gophers/go-logging"><img src="https://agentmods.dev/badge/skills/muratmirgun/gophers/go-logging.svg" alt="Measured on agentmods" 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.00083 | $0.02205 |
| Opus 5 | $0.00042 | $0.01103 |
| Sonnet 5 | $0.00017 | $0.00441 |
| Haiku 4.5 | $0.00008 | $0.00220 |
Grade A, and why
go-logging 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.
How it starts
The opening of the file, as written. The whole thing — 195 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Go Logging
Logs are written for operators — the human who will be paged at 3 a.m. and needs to know what happened. Every log line either helps diagnose a production issue or it is noise. log/slog from the standard library is the default; reach for anything else only after measuring.
This skill covers logging only. Metrics, distributed tracing, profiling, and RUM are a separate concern — they belong to a future
go-observabilityskill. Do not confuse them with logging here.
Core Rules
- Use
log/slogfor new code. Structured, leveled, in the standard library since Go 1.21. - Static message, structured fields. The message describes what happened; data goes in key-value attributes.
- Log or return, never both. Logging a wrapped error makes the same failure appear at every layer.
- Log at the boundary. HTTP handlers, job runners, and
mainlog. Library code wraps and returns. - Use snake_case keys consistently across the codebase (
user_id,request_id,elapsed_ms). slog.Erroralways carries an"err"attribute. Without it, you logged a sentence, not an error.- Never log secrets, PII, or unbounded data. Tokens, full credit cards, request bodies — none of it.
Choosing a Logger
| Situation | Use |
|---|---|
| New production service | log/slog |
| Trivial CLI / one-off script | log (the standard package) |
| Measured hot-path bottleneck where slog dominates the flame graph | zap or zerolog, but keep the structured style |
| Existing zap/logrus/zerolog code | Migrate to slog with a bridge handler; see references/slog-handler-ecosystem.md |
slog's API is stable, the ecosystem has consolidated around it, and JSON output works with every log shipper. Do not introduce a third-party logger without a benchmark showing the win.
Structured Logging
Build log messages from a static message plus typed fields:
// Good — static message, structured fields
slog.Info("order placed", "order_id", orderID, "total_cents", totalCents)
// Bad — dynamic data baked into the message string
slog.Info(fmt.Sprintf("order %d placed for $%.2f", orderID, total))
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.
- 5d ago First seen · 195 lines · 83 tokens per session scan A 3645a4b653d3
go-logging is a skill published in the GitHub repository muratmirgun/gophers (8 stars, last pushed 25d ago), licensed MIT. It adds 83 tokens to every session and 2,205 once invoked, about $0.0004 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.
Other skills, from other repositories
go
Use when writing Go services, CLIs, or libraries. Covers idiomatic error wrapping, goroutine and context discipline, interface design, table-driven tests, and the race detector.
golang-pro
Implements concurrent Go patterns using goroutines and channels, designs and builds microservices with gRPC or REST, optimizes Go application performance with pprof, and enforces idiomatic Go with generics, interfaces, and robust error handling. Use when building Go applications requiring concurrent programming…
developing-genkit-go
Develop AI-powered applications using Genkit in Go. Use when the user asks to build AI features, agents, flows, or tools in Go using Genkit, or when working with Genkit Go code involving generation, prompts, streaming, tool calling, or model providers.
programming
Applies strict, modern language practice (typed errors, exhaustive match, TDD) for Python, Rust, TypeScript, and Go. Use for work on .py, .rs, .ts, or .go files.
authoring-go-sdk-tasks
Writes Airflow task logic in Go using the Airflow Go SDK. Use when the user wants to implement Airflow tasks in Go, asks about BundleProvider/RegisterDags, the bundlev1 Registry/Dag interfaces, registering Go tasks (AddTask/AddTaskWithName), dependency injection by parameter type (context.Context, sdk.TIRunContext…
loom-golang
Go language expertise for idiomatic, production-quality code.