Borrowing it
Nothing to install: this file belongs to dredozubov/hazmat. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/dredozubov/hazmat/master/CLAUDE.mdgit clone --depth 1 https://github.com/dredozubov/hazmatWrote 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/dredozubov/hazmat/claude-md)<a href="https://agentmods.dev/instructions/dredozubov/hazmat/claude-md"><img src="https://agentmods.dev/badge/instructions/dredozubov/hazmat/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.02897 | $0.02897 |
| Opus 5 | $0.01448 | $0.01448 |
| Sonnet 5 | $0.00579 | $0.00579 |
| Haiku 4.5 | $0.00290 | $0.00290 |
Grade B, and why
hazmat CLAUDE.md scanned grade B with 1 finding 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 8d 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.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
- **Hazmat-owned agent maintenance stays on the narrow sudoers rule.** Session launches and helper-routed maintenance use the NOPASSWD rule for `hazmat-launch`. Generic manual `sudo -u agent` flows are a separate, broade How it starts
The opening of the file, as written. The whole thing — 212 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md — Hazmat
What this is
Hazmat is a macOS CLI tool that runs AI agents (Claude Code, etc.) inside containment: dedicated system user, seatbelt sandboxing, pf firewall, DNS blocklist, and automatic snapshots. Written in Go, single binary + cgo helper.
Before you change anything
Read tla/VERIFIED.md first. tla/VERIFIED.md is the authoritative record of Hazmat's formal verification scope and proof boundaries. Changes in verified areas MUST update the TLA+ spec and pass TLC before the Go implementation changes. This is not optional.
| Spec | What it governs | Key invariant |
|---|---|---|
MC_SetupRollback |
Init step ordering, rollback ordering | AgentContained — sudoers never without firewall |
MC_SeatbeltPolicy |
Seatbelt policy structure, credential denies | CredentialReadDenied — credential dirs always denied |
MC_BackupSafety |
Snapshot/restore lifecycle | RestoreReversible — every overwrite has a prior snapshot |
MC_Migration |
Version upgrades, rollback from any state | AgentContained through migration and rollback states |
MC_Tier3LaunchContainment |
Tier 3 host-side launch boundary | CredentialPathsNeverMounted — Tier 3 never mounts credential zones |
MC_TierPolicyEquivalence |
Tier 2 vs Tier 3 core policy contract | CanonicalCoreContainmentEquivalent — canonical core containment matches across both backends |
MC_SessionPermissionRepairs |
Session-time host permission repair planning and rollback persistence | RollbackPreservesSessionRepairs — core rollback never reverts an applied session repair |
MC_HarnessLifecycle |
Built-in harness state recording and rollback cleanup | RollbackClearsMetadata — rollback removes the host-owned harness metadata record |
MC_LaunchFDIsolation |
Native helper fd-table hygiene before sandbox_init() |
AgentFDTableAllowlisted — final agent exec sees stdio only |
MC_GitSSHRouting |
Multi-key per-project Git-SSH routing | DeterministicRouting — every host maps to at most one key in a ready config |
MC_GitHookApproval |
Repo-local Git hook approval, pinning, and drift refusal | ApprovedContentOnly — approved hook execution uses the immutable approved snapshot |
MC_SecretStoreRecovery |
File-backed harness auth crash recovery | LatestValueNeverSilentlyLost — recovery never drops the newest host-owned secret value |
MC_CredentialCapabilityLifecycle |
Registry-level credential delivery and cleanup | DeliveryMatchesRegistry — delivery mode follows the registered credential capability |
MC_LinuxNativeLaunch |
Future Linux native helper launch ordering | ExecAfterMetadata — exec happens only after enforcement and metadata emission |
MC_BeadpostBrokerBoundary |
Beadpost broker attestation membrane | NoAuthorityFromAgent — authority is derived host-side, never accepted from the contained agent |
MC_AppleContainerLaunch |
Apple Container backend launch boundary | CredentialPathsNeverMounted — credential deny zones and their parents are never in the mount plan |
MC_ServiceHarnessLifecycle |
OpenHands-style service harness lifecycle | AttachOnlyAfterReady — service attach waits for readiness evidence |
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.
- 8d ago First seen · 212 lines · 2,897 tokens per session scan B 87a52a889a4c
hazmat CLAUDE.md is an instructions file published in the GitHub repository dredozubov/hazmat (172 stars, last pushed 6d ago), licensed MIT. It adds 2,897 tokens to every session, about $0.0145 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). 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).
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).
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.