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/gaarazhu/gate/claude-mdgit clone --depth 1 https://github.com/GaaraZhu/gateWrote 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/gaarazhu/gate/claude-md)<a href="https://agentmods.dev/instructions/gaarazhu/gate/claude-md"><img src="https://agentmods.dev/badge/instructions/gaarazhu/gate/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 | $0.01400 | $0.01400 |
| Opus 5 | $0.00700 | $0.00700 |
| Sonnet 5 | $0.00280 | $0.00280 |
| Haiku 4.5 | $0.00140 | $0.00140 |
Grade B, and why
gate 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 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
- **`init.rs` writes must be atomic.** Write to a tempfile, then rename. Never write directly to `~/.claude/settings.json`. How it starts
The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.
gate
PII-filtering CLI that transparently intercepts AI agent query commands and redacts sensitive data before it reaches the model context.
Notes
crates/gate/src/run.rs is the production Gate 1 + Gate 2 pipeline. Loads config,
runs gate1::extract_columns + gate1::build_plan on the SQL arg, spawns the subprocess,
pipes stdout through common::redactor::redact. All subcommands fully implemented.
crates/mcp/ is a separate crate that provides the gate mcp subcommand — a stdio
JSON-RPC proxy that forwards traffic between the AI harness and an upstream MCP server.
It intercepts tools/call responses and redacts PII via Gate 2 before returning them.
Repository structure
gate/
Cargo.toml # workspace root
crates/
common/ # config, PII patterns, redactor (Gate 2), error types, harness detection
gate1/ # SQL tokenizer + column extractor (Gate 1)
gate/ # main binary (all subcommands)
mcp/ # stdio MCP proxy: intercepts tools/call responses and redacts PII
Build and test commands
cargo build
cargo test --all
cargo clippy -- -D warnings
cargo fmt --check
Before every commit
Run all checks from the workspace root and fix any failures:
cargo fmt --all
cargo clippy -- -D warnings
cargo test --all
Never commit if any of these fail.
Dependencies (pin these in workspace Cargo.toml)
clap = { version = "4", features = ["derive"] }
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["preserve_order"] }
serde_yaml = "0.9"
regex = "1"
shell-words = "1"
anyhow = "1"
thiserror = "1"
tempfile = "3"
criterion = { version = "0.5", features = ["html_reports"] }
ctrlc = { version = "3", features = ["termination"] }
Gate 1 uses a hand-written SQL tokenizer — do NOT add sqlparser-rs.
Safety checklist (required for any redaction changes)
When modifying redaction logic (common/redactor.rs, gate1/lib.rs, mcp/intercept.rs), run this checklist before committing:
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 · 107 lines · 1,400 tokens per session scan B 0c23a4b16477
gate CLAUDE.md is an instructions file published in the GitHub repository GaaraZhu/gate (216 stars, last pushed 15d ago), licensed MIT. It adds 1,400 tokens to every session, about $0.0070 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
arcjet-js AGENTS.md
Instructions for arcjet/arcjet-js, covering agent guidance, examples live in arcjet/examples and integration work: review before a pr.
helm-ai-kernel AGENTS.md
AGENTS.md instructions for Mindburn-Labs/helm-ai-kernel, covering agent operational guidelines for helm-ai-kernel, developer runbook and governance & rules.
Agent-Security-Regression-Harness AGENTS.md
Instructions for OWASP/Agent-Security-Regression-Harness, covering ai agent guide: owasp agent security regression harness, project overview, architecture, contribution workflow and what needs doing.
ai-appsec AGENTS.md
Instructions for subodhkc/ai-appsec, covering agents.md — haiec agent security mcp (phase -1 → phase 18), 1. workspace layout, 2. architectural principles (apply to every phase), 3. hard constraints (never violate) and 4. phase discipline.
claude-skills CLAUDE.md
Instructions for mastepanoski/claude-skills, covering claude.md, repository purpose, testing skills locally, repository architecture and core structure.
enforra AGENTS.md
Instructions for enforra/enforra, covering agents.md, enforra engineering doctrine, package boundaries, required workflow before pr and diagnostics.