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/qqzhangyanhua/learn-opencode-agent/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.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.1 | $0.03109 | $0.03109 |
| Opus 5 | $0.01554 | $0.01554 |
| Sonnet 5 | $0.00622 | $0.00622 |
| Haiku 4.5 | $0.00311 | $0.00311 |
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 6d 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 — 179 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.
- 6d 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 (170 stars, last pushed 23d ago), licensed MIT. It adds 3,109 tokens to every session, about $0.0155 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
intent-driven-template AGENTS.md
Instructions for intent-driven-dev/intent-driven-template, a project described as: OpenSpec and OpenCode template for intent-driven development with specs, ADRs, C4 diagrams, Gherkin, TDD, Multi-Model Adversarial Spec Authoring, Glossary for Domain Terms, and reusable engineering workflows. This also makes OpenSpec…
Formic CLAUDE.md
Instructions for rickywo/Formic, covering formic task manager assistant, your capabilities, what you can do, what you cannot do and core behavioral rules.
diffler CLAUDE.md
Instructions for jamestkelly/diffler, a project described as: Generate comprehension quizzes from Git branch diffs for Claude Code, OpenCode, and pull-request workflows.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
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).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.