harness-engineering-from-cc-to-ai-coding: Instructions file for Claude Code

CLAUDE.md

harness-engineering-from-cc-to-ai-coding CLAUDE.md is an instructions file for Claude Code from ZhangHanDong/harness-engineering-from-cc-to-ai-coding. It costs 1,780 tokens per session, scanned A, original, MIT.

An instruction file for writing and building a technical book about how to engineer systems around AI coding agents. It describes the book’s chapters, source materials, specifications, and preview process.

In plain words
What is it for?
Use it when drafting or revising chapters, checking the book outline, following the writing plan, or building and previewing the mdBook project.
Why use it?
It keeps chapter work aligned with the project’s planned structure and rules. It tells the agent which specification to read before editing a chapter and where the book files belong.

Instructions file for Claude Code

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

This is ZhangHanDong/harness-engineering-from-cc-to-ai-coding's own configuration. It tells Claude Code how to work on harness-engineering-from-cc-to-ai-coding 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 harness-engineering-from-cc-to-ai-coding configures →

About the project

Harness Engineering From Claude Code to AI Coding is a Chinese technical book that studies how AI coding agents are engineered, using analysis of Claude Code's released source material. It is intended for engineers and researchers building coding agents, agent frameworks, and model-tool platforms.

ZhangHanDong/harness-engineering-from-cc-to-ai-coding · 1,500 stars · on GitHub · zhanghandong.github.io

Reuse

Borrowing it

Nothing to install: this file belongs to ZhangHanDong/harness-engineering-from-cc-to-ai-coding. 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/ZhangHanDong/harness-engineering-from-cc-to-ai-coding/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/ZhangHanDong/harness-engineering-from-cc-to-ai-coding

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 harness-engineering-from-cc-to-ai-coding CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/zhanghandong/harness-engineering-from-cc-to-ai-coding/claude-md/github.svg)](https://agentmods.dev/instructions/zhanghandong/harness-engineering-from-cc-to-ai-coding/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/zhanghandong/harness-engineering-from-cc-to-ai-coding/claude-md"><img src="https://agentmods.dev/badge/instructions/zhanghandong/harness-engineering-from-cc-to-ai-coding/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 harness-engineering-from-cc-to-ai-coding CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/zhanghandong/harness-engineering-from-cc-to-ai-coding/claude-md"><img src="https://agentmods.dev/badge/instructions/zhanghandong/harness-engineering-from-cc-to-ai-coding/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,780 This file is loaded in full into every session.
When invoked 1,780 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.01780 $0.01780
Opus 5 $0.00890 $0.00890
Sonnet 5 $0.00356 $0.00356
Haiku 4.5 $0.00178 $0.00178

Measured 13d ago against content hash b34824785f82, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

harness-engineering-from-cc-to-ai-coding 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 13d 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 · 168 lines

How it starts

The opening of the file, as written. The whole thing — 168 lines — stays where its author put it; the contents beside it link to each section on GitHub.

驾驭工程 — Claude Code 源码分析书籍项目

本项目基于 Claude Code v2.1.88 的逆向工程源码,编写一本关于 AI Agent 驾驭工程(Harness Engineering)的技术书籍(29 章 + 4 附录)。

Specs & Plan

任务契约和实施计划在 specs/ 目录:

  • specs/project.spec.md — 项目级约束、决策、边界(被所有任务继承)
  • specs/part1-architecture.spec.md — 第一篇:架构(ch01-ch04)
  • specs/part2-prompt-engineering.spec.md — 第二篇:提示工程(ch05-ch08)
  • specs/part3-context-management.spec.md — 第三篇:上下文管理(ch09-ch12)
  • specs/part4-prompt-cache.spec.md — 第四篇:提示词缓存(ch13-ch15)
  • specs/part5-safety-permissions.spec.md — 第五篇:安全与权限(ch16-ch19)
  • specs/part6-advanced-subsystems.spec.md — 第六篇:高级子系统(ch20-ch24)
  • specs/part7-lessons.spec.md — 第七篇:经验教训(ch25-ch29 + 附录)
  • specs/writing-plan.md — 写作执行计划,含依赖图和批次安排

编写任何章节前,先读对应的 spec 文件。大纲在 docs/book-outline.md

项目结构

restored-src/src/    # Claude Code v2.1.88 还原的 TypeScript 源码(只读,不修改)
book/                # mdbook 书籍项目
  book.toml          # mdbook 配置
  src/
    SUMMARY.md       # 目录结构(mdbook 必需)
    preface.md       # 前言
    part1/ch01-04.md # 第一篇:架构
    part2/ch05-08.md # 第二篇:提示工程
    part3/ch09-12.md # 第三篇:上下文管理
    part4/ch13-15.md # 第四篇:提示词缓存
    part5/ch16-19.md # 第五篇:安全与权限
    part6/ch20-24.md # 第六篇:高级子系统
    part7/ch25-29.md # 第七篇:经验教训
    appendix/        # 附录 A-D
docs/
  book-outline.md    # 书籍大纲(28 章 + 4 附录)
specs/               # agent-spec 任务契约

构建和预览

cd book && mdbook build    # 构建 HTML 到 book/book/
cd book && mdbook serve    # 本地预览 http://localhost:3000

章节文件写在 book/src/partN/chNN.md,mdbook 通过 SUMMARY.md 自动组织目录。

必须使用的 Skills

编写本书时,AI agent 必须加载以下 skill:

写作 Skill(最重要)

Skill 何时加载
tech-writer 编写任何章节前必须加载。 遵循三阶段流程:Research → Write(含预算声明)→ Review(3-agent 并行审阅)

Spec 管理 Skills

Skill 何时加载
agent-spec-authoring 编辑 .spec.md 文件时
agent-spec-tool-first 根据 spec 验收标准验证章节完成度时

章节写作流程

编写一章的标准流程:

  1. 读 Spec — 先读 specs/ 下对应的 spec 文件,确认验收标准和边界
  2. 读 Outline — 读 docs/book-outline.md,确认本章在全书中的位置、与前后章的依赖关系
  3. 加载 tech-writer — 按 tech-writer skill 的 Book Writing Mode 执行 Pre-Flight 检查
  4. 声明预算 — 从 spec 的约束中提取字数和深度层级,向用户确认
  5. Research — 验证所有源码引用,确认 restored-src/ 路径和行号(tech-writer Phase 1)
  6. Write — 按章节结构模板写作(tech-writer Phase 2)
  7. Review — 启动 3-agent 并行审阅(tech-writer Phase 3)
  8. Verify — 用 agent-spec-tool-first 验证 spec 中的验收标准全部通过

Read the full file on GitHub · 168 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. 13d ago First seen · 168 lines · 1,780 tokens per session scan A b34824785f82

Subscribe to this mod's changes

harness-engineering-from-cc-to-ai-coding CLAUDE.md is an instructions file published in the GitHub repository ZhangHanDong/harness-engineering-from-cc-to-ai-coding (1,500 stars, last pushed 5mo ago), licensed MIT. It adds 1,780 tokens to every session, about $0.0089 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.

Related

Other instructions, from other repositories

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.

github/spec-kit · 7,126 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,296 tokens

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.

openai/codex · 5,153 tokens

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 · 6,785 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,469 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, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens