learn-opencode-agent: Instructions file for Claude Code

CLAUDE.md

learn-opencode-agent CLAUDE.md is an instructions file for Claude Code from qqzhangyanhua/learn-opencode-agent. It costs 3,324 tokens per session, scanned A, original, MIT.

Project instructions for maintaining a VitePress website, a documentation site generator, about building an electronic book on the OpenCode coding agent.

In plain words
What is it for?
Use them when editing the book’s Markdown content, Vue components, TypeScript practice scripts, diagrams, data files, or build and deployment setup.
Why use it?
They give an AI agent the project’s purpose, file layout, development rules, and checks so it can make consistent changes without searching the whole repository.

Instructions file for Claude Code

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

This is qqzhangyanhua/learn-opencode-agent's own configuration. It tells Claude Code how to work on learn-opencode-agent 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 learn-opencode-agent configures →

Reuse

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.

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

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 learn-opencode-agent CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/qqzhangyanhua/learn-opencode-agent/claude-md/github.svg)](https://agentmods.dev/instructions/qqzhangyanhua/learn-opencode-agent/claude-md)
Your own site
<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.

agentmods 80×15 button for learn-opencode-agent CLAUDE.md

Your own site · 80×15
<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>
Per session 3,324 This file is loaded in full into every session.
When invoked 3,324 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.03324 $0.03324
Opus 5.5 $0.01330 $0.01330
Sonnet 5.5 $0.00665 $0.00665
Haiku 4.5 $0.00332 $0.00332

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

Security

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.

CLAUDE.md · 181 lines

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) 查看

Read the full file on GitHub · 181 lines

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 Changed · +2 lines · +215 tokens per session f90cf82ff183
  2. 2mo ago First seen · 179 lines · 3,109 tokens per session scan A 4be605c53fe1

Subscribe to this mod's changes

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.

Related

learn-opencode-agent CLAUDE.md compared with instructions from other repositories

learn-opencode-agent CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
learn-opencode-agent CLAUDE.mdqqzhangyanhua/learn-opencode-agentInstructions file1871mo agoMITA3,324Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode