Borrowing it
Nothing to install: this file belongs to aki0225/AgentToolGate. 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/aki0225/AgentToolGate/main/AGENTS.mdgit clone --depth 1 https://github.com/aki0225/AgentToolGateWrote 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/aki0225/agenttoolgate/agents-md)<a href="https://agentmods.dev/instructions/aki0225/agenttoolgate/agents-md"><img src="https://agentmods.dev/badge/instructions/aki0225/agenttoolgate/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/aki0225/agenttoolgate/agents-md"><img src="https://agentmods.dev/badge/instructions/aki0225/agenttoolgate/agents-md.svg" alt="Reviewed on agentmods" width="80" 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.00802 | $0.00802 |
| Opus 5.5 | $0.00321 | $0.00321 |
| Sonnet 5.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 1mo 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.
- 1mo 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 2mo ago), licensed MIT. It adds 802 tokens to every session, about $0.0032 per session on Opus 5.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
plan-forge dapr.instructions.md
Dapr patterns for .NET — building blocks, component config, sidecar architecture, multi-tenant isolation, workflows, state management, secrets.
plan-forge landing-zone.instructions.md
Azure Landing Zone baselines — identity, network, policy, management, security, tagging, subscription organization.
plan-forge database.instructions.md
Database patterns for .NET — Dapper/EF Core 10, parameterized queries, migration strategy.
plan-forge naming.instructions.md
Azure naming conventions — Microsoft CAF abbreviations, constraints, uniqueness, tagging.
plan-forge caching.instructions.md
Caching patterns for .NET — IDistributedCache, Redis, in-memory, cache-aside, TTL strategies.
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).