go-service.agents

go-service.agents is an agent for coding agents from kid-sid/codex-spellbook. It costs 0 tokens per session (528 once invoked), scanned A, original, MIT.

A template of working rules for Go services built with Go’s standard library. It covers project setup, code structure, HTTP handling, errors, testing, and operational checks.

In plain words
What is it for?
Starting Go services, wiring HTTP routes, designing JSON responses, handling errors, and writing table-driven tests.
Why use it?
It gives developers consistent conventions for building and reviewing Go services.

Agent

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/kid-sid/codex-spellbook/go-service.agents
Clone the repo
git clone --depth 1 https://github.com/kid-sid/codex-spellbook

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-service.agents

README.md
[![agentmods](https://agentmods.dev/badge/agents/kid-sid/codex-spellbook/go-service.agents.svg)](https://agentmods.dev/agents/kid-sid/codex-spellbook/go-service.agents)
Your own site
<a href="https://agentmods.dev/agents/kid-sid/codex-spellbook/go-service.agents"><img src="https://agentmods.dev/badge/agents/kid-sid/codex-spellbook/go-service.agents.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 528 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.00000 $0.00528
Opus 5 $0.00000 $0.00264
Sonnet 5 $0.00000 $0.00106
Haiku 4.5 $0.00000 $0.00053

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

Security

Grade A, and why

go-service.agents 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 3d 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/go-service.agents.md · 81 lines

How it starts

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

Go Service Agent Template

Purpose

Use this template for Go services built around the standard library, explicit package boundaries, and operational simplicity.

Environment Setup

Run these commands before starting work:

set -euo pipefail
bash setup-scripts/go.sh
go version
golangci-lint --version
govulncheck -version || true

Working Style

  • Prefer the standard library before adding frameworks.
  • Keep handlers small and push logic into testable packages.
  • Model dependencies through interfaces only where more than one implementation is plausible.
  • Optimize for readability over cleverness.

Go Conventions

  • Keep package names short, lowercase, and domain-driven.
  • Return explicit errors and wrap with context.
  • Use contexts consistently for cancellation and deadlines.
  • Avoid global mutable state.

HTTP and Service Design

  • Use net/http and explicit route wiring.
  • Keep request parsing, validation, and response writing close to the transport layer.
  • Define stable JSON contracts and error envelopes.
  • Add health and readiness endpoints.

Testing

  • Use table-driven tests for input matrices.
  • Add subtests where they improve failure isolation.
  • Keep unit tests fast and deterministic.
  • Add integration tests for persistence and HTTP seams when behavior matters.

Build and Tooling

  • Expose make build, make test, and make lint when a Makefile exists.
  • Run gofmt and golangci-lint on touched code.
  • Keep module dependencies minimal and review new additions critically.

Docker

  • Use multi-stage builds with a separate builder image.
  • Produce a minimal runtime image when possible.
  • Run the container as non-root.

Git Workflow

  • Use feat/, fix/, and chore/ branch prefixes.
  • Use conventional commits.
  • Prefer squash merges for noisy branches and merge commits for meaningful multi-step history.

Security Baseline

  • Never embed credentials in code or config committed to the repo.
  • Validate external input at HTTP and queue boundaries.
  • Use parameterized SQL with database/sql or query builders.
  • Run govulncheck for dependency and standard-library issues.

Read the full file on GitHub · 81 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. 3d ago First seen · 81 lines · 0 tokens per session scan A 017f5ad4a02f

Subscribe to this mod's changes

go-service.agents is an agent published in the GitHub repository kid-sid/codex-spellbook (21 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 528 tokens. 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-30.