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/terret-org/terret/claude-mdgit clone --depth 1 https://github.com/terret-org/terretWrote 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/terret-org/terret/claude-md)<a href="https://agentmods.dev/instructions/terret-org/terret/claude-md"><img src="https://agentmods.dev/badge/instructions/terret-org/terret/claude-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.1 | $0.02643 | $0.02643 |
| Opus 5 | $0.01321 | $0.01321 |
| Sonnet 5 | $0.00529 | $0.00529 |
| Haiku 4.5 | $0.00264 | $0.00264 |
Grade A, and why
terret CLAUDE.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 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 — 152 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Terret
Ruby-native, model-agnostic agent harness where everything is a plugin. Twelve gems in one repo:
gems/hamesis the kernel. Services in a context, typed events, reversible effects, dependency-driven boot. It knows nothing about LLMs and is reusable for any plugin-composed application.gems/terret-coreis the harness built on it. Session log, tools pipeline, agent loop, LLM seam (vocabulary,AdapterBaseretry policy,FakeAdapter), plus the M6 long-lived-agent services: durable approvals (ctx[:approvals], opt-in per tool), the compactor on the sole-providerctx[:summarizer]seam, the titler, and hot-reloadable per-agent policy (AllowListas a log projection). M8 added the sole-providerctx[:subagents]seam (a child agent on a fresh session, run to completion) and the loop's tool barrier, which runs a message'sconcurrency: :parallelcalls together on the reactor while a:serialtool is a barrier of one.Terret::Credentials(ctx[:credentials]) lives here too: ENV<PROVIDER>_API_KEYfirst, then an optional AES-256-GCM file store, every resolved value fed to the scrubber.gems/terret-openrouteris the one real adapter (plan §6.5): OpenRouter's OpenAI-compatible API behindctx.llm, streaming SSE with tool calling and usage accounting. The transport is injectable, so its unit tests need no network and no gems; only the defaultAsyncTransportrequiresasync-http.gems/terret-store-sqliteis the durable session store (M3): the append-only log one event per row in SQLite (WAL) behind thectx[:session_store]seam. Memory and JSONL providers live in terret-core; the store row is explicit in every boot.gems/terret-wsis the v1 interface (M4): one WebSocket per agent behindctx[:ws], the §9.2 frames, exact replay-then-tail on the session log; wire contract indocs/protocol.md; only the real endpoint requiresasync-websocket.gems/terret-acpis the second interface (M8): an Agent Client Protocol server behindctx[:acp]so an editor can drive an agent over JSON-RPC on stdio. It consumessession/eventand drivesctx[:loop]— the same two seams the socket does, on a different transport, with no change to core; mapping indocs/acp.md. stdlib-only.gems/terret-mcpis the MCP client (M5): manceps-backed stdio and streamable-HTTP servers mounted asmcp__<server>__<tool>sources behindctx[:tools], per-server approval, per-call timeouts, the allow list in terret-core; mapping indocs/mcp.md.gems/terret-morphis actx[:summarizer]provider (M6): Morph's Compact API on the wire proven in the deployed agora integration (bearer key,compression_ratio: 0.4, nil-on-any-failure), an injectable transport so its unit tests need no network, and aMORPH_LIVE=1live lane (pending aMORPH_API_KEYin this environment).gems/terret-execis the execution world (M7, plan §6.6):ctx[:fs]with every path realpath-contained to a granted workspace dir behind anfs/authorizewaterfall,ctx[:subprocess](spawn and PTY under the one reactor, SIGTERM→SIGKILL cancellation),ctx[:shell](one persistent bash per agent, sentinel protocol),ctx[:terminals](named long-lived PTYs, capped), andctx[:sandbox]with theNoneprovider — every argv passessandbox.wrapbefore it spawns. Stdlib only.gems/terret-tools-stdis the standard roster (M7, plan §6.7):Read,Write,Edit,Glob,Grep,Bash,WebFetch,terminal_open/input/read/close— Claude Code's names verbatim, no alias map — registered on those seams with honestmutating/approval/concurrencymetadata.Bash's approval derives fromsandbox.isolated?at registration;WebFetchsits behind a deny-by-default domain policy re-checked per redirect hop, plus a host-side loopback/link-local floor. M8 addedTask(delegate to a child agent viactx[:subagents]),TodoWrite, andjob_start/job_collect/job_stopoverctx[:jobs].gems/terret-sandbox-dockeris the container provider (M7): a long-lived container per boot, each workspace dir bind-mounted at the same absolute path, argv wrapped intodocker exec,--network noneby default. One patch row moves the execution world into it; docker-gated tests skip clean when the daemon is absent.gems/terretis the meta-gem and the composition layer (M8, plan §7): bundles ship ordered config rows, profiles stack bundles, patches adjust rows by id, andTerret.boothands the result to the Hames loader. It shipsterret-base(config/bundle.yml), theheadlessprofile template, and thetrtexecutable (boot,dump-config,doctor,acp). Itsdiscover_bundlesmounts a third-party bundle off that gem's gemspecmetadata["terret"], so a plugin gem becomes composable by shipping normally. The contract isdocs/composition.md; read it and plan §7 before changing anything here.Terret::Meta::VERSIONis the gem's version —Terret::VERSIONbelongs to terret-core.
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 · 152 lines · 2,643 tokens per session scan A 7b0e1e6f0331
terret CLAUDE.md is an instructions file published in the GitHub repository terret-org/terret (25 stars, last pushed 15d ago), licensed MIT. It adds 2,643 tokens to every session, about $0.0132 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
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).