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/aki0225/agenttoolgate/agents-mdgit clone --depth 1 https://github.com/aki0225/AgentToolGateWhat 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.00802 | $0.00802 |
| Opus 5 | $0.00401 | $0.00401 |
| Sonnet 5 | $0.00160 | $0.00160 |
| Haiku 4.5 | $0.00080 | $0.00080 |
Grade A, and why
AgentToolGate 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 2d 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.
What it actually says
AGENTS.md
给在本仓库工作的 AI 编码代理(及新加入的人)的项目约定。
项目一句话
AgentToolGate(ATG)是跑在本地的 AI Agent 工具调用治理网关:REST/MCP 工具调用与本地 Hook 动作分别进入对应治理入口,按需经过 policy、硬护栏、审批和 Secret 解析,并留下脱敏审计。
目录地图
backend/— Go 后端(moduleagenttoolgate/backend),入口cmd/server,核心逻辑在internal/,数据库迁移在migrations/frontend/— React + TypeScript 控制台(Vite),e2e 测试在frontend/e2e/configs/— 默认策略与配置样例deployments/、docker-compose.yml— 本地部署与 PostgreSQL 集成环境scripts/— 发布构建脚本(build-release.ps1/build-local.ps1)docs/— 架构、威胁模型、策略与审批文档
验证命令(改完代码必须跑)
# 后端
cd backend
go test ./...
go vet ./...
# 前端
cd frontend
npm run check
npm run build
# 前端 e2e(改动前端交互或审批流后跑)
npm run e2e
CI(.github/workflows/ci.yml)跑的就是上述集合,外加 PostgreSQL 集成测试。本地绿不等于 CI 绿,提交前至少保证上面的命令全过。
代码约定
- 注释与文档使用简体中文;注释只写代码本身表达不了的约束,不复述代码
- 错误处理不吞错:拒绝、降级、fail-closed 的分支必须有明确原因返回
- 修改功能时删除旧实现,不保留兼容性死代码
红线(违反即错,无需讨论)
.claude/hooks/与.codex/hooks/是产品本体——它们是 ATG 的 Hook Adapter(把宿主工具调用送进网关评估),不是本仓库的开发配置。不要"顺手修复"、迁移或删除它们;改动它们等于改产品功能,需走正常评审。- Secret 相关代码是密钥管理功能,不是泄漏——
internal/中处理 secret 的代码、.env.example中留空的敏感项、测试里的假密钥都是产品设计的一部分,不要当作安全事故"修复"。真正的红线是:任何真实密钥、token、个人信息不得进入代码、配置样例或提交历史。 - 安全语义只许收紧,不许放松——"后端离线时高风险操作保守拒绝""审批授权单次消费、限有效期"这类 fail-closed 行为是产品承诺;任何让"证据不足/服务不可用时默认放行"的改动都是 bug,不是优化。
- 发布脚本改动必须跑 smoke——改
scripts/build-release.ps1后至少在一个平台完整跑一次构建含 smoke 校验,不许只改不验。 - 文档口径与 README 的「防护范围 / 非目标 / 已知限制」三节保持一致:不新增夸大能力的表述,不把"当前没做"写成"设计上不做",反之亦然。
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.
- 2d ago First seen · 50 lines · 802 tokens per session scan A 823c0a010269
AgentToolGate AGENTS.md is an instructions file published in the GitHub repository aki0225/AgentToolGate (2 stars, last pushed 15d ago), licensed MIT. It adds 802 tokens to every session, about $0.0040 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
Guardrails AGENTS.md
AGENTS.md instructions for NVIDIA-NeMo/Guardrails, covering agents.md, agent skills, quick rules, repository map and setup.
Guardrails CLAUDE.md
Claude Code instructions for NVIDIA-NeMo/Guardrails, a project described as: NeMo Guardrails is an open-source toolkit for easily adding programmable guardrails to LLM-based conversational systems.
taintgate AGENTS.md
Instructions for Nikita3005/taintgate, covering taintgate engineering guide, core principle, engineering priorities, python and security.
SENTINEL CLAUDE.md
Claude Code instructions for codeit-ronit/SENTINEL, covering claude.md — sentinel, what this project is, hard rules — violating any of these is a build failure, research before implementing and working style.
pipelock AGENTS.md
Instructions for luckyPipewrench/pipelock, covering agents.md - pipelock contributor guide, quick reference, capability surface, build, test, lint and architecture.
vibeguard AGENTS.md
Instructions for majiayu000/vibeguard, covering agent instructions, scope, start here, core rules and delivery policy.