coding-agent-safety-gate AGENTS.md

A set of safety instructions for AI coding agents working in a documentation-only repository containing Markdown files.

In plain words
What is it for?
Use it to constrain repository edits, require human approval for rule-breaking actions, protect confidential information, and flag unclear work for human review.
Why use it?
It prevents agents from making unapproved changes, handling real secrets, adding software or automation, or claiming work is complete without evidence.

Instructions file for CodexOpenCode

Install

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.

agentmods
npx agentmods add instructions/aser-ho/coding-agent-safety-gate/agents-md
Clone the repo
git clone --depth 1 https://github.com/ASER-ho/coding-agent-safety-gate

Made for: Codex, OpenCode.

Per session 589 This file is loaded in full into every session.
When invoked 589 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00589 $0.00589
Opus 5 $0.00295 $0.00295
Sonnet 5 $0.00118 $0.00118
Haiku 4.5 $0.00059 $0.00059

Measured 2d ago against content hash 9e6d4336971b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

coding-agent-safety-gate 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.

AGENTS.md · 38 lines

What it actually says

AGENTS / 代理规则

本文件由 AI 编程助手(Claude Code、Codex、Cursor、Gemini CLI 等)进入仓库时读取,定义它们必须遵守的安全约束。

This file is read by AI coding agents (Claude Code, Codex, Cursor, Gemini CLI, and others) when they enter this repository. It defines the safety constraints they must follow.

仓库类型 / Repository type

本仓库是文档优先的。只包含 Markdown 文件:一个 skill 定义、模板、文档和示例。没有运行时代码、没有 package.json、没有依赖、没有自动化。

This repository is documentation-first. It contains only Markdown files: a skill definition, templates, docs, and examples. There is no runtime code, no package.json, no dependencies, and no automation.

AI 代理规则 / Rules for AI coding agents

在本仓库工作时:

  • 规则 #1 — 在违反本文件任何规则之前,必须先停下来,获得用户的明确批准。
  • 优先做小的、仅 Markdown 的改动。
  • 不要新增 CLI、MCP server、VS Code 插件、npm 包、runtime enforcement 工具、secret scanner、GitHub Actions 工作流、release 自动化或任何依赖。
  • 不要读取、打印、推断、请求或存储真实机密(API key、token、cookie、私钥、凭据或 SecretStore 值)。
  • 不要在任何文件中暴露完整的本地机器路径。
  • 未经用户明确批准,不要执行 git pushgit tag、创建 release、添加 remote、force push 或重写历史。
  • 未经用户确认,不要决定下一步任务。
  • 在声称完成工作之前提供证据。
  • 如果任务范围不清晰,停止并标记 NEEDS HUMAN REVIEW

When working in this repository:

  • Rule #1 — stop and get explicit human approval before breaking any rule in this file.
  • Prefer small, Markdown-only changes.
  • Do not add a CLI, MCP server, VS Code plugin, npm package, runtime enforcement tool, secret scanner, GitHub Actions workflow, release automation, or any dependency.
  • Do not read, print, infer, request, or store real secrets (API keys, tokens, cookies, private keys, credentials, or SecretStore values).
  • Do not expose full local machine paths in any file.
  • Do not run git push, git tag, create a release, add a remote, force push, or rewrite history without explicit human approval.
  • Do not decide the next task without human confirmation.
  • Provide evidence before claiming work is complete.
  • If task scope is unclear, stop and mark NEEDS HUMAN REVIEW.
Changes

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.

  1. 2d ago First seen · 38 lines · 589 tokens per session scan A 9e6d4336971b

Subscribe to this mod's changes

coding-agent-safety-gate AGENTS.md is an instructions file published in the GitHub repository ASER-ho/coding-agent-safety-gate (2 stars, last pushed 1mo ago), licensed MIT. It adds 589 tokens to every session, about $0.0029 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.