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/beyond5959/acp-adapter/agents-mdgit clone --depth 1 https://github.com/beyond5959/acp-adapterWrote 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/beyond5959/acp-adapter/agents-md)<a href="https://agentmods.dev/instructions/beyond5959/acp-adapter/agents-md"><img src="https://agentmods.dev/badge/instructions/beyond5959/acp-adapter/agents-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.01346 | $0.01346 |
| Opus 5 | $0.00673 | $0.00673 |
| Sonnet 5 | $0.00269 | $0.00269 |
| Haiku 4.5 | $0.00135 | $0.00135 |
Grade A, and why
acp-adapter 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
本仓库用于实现 Go 版 ACP 适配器。当前支持两类下游后端:
- Codex:基于 Codex App Server
- Claude:基于 Claude Code CLI 子进程
请在任何改动前先阅读 docs/SPEC.md 与 docs/ACCEPTANCE.md。
官方文档入口:
- ACP(Agent Client Protocol):https://agentclientprotocol.com/
- Codex App Server:https://developers.openai.com/codex/app-server
- Claude Code 约束与仓库内说明:
CLAUDE.md
0. 最高优先级约束(MUST)
- ACP stdio 严格合规
- 适配器通过 stdio newline-delimited JSON-RPC 与 ACP Client 通信。
- stdout 只能输出 ACP 协议 JSON-RPC 消息;任何日志、调试输出必须写入 stderr。
- 每条消息以
\n分隔,消息体不得包含未转义的换行。
- 下游必须按后端走受支持的官方通道(不得解析交互式文本输出)
- Codex 后端:必须以子进程方式启动
codex app-server,通过 stdio JSONL/JSON-RPC 与之通信;不得直接解析 Codex CLI 文本输出。 - Claude 后端:必须通过 Claude Code CLI 子进程的 machine-readable 输出链路(当前实现为
claude -p ... --output-format stream-json)集成;不得抓取/解析交互式 TUI 文本。
- Codex 后端:必须以子进程方式启动
- 版本锁定与协议形态驱动
- Codex 后端:必须提供脚本/Makefile 目标:用
codex app-server generate-json-schema --out internal/codex/schema生成并提交 schema 产物。 - Codex 后端:Go 类型优先通过 schema 生成(或至少进行 runtime 校验),避免手写漂移。
- Claude 后端:涉及 CLI
stream-json事件形态的改动,必须补充或更新测试,防止协议漂移。
- Codex 后端:必须提供脚本/Makefile 目标:用
- 可验证、可回归
- 每个 PR 必须保持
go test ./...通过。 - 新增能力必须新增或更新测试/集成用例,或在
docs/ACCEPTANCE.md中记录验证步骤(必须可执行)。
- 每个 PR 必须保持
1. 工程规范
- Go 版本:Go 1.24+(如需调整,请同步更新 CI)。
- 目录结构需保持清晰分层:
internal/acp、internal/codex、internal/claude、internal/bridge、internal/config、internal/observability、pkg/codexacp、pkg/claudeacp。 - 代码风格:优先显式错误处理;避免“吞错”;对外错误应带上下文(sessionId/threadId/turnId)。
- 并发:每个 session 同时只允许 1 个 active turn;
session/cancel必须快速生效且不泄漏 goroutine。
2. 运行与调试
- 默认日志格式:结构化 JSON 到 stderr(可配置 log level)。
- 提供
--trace-json开关:可选把 ACP 与下游后端(Codex App Server / Claude CLI)的原始 JSON 流(脱敏)落盘用于调试。
3. 当前阶段与实现脉络
- Codex 主线:PR1-PR5 已完成,核心能力基于 Codex App Server。
- Claude 主线:C-R0-C-R5 已完成,核心能力基于 Claude Code CLI 子进程。
- Library Mode:R5 进行中,R6 待完成。
- 任何新增能力或修复,都必须先确认其影响范围是
codex、claude,还是双后端共享链路,并同步检查docs/ACCEPTANCE.md对应条目。
4. 禁止事项(MUST NOT)
- 不得把日志/调试文本写到 stdout。
- 不得引入 LSP 的 Content-Length framing(本项目不是 LSP)。
- 不得在未通过 permission 的情况下执行写盘/命令/网络/有副作用的工具调用(默认策略)。
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.
- 3d ago First seen · 71 lines · 1,346 tokens per session scan A 6466ac11853c
acp-adapter AGENTS.md is an instructions file published in the GitHub repository beyond5959/acp-adapter (18 stars, last pushed 4mo ago), licensed MIT. It adds 1,346 tokens to every session, about $0.0067 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-30.
Other instructions, from other repositories
intelligent-terminal agent-skills.instructions.md
Guidelines for creating high-quality Agent Skills for GitHub Copilot.
intelligent-terminal rust-localization.instructions.md
Instructions for microsoft/intelligent-terminal, covering localization instructions for rust wta (yaml locale files), file structure, file format, the en-us.yml source file and non-translatable token rules.
intelligent-terminal localization.instructions.md
Instructions for microsoft/intelligent-terminal, covering localization instructions for .resw resource files, components with localized resources, locale categories, authoritative locale list (from terminalapp) and adding or updating localized strings.
intelligent-terminal copilot-instructions.md
Copilot instructions for microsoft/intelligent-terminal, covering copilot instructions for windows terminal, build, running, test and code formatting.
intelligent-terminal instructions.instructions.md
Guidelines for creating high-quality custom instruction files for GitHub Copilot.
intelligent-terminal AGENTS.md
AGENTS.md instructions for microsoft/intelligent-terminal, covering intelligent terminal, architecture, supported agents and settings, user-facing behavior and key files.