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.
npx agentmods add commands/nanotaboada/go-samples-gin-restful/pre-commitgit clone --depth 1 https://github.com/nanotaboada/go-samples-gin-restfulWhat 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 | $0.00000 | $0.00750 |
| Opus 5 | $0.00000 | $0.00375 |
| Sonnet 5 | $0.00000 | $0.00150 |
| Haiku 4.5 | $0.00000 | $0.00075 |
Grade A, and why
pre-commit 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 2d 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.
What it actually says
Before running the checklist, run git fetch origin. If the current branch is behind origin/master, stop and rebase before proceeding.
Run the pre-commit checklist for this project:
-
Update
CHANGELOG.md[Unreleased]section — read the currentCHANGELOG.md, inspectgit diffto understand what changed, then write the appropriate entry under the correct subsection (Added / Changed / Fixed / Removed), referencing the issue number. If the[Unreleased]section already contains an entry that covers these changes (e.g. added during release branch preparation via/pre-release), skip this step. Also skip this step for tooling/maintenance changes with no backing GitHub issue — feature and bug work should already have an issue per this project's SDD workflow, so this exception does not apply to them. -
Run
go fmt ./... -
Note whether
go.mod/go.sumalready have uncommitted changes before runninggo mod tidy(git diff --stat -- go.mod go.sum). Rungo mod tidy, then compare again — if tidy introduced additional changes beyond that baseline, stop and report it — propose committing the tidy result first and wait for my explicit confirmation before doing so. -
Run
go vet ./...— must pass. -
Run
go build -v ./...— must succeed. -
Ask me: were any Swagger annotations modified? If yes, run
swag init. -
Run
go test -v ./... -coverpkg=github.com/nanotaboada/go-samples-gin-restful/service,github.com/nanotaboada/go-samples-gin-restful/controller,github.com/nanotaboada/go-samples-gin-restful/route -covermode=atomic -coverprofile=coverage.out— all tests must pass, target 80%+ coverage for service, controller, route packages. -
If Docker is running, run
docker compose build— must succeed with no errors. Skip this step with a note if Docker Desktop is not running. -
If
coderabbitCLI is installed andcoderabbit review --helpreports--agentsupport, runcoderabbit review --type uncommitted --agent:- If actionable/serious findings are reported, stop and address them before proposing the commit.
- If only nitpick-level findings, report them and continue to the commit proposal.
- If
coderabbitis not installed, or the installed version does not support--agent, skip this step with a note.
Run step 1 (CHANGELOG update), then run steps 2–3 sequentially (stop at step 3 if go.mod or go.sum changed), then ask about step 6 and run swag init first if needed, then run steps 4, 5, and 7 in parallel, run step 8 (docker build), then run step 9 (CodeRabbit review) if available, report the results clearly, then propose a branch name and commit message for my approval using the format type(scope): description (#issue) (max 80 chars; types: feat fix chore docs test refactor ci perf) with the required Co-Authored-By: Claude Sonnet 5 <[email protected]> line. Do not create the branch or commit until I explicitly confirm.
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.
- 2d ago First seen · 35 lines · 0 tokens per session scan A cc664a57749e
pre-commit is a command published in the GitHub repository nanotaboada/go-samples-gin-restful (2 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 750 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-31.
Other commands, from other repositories
pre-commit
Before running the checklist, run git fetch origin. If the current branch is behind origin/master, stop and rebase before proceeding.
pre-commit
Before running the checklist, run git fetch origin. If the current branch is behind origin/master, stop and rebase before proceeding.
pre-release
Run the pre-release checklist for this project. Work through all three phases in order, pausing for explicit confirmation at each decision point before proceeding. Never create a branch, commit, tag, or push without approval.
cli-patterns
Reference patterns for implementing CLI commands in internal/cli/.
refactor-clean
Find and remove dead Go code, orphaned tests, and complexity issues.
bench
Generate and run Go benchmarks with profiling and optimization analysis.