Borrowing it
Nothing to install: this file belongs to qqzhangyanhua/learn-opencode-agent. 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/qqzhangyanhua/learn-opencode-agent/main/CLAUDE.mdgit clone --depth 1 https://github.com/qqzhangyanhua/learn-opencode-agentWrote 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/qqzhangyanhua/learn-opencode-agent/claude-md)<a href="https://agentmods.dev/instructions/qqzhangyanhua/learn-opencode-agent/claude-md"><img src="https://agentmods.dev/badge/instructions/qqzhangyanhua/learn-opencode-agent/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.
<a href="https://agentmods.dev/instructions/qqzhangyanhua/learn-opencode-agent/claude-md"><img src="https://agentmods.dev/badge/instructions/qqzhangyanhua/learn-opencode-agent/claude-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.03324 | $0.03324 |
| Opus 5.5 | $0.01330 | $0.01330 |
| Sonnet 5.5 | $0.00665 | $0.00665 |
| Haiku 4.5 | $0.00332 | $0.00332 |
Grade A, and why
learn-opencode-agent 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.
How it starts
The opening of the file, as written. The whole thing — 181 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
本文件保留 AI 维护本 VitePress 电子书站点时必须知道的规则与全局架构索引。组件清单、目录快照与逐条历史以代码和 scripts/check-*.mjs 为准,不在此处长期维护。
项目定位
- 项目是 VitePress 电子书站点:从零构建 AI Coding Agent — OpenCode 源码剖析与实战。
- 工作目录是
docs/book/。 - 内容源目录是
docs/,主题与组件在.vitepress/theme/。 - 包管理器优先使用
bun(部署兼容pnpm,不使用npm)。
架构总览
- 站点框架:VitePress 1.5 + Vue 3 SFC;图表用 Mermaid(
vitepress-plugin-mermaid+withMermaid)。 - 语言:TypeScript(配置/组件/数据层)、Markdown(内容)、JavaScript ESM(校验脚本)。
- 实践脚本运行时:Bun(
practice/*.ts,依赖openai、@modelcontextprotocol/sdk)。 - 部署:Caddy 静态服务(
railpack.toml+Caddyfile),构建产物在.vitepress/dist。 - 核心模式:数据驱动渲染——内容元数据、实践项目、学习路径、动画实验集中在
.vitepress/theme/data/,组件只渲染;演示组件的可测试编排逻辑下沉到同名*Scenario.ts并配*.test.ts;内容一致性由scripts/check-*.mjs在build:strict中串联守护。
模块结构图
graph TD
A["(根) docs/book 电子书站点"] --> B[".vitepress/config.mts 导航/侧边栏/OG/搜索"];
A --> C[".vitepress/theme"];
C --> C1["index.ts 全局组件注册"];
C --> D["components 渲染与演示组件"];
C --> E["data 数据层"];
D --> D1["animation-lab 实验渲染"];
E --> E1["animation-lab/* 18 个实验数据"];
E --> E2["practice-motion 实践↔动画映射"];
A --> F["docs 内容(理论/实践/中级/专栏/面试题/辅助)"];
A --> G["practice 可运行 TS 脚本 P1-P28"];
A --> H["scripts 内容校验脚本"];
click D "./.vitepress/theme/components/CLAUDE.md" "查看组件模块文档"
click E "./.vitepress/theme/data/CLAUDE.md" "查看数据层模块文档"
click H "./scripts/CLAUDE.md" "查看校验脚本模块文档"
模块索引
| 模块路径 | 职责 | 语言 | 文档 |
|---|---|---|---|
.vitepress/config.mts |
站点配置、导航、侧边栏、OG meta、搜索预处理、内联 frontmatter 解析 | TS | - |
.vitepress/theme |
主题入口、全局组件注册(同步 19 + 异步 67 + 额外 2)、custom.css |
TS + Vue | - |
.vitepress/theme/components |
约 95 个渲染/演示组件 + 场景逻辑 *Scenario.ts + 单测 |
TS + Vue | 查看 |
.vitepress/theme/data |
数据层:内容元数据、实践项目、学习路径、动画实验(18 个)、发现中心 | TS | 查看 |
docs/ |
理论篇/实践篇/中级篇/专栏/面试题/辅助页等全部内容 | Markdown | - |
practice/ |
P1-P28 可运行 TypeScript 实践脚本 | TS | 查看 |
scripts/ |
13 个内容/导航/实践/动画校验脚本(build:strict 串联) |
JS (ESM) | 查看 |
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.
- 1mo ago Changed · +2 lines · +215 tokens per session f90cf82ff183
- 2mo ago First seen · 179 lines · 3,109 tokens per session scan A 4be605c53fe1
learn-opencode-agent CLAUDE.md is an instructions file published in the GitHub repository qqzhangyanhua/learn-opencode-agent (187 stars, last pushed 1mo ago), licensed MIT. It adds 3,324 tokens to every session, about $0.0133 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.
learn-opencode-agent CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| learn-opencode-agent CLAUDE.mdqqzhangyanhua/learn-opencode-agent | Instructions file | 187 | 1mo ago | MIT | A | 3,324 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |