Borrowing it
Nothing to install: this file belongs to cocode-agency/cocode. 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/cocode-agency/cocode/main/AGENTS.mdgit clone --depth 1 https://github.com/cocode-agency/cocodeWrote 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/cocode-agency/cocode/agents-md)<a href="https://agentmods.dev/instructions/cocode-agency/cocode/agents-md"><img src="https://agentmods.dev/badge/instructions/cocode-agency/cocode/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/cocode-agency/cocode/agents-md"><img src="https://agentmods.dev/badge/instructions/cocode-agency/cocode/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.01500 | $0.01500 |
| Opus 5.5 | $0.00600 | $0.00600 |
| Sonnet 5.5 | $0.00300 | $0.00300 |
| Haiku 4.5 | $0.00150 | $0.00150 |
Grade A, and why
cocode 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 2mo 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 — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Cocode 产品由三个 同级目录 组成:桌面/Web GUI、终端 TUI、Agent 运行时(harness)。本文件在 git 仓库根目录,覆盖整个工作区;各子目录有独立 pnpm workspace 与依赖。
仓库布局
./
AGENTS.md ← 本文件
cocode-gui/ 桌面 / Web GUI(含 .dev/guide、.dev/rfc)
cocode-tui/ 终端 TUI(含 .dev/rfc)
cocode-host-supervisor/ DSH Host 生命周期与 runtime staging
不要在 GUI/TUI 目录中修改 DSH agent loop;Host 生命周期与 runtime staging 统一在 cocode-host-supervisor/ 维护。
仓库边界
| 目录 | 职责 | 连 harness 的方式 |
|---|---|---|
| cocode-gui/ | 品牌 UI、设计系统、Host 客户端 | HTTP POST + 双 WebSocket → dsh web |
| cocode-tui/ | 终端 UI、JSON-RPC 客户端 | stdio NDJSON-RPC → jsonrpc-agent 子进程 |
| cocode-host-supervisor/ | DSH Host 生命周期、runtime staging、Cocode Host 插件 | — |
跨目录需求:上游 DSH 负责通用运行时能力,Cocode Host Supervisor 负责 Host 组合与 staging,GUI/TUI 侧消费 wire API;Cocode 产品行为统一落在 GUI 的插件包或 Host 插件中。
cocode-gui/
cocode-gui/
.dev/
guide/ 设计系统(design-system.html 为视觉权威)
rfc/ GUI 相关 RFC(pending/、implemented/)
src/main.ts
packages/
connection/ Host 传输(@cocode/gui-connection)
ui/ 设计令牌与 UI 基元(@cocode/ui)
分层:传输 → app 内 runtime/(会话状态,零 React)→ 呈现(React/Electron + packages/ui)。
.dev/ 下除 guide/、rfc/ 外的本地 scratch 不入库;RFC 写在 cocode-gui/.dev/rfc/,不要堆在仓库根。
cd cocode-gui
pnpm install
pnpm run dev # Electron desktop client (default)
pnpm run dev:web # browser-only, e.g. design-system.html
pnpm run typecheck
联调:cd ../cocode-host-supervisor && pnpm dsh web(默认 http://127.0.0.1:3080)。
Host 参考:cocode-host-supervisor/packages/host-supervisor/。
cocode-tui/
cocode-tui/
.dev/
rfc/ TUI 相关 RFC(pending/、implemented/)
src/main.ts
packages/
connection/ JSON-RPC 传输(@cocode/tui-connection)
TUI 通过 @deepseek-ai/dsh-sdk-client 封装 spawn + session.event 流;技能/slash 走 session.prompt 文本路径。RFC 写在 cocode-tui/.dev/rfc/。
cd cocode-tui
pnpm install
pnpm run dev
pnpm run typecheck
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.
- 2mo ago Changed · +4 lines · +37 tokens per session f40f7d1d0999
- 2mo ago First seen · 120 lines · 1,463 tokens per session scan A f66af62a639d
cocode AGENTS.md is an instructions file published in the GitHub repository cocode-agency/cocode (167 stars, last pushed 2mo ago), licensed MIT. It adds 1,500 tokens to every session, about $0.0060 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-30.
cocode AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cocode AGENTS.mdcocode-agency/cocode | Instructions file | 167 | 2mo ago | MIT | A | 1,500 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,516 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| vscode model-prompts.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 2,022 | GitHub Copilot |