Borrowing it
Nothing to install: this file belongs to zhmxiaowo/opencode-simple. 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/zhmxiaowo/opencode-simple/main/AGENTS.mdgit clone --depth 1 https://github.com/zhmxiaowo/opencode-simpleWrote 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/zhmxiaowo/opencode-simple/agents-md)<a href="https://agentmods.dev/instructions/zhmxiaowo/opencode-simple/agents-md"><img src="https://agentmods.dev/badge/instructions/zhmxiaowo/opencode-simple/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/zhmxiaowo/opencode-simple/agents-md"><img src="https://agentmods.dev/badge/instructions/zhmxiaowo/opencode-simple/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.01084 | $0.01084 |
| Opus 5.5 | $0.00434 | $0.00434 |
| Sonnet 5.5 | $0.00217 | $0.00217 |
| Haiku 4.5 | $0.00108 | $0.00108 |
Grade A, and why
opencode-simple 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 3mo 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 — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md — OpenCode Simple (CDD & Spec-First)
本文件为 OpenCode AI 编程助手提供项目指导。
项目概述
这是一个基于 ECC (Everything Claude Code) 架构的纯粹 CDD(编译驱动开发)& Spec-First 通用编程框架模板。复制到任何项目根目录后即可使用 OpenCode 进行 CDD 驱动的开发。
核心哲学:
- 🚫 绝对禁止 TDD — 不写任何测试代码
- 📋 Spec 先行 — 无 SPEC.md 不编码
- ⚙️ 编译驱动 — Exit Code 0 + LSP 0 Error = 任务完成
- 🧠 Think Before Fix — 编译错误必须用 sequential-thinking 分析
架构
核心组件
.opencode/agents/— 精简的 Agent 团队(planner, architect, build-error-resolver, code-reviewer 等).opencode/skills/— 通用工作流知识(CDD 验证、蓝图规划、持续学习 V2 等).opencode/commands/— 用户命令(/spec, /plan, /build-fix, /verify, /learn 等)rules/common/— 永远遵守的准则(CDD 核心、编码风格、安全),通过 opencode.jsonc 的 instructions 字段引入hooks/— Claude Code 兼容的异步 Hooks(会话持久化、上下文防腐烂、持续学习观测)scripts/— 跨平台 Node.js 工具脚本
核心 MCP 矩阵(仅 5 个)
| MCP | 用途 |
|---|---|
exa-web-search |
全网搜索代码和报错 |
context7 |
查阅最新官方文档防幻觉 |
mcp-language-server |
本地 LSP 诊断(CDD 核心) |
memory |
跨会话记忆 |
sequential-thinking |
编译错误链式推理 |
关键命令
| 命令 | 说明 |
|---|---|
/plan |
Spec-First + 实施计划: MCP 研究 → SPEC → 步骤分解(编码前必须执行) |
/spec |
/plan 的轻量版,只输出 SPEC 不输出步骤 |
/build-fix |
CDD 修复编译错误 |
/cdd |
快速 CDD 编译验证 |
/verify |
CDD 全面验证(编译+LSP+AI slop 检查,无测试) |
/code-review |
代码审查(无测试覆盖率要求) |
/handoff |
结构化会话交接(CDD 状态、SPEC 进度、决策记录) |
/learn |
从会话中提取可复用模式 |
/evolve |
将 instincts 进化为 skills/commands |
工作流
意图分类 → /plan [功能] → SPEC + 步骤 → 用户确认 → 编码 → /build-fix → /verify → /code-review → /handoff
保留的 ECC 核心机制
- V2 本能学习 (Continuous Learning) — 自动从会话中提取编译错误模式
- Memory MCP — 跨会话记忆,记录项目上下文
- Sequential Thinking — 编译错误时的强制链式推理
禁止事项
- ❌ 不要编写任何测试文件
- ❌ 不要引用 Jest/Vitest/pytest 等测试框架
- ❌ 不要以"缺少测试"为由阻塞代码审查
- ❌ 不要在没有 SPEC.md 的情况下开始编码
- ❌ 不要在编译错误时盲目试错(必须先 think)
外部规则引用
CRITICAL: 当你遇到文件引用(如 @rules/common/cdd-core.md),按需使用 Read 工具加载它。这些规则文件与当前任务相关。
核心规则文件:
- CDD 核心准则: @rules/common/cdd-core.md
- 编码风格: @rules/common/coding-style.md
- 开发工作流: @rules/common/development-workflow.md
- Agent 编排: @rules/common/agents.md
- 通用模式: @rules/common/patterns.md
- 安全准则: @rules/common/security.md
- Git 工作流: @rules/common/git-workflow.md
- 性能优化: @rules/common/performance.md
- Hooks 使用: @rules/common/hooks.md
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.
- 3mo ago First seen · 87 lines · 1,084 tokens per session scan A 11e28ae453ec
opencode-simple AGENTS.md is an instructions file published in the GitHub repository zhmxiaowo/opencode-simple (2 stars, last pushed 8mo ago), licensed MIT. It adds 1,084 tokens to every session, about $0.0043 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.
opencode-simple AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| opencode-simple AGENTS.mdzhmxiaowo/opencode-simple | Instructions file | 2 | 8mo ago | MIT | A | 1,084 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 9,887 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 144k | today | MIT | A | 7,230 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 5,685 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 150k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 3,303 | GitHub Copilot |
| deno copilot-instructions.mddenoland/deno | Instructions file | 109k | today | MIT | A | 3,077 | GitHub Copilot |