🌍 English · 简体中文 · 日本語 · all three editions included

Inside Claude CodeA Reverse-Engineering Field Guide to Agent Engineering

12 prompt-design patterns · 7 agent failure modes · the internal mechanics behind the world's leading agentic coding tool, inferred from how it behaves. 60+ pages.

💖 Sponsor $25 to unlock the full book Read 2 chapters free
Sponsor the $25 Inside Claude Code tier → full PDF (EN + 中文 + 日本語) + toolkit, delivered within hours.

Why this exists

Everyone is building agents. Almost no one has taken apart one that actually works. Claude Code runs for hours, edits dozens of files, tests its own work, and ships. Underneath it: a prompt layer built as many small, single-purpose units, a precise request pipeline, a context engine that survives long sessions, and guardrails where most of the instructions describe what the agent must not do. This book reverse-engineers that machine into patterns you can paste into your own agent today.

A taste — the 7 ways autonomous agents fail

Chapter 6 names all seven and gives each a verified fix.

  1. One-shot impulsedoes everything at once, exhausts context, leaves fragments
  2. Premature "done"declares victory with most of the work unfinished
  3. Context anxietyrushes to wrap up near the limit, with capacity to spare
  4. Self-evaluation inflationgrades its own broken work 9/10
  5. Skipping E2Eunit tests pass; the actual button does nothing
  6. Stub-ificationthe UI looks complete; the interactions are hollow
  7. Spec cascadea planner's one wrong detail poisons everything downstream

You've probably met at least three. The fixes are in the book.

What's inside

60+ pages · ~14,000 words · 10 chapters · a copy-paste toolkit.

1The Five-Layer Prompt Architecture — why a great agent's prompt is a filesystem, not a string
2The Prompt Loading Flow — where the cache boundary stops you re-billing the whole static prompt every turn
3–4The Twelve Patterns — constraint-first, cognitive boundaries, delegation, compaction, memory, skillification…
5Print Mode & Autonomous Loops — signals, the auto-compaction threshold, headless loops
6The Seven Agent Failure Modes — each with its root cause and verified fix
7Sub-agents & Layered Delegation — the messaging asymmetry that silently kills multi-agent setups
8The Autonomous Development Pipeline — prompt to verified build
9Designing Your Own Harness — the whole book as five buildable subsystems
10The Checklist & Templates — pre-flight checklist + paste-ready files

The toolkit (ships with the book)

📖 Read free — no email gate

💖 Sponsor $25 to unlock all 10 chapters + toolkit

After you sponsor the $25 Inside Claude Code tier, you get a private-repo invite with the full PDF (English + 中文), the Markdown, and the toolkit — usually within a few hours. 赞助后即可解锁中英双语完整版。

Why trust it

Distilled from careful observation of how Claude Code behaves, inference about the request pipeline that behavior implies, and Anthropic's published guidance on long-running agent harnesses. Independent analysis and commentary — it describes patterns in original words and does not reproduce proprietary source code or prompt text. Not affiliated with Anthropic.

🛠️ Try the free companion — Harness Kit

The book teaches the patterns; Harness Kit runs them. It's a free Claude Code plugin — five executable skills that turn the book's frameworks into commands you invoke: failure-mode-audit (run the 7 failure modes against any plan), claude-md-architect, subagent-brief, context-handoff, and harness-preflight.

Install free: /plugin marketplace add aimasteracc/harness-kit  ·  see it on GitHub →

Use the kit, feel the difference, then get the full reasoning — all 12 patterns and the complete failure-mode treatment — in the book.