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/claude-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/claude-md)<a href="https://agentmods.dev/instructions/beyond5959/acp-adapter/claude-md"><img src="https://agentmods.dev/badge/instructions/beyond5959/acp-adapter/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.01226 | $0.01226 |
| Opus 5 | $0.00613 | $0.00613 |
| Sonnet 5 | $0.00245 | $0.00245 |
| Haiku 4.5 | $0.00123 | $0.00123 |
Grade A, and why
acp-adapter CLAUDE.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 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.
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 — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
本文件是 Claude Code 在此仓库工作的行为规范。所有约束优先于默认行为。
0. 最高优先级约束(MUST)
-
stdout 严格纯净
- 适配器 stdout 只能输出 ACP JSON-RPC 消息。任何日志/调试输出必须写 stderr。
- 不得在任何代码路径中把非 ACP 消息写入 stdout。
-
下游必须走 Codex App Server
- 不得直接解析
codexCLI 文本输出。必须通过子进程codex app-server(stdio JSONL)通信。
- 不得直接解析
-
Schema 驱动
internal/codex/schema/由make schema生成,不得手写并提交。- 每次改动涉及 App Server 协议字段时,必须重新运行
make schema。
-
安全 fail-closed
- 未通过
session/request_permission的情况下,禁止执行:写盘、命令执行、网络访问、MCP 副作用工具。
- 未通过
-
并发约束
- 每个 session 同时最多 1 个 active turn。
session/cancel必须快速生效且不泄漏 goroutine。
-
测试门槛
- 每次代码改动后必须确保
go test ./...通过,不得跳过。
- 每次代码改动后必须确保
1. 开工前必读
在开始任何实现或修改前,必须先阅读以下文件(以这些文件为准,不依赖上下文记忆):
PROGRESS.md:当前进度、已完成/未完成验收条目、下一步计划docs/DECISIONS.md:关键技术决策与取舍(为什么这么做)docs/KNOWN_ISSUES.md:已知问题/坑位/规避方式docs/SPEC.md:完整技术方案(权威来源)docs/ACCEPTANCE.md:逐条验收清单
2. 收尾时必更
完成一个功能块后,必须更新:
PROGRESS.md:勾选已完成的验收条目,记录下一步docs/DECISIONS.md:记录新增/改变的关键决策(ADR 格式,含替代方案与理由)docs/KNOWN_ISSUES.md:记录新发现的坑、限制、复现/规避步骤
3. 工程规范
- Go 版本:Go 1.24+
- Module 路径:
github.com/beyond5959/acp-adapter(所有内部导入必须用此前缀) - 目录分层:
internal/acp、internal/codex、internal/bridge、internal/config、internal/observability,不得随意新增顶层目录 - 错误处理:优先显式处理;不得吞错;对外错误必须带上下文(sessionId/threadId/turnId)
- 日志:结构化 JSON 写 stderr;不得用
fmt.Println等打到 stdout
4. 禁止事项(MUST NOT)
- 不得把任何日志/调试文本写到 stdout
- 不得引入 LSP 的 Content-Length framing
- 不得在未通过 permission 的情况下执行写盘/命令/网络/副作用工具
- 不得修改
go.mod的 module 路径 - 不得绕过
go test ./...(除非用户明确要求)
5. 运行与调试
# 常规测试
go test ./...
# 真实 app-server e2e(需本机有 codex 及认证)
E2E_REAL_CODEX=1 go test ./... -run TestE2EReal -count=1
# 压力回归(100 turns)
make stress-j1
# Schema 生成与校验
make schema
# 构建二进制
go build -o ./bin/acp ./cmd/acp
6. 关键架构速查
ACP Client (Zed/etc)
↕ ACP stdio newline-delimited JSON-RPC
acp (--adapter codex|claude) ← cmd/ 入口委托 pkg/codexacp / pkg/claudeacp
↕ App Server stdio JSONL JSON-RPC
codex app-server (子进程)
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 · 102 lines · 1,226 tokens per session scan A da1de9f71e2c
acp-adapter CLAUDE.md is an instructions file published in the GitHub repository beyond5959/acp-adapter (18 stars, last pushed 4mo ago), licensed MIT. It adds 1,226 tokens to every session, about $0.0061 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.