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 instructions/samzong/gmc/agents-mdgit clone --depth 1 https://github.com/samzong/gmcWhat 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.02039 | $0.02039 |
| Opus 5 | $0.01019 | $0.01019 |
| Sonnet 5 | $0.00408 | $0.00408 |
| Haiku 4.5 | $0.00204 | $0.00204 |
Grade A, and why
gmc AGENTS.md 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.
How it starts
The opening of the file, as written. The whole thing — 182 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Instructions for AI coding agents working in this repository.
What this repo is
gmc is a Go CLI for parallel AI-agent development: worktree management is the primary surface, AI-generated Conventional Commits are secondary.
- Primary:
.bareclone + sibling worktrees (gmc wt add/dup/share/sync/promote/...) - Secondary: LLM commit messages from staged diffs (root
gmccommand)
User-facing command reference: README.md. Runtime usage patterns: skills/gmc/SKILL.md.
Architecture invariants
Three layers — do not blur boundaries:
Layer 1: Command Definition (cmd/*.go)
cobra.Command + flag binding + Args validation
│
Layer 2: Runner Function
build Options → call Layer 3 → format output
│
Layer 3: Business Logic (internal/*)
no CLI dependencies; testable in isolation
Rules agents must follow:
| Rule | Detail |
|---|---|
| Dependency direction | cmd/ imports internal/; internal/ must not import cmd/ or Cobra |
| Command handlers | Use RunE, not Run; always set an Args validator |
| Output streams | stdout = data; stderr = progress/errors; use cmd.OutOrStdout() / errWriter() |
| Errors | Return error; main.go prints it. Use exitcode for structured exit codes; userFacingError in cmd/root.go for generic wrapping |
| Worktree CLI | All worktree operations go through gmc wt <subcommand>. Never invent top-level gmc add, gmc clone, etc. |
| Generated docs | Never hand-edit docs/man/*.1. Man pages are generated from Cobra definitions in cmd/*.go via make man (cmd/gendoc/main.go). |
Entry point: main.go → cmd.Execute().
Where to change what
| Area | Location | Notes |
|---|---|---|
| Root commit workflow | cmd/root.go, internal/workflow/ |
Staging, prompt, interactive confirm, commit |
| Worktree commands | cmd/worktree*.go, internal/worktree/ |
Split across worktree.go, worktree_share.go, worktree_hook.go, worktree_sync.go, worktree_init.go, worktree_prune.go |
| Worktree client wiring | cmd/worktree_client.go |
Thin factory over worktree.NewClient |
| Config | cmd/config.go, internal/config/ |
Viper-based; XDG paths |
| LLM integration | internal/llm/ |
OpenAI-compatible client |
| Prompt / formatting | internal/formatter/ |
Templates, diff truncation (diff_truncator.go) |
| Git operations | internal/git/, internal/gitcmd/, internal/gitutil/ |
|
| Branch naming | internal/branch/ |
--branch flag on root command |
| Shell integration | internal/shell/, cmd/worktree_init.go |
gmc wt init bash|zsh|fish |
| Tests for CLI | cmd/*_test.go |
Use isolated command instances; swap outWriterFunc / errWriterFunc |
| Man pages (generated) | docs/man/*.1 |
Do not edit. Source of truth is Use/Short/Long/Example on commands in cmd/*.go. Regenerate: make man |
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 · 182 lines · 2,039 tokens per session scan A 8744ceb16e48
gmc AGENTS.md is an instructions file published in the GitHub repository samzong/gmc (18 stars, last pushed 2mo ago), licensed MIT. It adds 2,039 tokens to every session, about $0.0102 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-30.
Other instructions, from other repositories
claude-codex-settings CLAUDE.md
Claude Code instructions for fcakyon/claude-codex-settings, covering claude-settings, repo structure, cross-tool plugin format reference, plugin manifests and root marketplace files.
git-lrc CLAUDE.md
Claude Code instructions for HexmosTech/git-lrc, covering git-lrc release process, prerequisites, sequence and notes.
git-lrc AGENTS.md
AGENTS.md instructions for HexmosTech/git-lrc, covering rule 1: git-lrc build command, rule 2: code organization and status docs, rule 3: ui iconography guidance and rule 4: syncing to livereview.
git-lrc copilot-instructions.md
Copilot instructions for HexmosTech/git-lrc, covering rule 1: git-lrc build command, rule 2: code organization and status docs and rule 3: ui iconography guidance.
git-authoring AGENTS.md
Instructions for n-shadloo/git-authoring, covering git authoring conventions, usage modes, ground rules, workflow and 1. gather context.
git-authoring GEMINI.md
Instructions for n-shadloo/git-authoring: This repository's commit-message and pull-request rules live in AGENTS.md at the repository root. Follow it in full and choose the mode from the user's request.