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/google/sam/agents-mdgit clone --depth 1 https://github.com/google/samWhat 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.01044 | $0.01044 |
| Opus 5 | $0.00522 | $0.00522 |
| Sonnet 5 | $0.00209 | $0.00209 |
| Haiku 4.5 | $0.00104 | $0.00104 |
Grade A, and why
sam 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 yesterday.
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 — 45 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SAM Repository AI Agent Guidelines
You are an expert software engineering assistant helping to develop, maintain, and test the SAM repository.
1. Architecture & Component Independence
- Decoupled Architecture: The
sam-control-plane,sam-routerandsam-nodecomponents are strictly independent. They must not share internal state or tightly couple their logic. - API Communication: All data communication between
sam-control-plane,sam-routerandsam-nodemust happen exclusively via the common API defined inapi/sam.proto. - Sandbox Dataplane:
sam-box(one per sandbox) is the single egress policy enforcement point. It holds no libp2p host, no enrollment and no mesh identity, and reaches the mesh exclusively as a client of the localsam-nodesidecar socket.nano-init(PID 1 inside the guest, its own Go module) owns the guest side. The sandbox boundary is a Unix socket: SOCKS5 out,CONNECT <port>back in. The authoritative design issite/content/docs/agent-architecture.md; do not contradict it. - Enforcement over Convention: never gate sandbox traffic on the agent's cooperation — no proxy environment variables, no
LD_PRELOADshims, no DNS spoofing. The agent harness stays unmodified and mesh-unaware; confinement is a route and a socket, built by the userspace launcher (nano-init) and judged insam-box. An agent that must cooperate with its own confinement is not confined. - Policy on Names: egress policy, secret injection and routing decisions are made on the destination name, never on an IP. Deny by default.
- Agent Identity: the agent is the principal; the node is only the channel. Agent identity comes from the platform's workload credential, verified at admission — never asserted in-band from inside the sandbox. Platforms integrate solely through the connector interface (
Attach/Detach/Refresh/Statusand the agent bundle), not by reaching into SAM internals. - Zero Trust: Enforce a Zero Trust architecture. Assume no implicit trust between nodes, control planes, routers, or external actors. All data passing through the API must be authenticated, authorized, and validated.
- Simple UX: Maintain a very simple User Experience. Configuration, CLI usage, and error messages must be intuitive, minimal, and explicitly clear.
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.
- yesterday First seen · 45 lines · 1,044 tokens per session scan A eb496331849c
sam AGENTS.md is an instructions file published in the GitHub repository google/sam (796 stars, last pushed 3d ago), licensed Apache-2.0. It adds 1,044 tokens to every session, about $0.0052 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
intelligent-terminal rust.instructions.md
Concise Rust coding conventions for this repository.
Browser4 CLAUDE.md
Instructions for platonai/Browser4, covering browser4 — project context for claude, architecture, key dispatch chain (cli → browser), batch commands and e2e test structure.
crystal CLAUDE.md
Instructions for stravu/crystal, covering crystal - multi-session claude code manager, project overview, references, implementation status: ✅ complete and ✅ implemented features.
agent-ship CLAUDE.md
Instructions for Agent-Ship/agent-ship, covering claude.md, project overview, commands, docker development (recommended) and local development (no docker).
clawock AGENTS.md
Instructions for KCNyu/clawock, covering agents.md - your workspace, every session, kcn 偏好, git hook (one-time setup per clone) and git auto-commit rules.
agents CLAUDE.md
Instructions for eloylp/agents, covering claude.md, project overview, directory structure, config model and build & run.