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/craigjmidwinter/mail-muncher/agents-mdgit clone --depth 1 https://github.com/craigjmidwinter/mail-muncherWrote 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/instructions/craigjmidwinter/mail-muncher/agents-md)<a href="https://agentmods.dev/instructions/craigjmidwinter/mail-muncher/agents-md"><img src="https://agentmods.dev/badge/instructions/craigjmidwinter/mail-muncher/agents-md.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 | $0.01320 | $0.01320 |
| Opus 5 | $0.00660 | $0.00660 |
| Sonnet 5 | $0.00264 | $0.00264 |
| Haiku 4.5 | $0.00132 | $0.00132 |
Grade A, and why
mail-muncher 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 4d 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 — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Working notes for coding agents. Conventions and invariants only — the README is the user-facing documentation and is not repeated here.
What this is
mail-muncher gives a program its own read-only mailbox. It archives mail
matching user-written rules to .eml and markdown files on disk, and serves
that archive to agents over MCP. Go, no cgo, single binary. Two providers
(Gmail API, IMAP) sit behind one interface; a pipeline fetches, parses,
evaluates a match tree, and writes through sinks.
Commands
Go 1.25+. No code generation, no build tags, no other toolchain.
make build # go build -o ./mail-muncher, version stamped from git describe
make test # go test ./...
make lint # golangci-lint run if installed, else go vet ./...
make fmt # go fmt ./...
make tidy # go mod tidy
These are green on a clean checkout. If they are not, that is a bug worth reporting rather than working around.
golangci-lint is optional and CI does not run it. Without the binary,
make lint prints golangci-lint not found; falling back to go vet and runs
go vet. The full set is pinned in .golangci.yml and is worth running
locally before any change to error handling, file paths, or anything that
writes to disk — it is not a CI gate because it was measured at 51 minutes on
a GitHub runner. CI runs gofmt -l ., go mod tidy verification, go build,
go vet, and go test -race.
Invariants a change must not break
These are the product, not preferences. A change that breaks one is wrong even if it compiles and the suite passes.
- No new OAuth scope.
internal/provider/gmail/auth.godeclares exactly one —gmail.readonly— and it is the only scope constant in the tree. - Nothing that can send, delete, or modify mail. No Gmail
Modify/Trash/Delete/Send/Insert/BatchModify; no IMAPSTORE/EXPUNGE/APPEND/MOVE/COPY. IMAP opens mailboxes withEXAMINE(SelectOptions{ReadOnly: true}) and fetches withBODY.PEEK[]so reading never sets\Seen. This is enforced mechanically byTestProviderSourceNeverCallsAWriteCapableMailboxMethodininternal/provider/, which AST-walks provider source and fails on any write verb. If that test fires, the change is the problem, not the test. - No credentials, tokens, real email addresses, or real message ids in a
diff. Fixtures use
example.com,acme.example, and.test. The OAuth client fixture atinternal/provider/gmail/testdata/credentials.jsonis deliberately fake and must stay that way. - The provider seam holds. Adding a provider must require zero changes to
internal/pipeline,internal/filter, orinternal/sink. Aif provider == "imap"outsideinternal/provider/means the interface is wrong; fix the interface.
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.
- 4d ago First seen · 100 lines · 1,320 tokens per session scan A c4642f8575ec
mail-muncher AGENTS.md is an instructions file published in the GitHub repository craigjmidwinter/mail-muncher (3 stars, last pushed 13d ago), licensed MIT. It adds 1,320 tokens to every session, about $0.0066 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 instructions, from other repositories
Gmail-MCP-Server CLAUDE.md
Instructions for ArtyMcLabin/Gmail-MCP-Server, covering claude.md - gmail mcp server, branch workflow and pr & issue review.
your-mail-mcp CLAUDE.md
Claude Code instructions for wildsurfer/your-mail-mcp, covering your-mail-mcp, status, invariants, design decisions and layout.
mail-index AGENTS.md
AGENTS.md instructions for unsoldgroup/mail-index, covering agent setup & usage guide, 1. register the mcp server, claude desktop, claude code and or with an absolute path / env.
email-local-mcp CLAUDE.md
Instructions for MarcinWalendowski/email-local-mcp, covering claude.md — email local mcp, naming is enforced, not remembered, gates and releasing.
tutabridge CLAUDE.md
Claude Code instructions for spartanz51/tutabridge, covering tutabridge, architecture, core principle: syncer-driven, store-backed, syncer two-phase cycle and testing.
mail-agent-mcp AGENTS.md
AGENTS.md instructions for SinoEdwards/mail-agent-mcp, covering agents.md, project, entry procedure, security boundaries and architecture.