opencode-simple: Instructions file for Claude Code

CLAUDE.md

opencode-simple CLAUDE.md is an instructions file for Claude Code from zhmxiaowo/opencode-simple. It costs 881 tokens per session, scanned A, original, MIT.

A set of project rules for OpenCode Simple, a programming framework that requires written specifications before code and uses successful compilation and language-server checks as completion signals. CDD means compilation-driven development; a language server analyzes code for errors and related problems.

In plain words
What is it for?
It guides planning with specifications, fixing build errors, checking code, and following the project’s agent, skill, command, hook, and tool structure.
Why use it?
It gives coding work a fixed order and verification standard. It also records which tools handle web research, documentation lookup, code diagnostics, memory, and step-by-step reasoning.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

This is zhmxiaowo/opencode-simple's own configuration. It tells Claude Code how to work on opencode-simple itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything opencode-simple configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/zhmxiaowo/opencode-simple/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/zhmxiaowo/opencode-simple

Made for: Claude Code.

Wrote 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.

agentmods badge for opencode-simple CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/zhmxiaowo/opencode-simple/claude-md/github.svg)](https://agentmods.dev/instructions/zhmxiaowo/opencode-simple/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/zhmxiaowo/opencode-simple/claude-md"><img src="https://agentmods.dev/badge/instructions/zhmxiaowo/opencode-simple/claude-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.

agentmods 80×15 button for opencode-simple CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/zhmxiaowo/opencode-simple/claude-md"><img src="https://agentmods.dev/badge/instructions/zhmxiaowo/opencode-simple/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 881 This file is loaded in full into every session.
When invoked 881 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00881 $0.00881
Opus 5.5 $0.00352 $0.00352
Sonnet 5.5 $0.00176 $0.00176
Haiku 4.5 $0.00088 $0.00088

Measured 1mo ago against content hash 432c1a908df1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

opencode-simple 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 1mo 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.

CLAUDE.md · 70 lines

What it actually says

CLAUDE.md — OpenCode Simple (CDD & Spec-First)

本文件为 Claude Code AI 编程助手提供项目指导。(OpenCode 使用 AGENTS.md)

项目概述

这是一个基于 ECC (Everything Claude Code) 架构的纯粹 CDD(编译驱动开发)& Spec-First 通用编程框架。

核心哲学:

  • 🚫 绝对禁止 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 核心、编码风格、安全)
  • hooks/ — 异步 Hooks(会话持久化、上下文防腐烂、持续学习观测)
  • scripts/ — 跨平台 Node.js 工具脚本(hooks 和 setup 用)
  • mcp-configs/ — MCP 配置参考文件

核心 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 修复编译错误
/verify CDD 验证(编译+LSP+AI slop 检查,无测试)
/code-review 代码审查(无测试覆盖率要求)
/handoff 结构化会话交接(CDD 状态、SPEC 进度、决策记录)
/learn 从会话中提取可复用模式
/evolve 将 instincts 进化为 skills/commands

工作流

意图分类 → /plan [功能] → SPEC + 步骤 → 用户确认 → 编码 → /build-fix → /verify → /code-review → /handoff

保留的 ECC 神级机制

  1. V2 本能学习 (Continuous Learning) — 自动从会话中提取编译错误模式
  2. 异步 Hooks — 防止上下文腐烂,自动保存会话状态
  3. Memory MCP — 跨会话记忆,记录项目上下文
  4. Sequential Thinking — 编译错误时的强制链式推理

禁止事项

  • ❌ 不要编写任何测试文件
  • ❌ 不要引用 Jest/Vitest/pytest 等测试框架
  • ❌ 不要以"缺少测试"为由阻塞代码审查
  • ❌ 不要在没有 SPEC.md 的情况下开始编码
  • ❌ 不要在编译错误时盲目试错(必须先 think)
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. 1mo ago First seen · 70 lines · 881 tokens per session scan A 432c1a908df1

Subscribe to this mod's changes

opencode-simple CLAUDE.md is an instructions file published in the GitHub repository zhmxiaowo/opencode-simple (2 stars, last pushed 7mo ago), licensed MIT. It adds 881 tokens to every session, about $0.0035 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.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,649 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,257 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,159 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens