The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
One instruction file across Claude Code, Codex, Copilot, Cursor, Gemini CLI, and more — verified setup, copy-paste templates, rollback-safe migration.
Stop maintaining CLAUDE.md and AGENTS.md as two files that drift apart. This handbook documents which file each of nine tools reads — checked on 2026-06-02 against each tool's official docs — and ranks six ways to keep one instruction file in sync, from an @AGENTS.md import to a symlink to a CI drift check. It is also precise about where official support still is not: issue #6235 was closed as completed, but the official CHANGELOG does not mention AGENTS.md anywhere, and on v2.1.246 AGENTS.md is still not loaded into the model's context the way CLAUDE.md is.
Minimum price
$9.99
$12.99
Buying multiple copies for your team? See below for a discount!
About the Book
This book is part of the Claude Code Operator's Library (4 books). Through September 17, 2026, that bundle is in Leanpub's monthly sale at $14.50 for all four, against $51.96 if bought separately. Coupon link: https://leanpub.com/b/cc-operators-library/c/LeanpubMonthlySale202609010
Stop maintaining CLAUDE.md and AGENTS.md as two files that drift apart. Claude Code reads CLAUDE.md; Codex, Amp, and GitHub Copilot read AGENTS.md natively; Cursor, Windsurf, and Cline read their own files; Aider and Gemini CLI read AGENTS.md only after you configure them. That gap was the most-reacted feature request in Claude Code — issue #6235, 6,516 reactions — and it was closed as completed on 2026-08-17. So is the problem gone? Re-measured on 2026-08-28: the official CHANGELOG runs to 2.1.248 and mentions AGENTS.md zero times (the control word "hook" appears 271 times, so the search works), and on 2.1.246 an AGENTS.md is still not loaded into context the way CLAUDE.md is. New Chapter 9 shows why the usual test says otherwise: put a plain fact in AGENTS.md and ask for it, and the agent runs ls, opens the file and answers correctly — it went looking. Put an instruction there and ask something unrelated, and it makes no tool call at all and the instruction is not in force. Discoverable, not loaded. Chapter 9 also names what did ship behind the closed issue: not a reader, but a Codex config importer that copies AGENTS.md into CLAUDE.md — and on this build it answers "claude import is not yet available in this build". A closed issue is not the same as working in your environment, and this handbook shows you how to tell the difference in your own setup. This handbook removes the duplication tax: a verified 9-tool matrix (which file each tool reads, whether it needs setup, and the one thing to watch, checked against every tool's official docs on 2026-06-02); six sync paths ranked by trade-off (the official @AGENTS.md import, symlink, pre-commit sync, SessionStart hook, direnv, CI drift check); copy-paste templates for all nine tools plus a complete repo layout; a rollback-safe migration runbook to move CLAUDE.md to AGENTS.md without losing Claude-only behavior; and a team drift guard that makes divergence fail loudly. 36 pages, dense and practical, with free updates as conventions change. Read the free sample before you buy. By an independent operator who runs Claude Code unattended and maintains cc-safe-setup — 914 free MIT-licensed hooks. Try the free AGENTS.md Setup Generator and field-guide Gist first; buy this for the full matrix, the runbook, and the templates in one place. This handbook and the three longer ones — Safety Mastery, the Migration Playbook, and the token-cost guide — are also sold together as The Claude Code Operator's Library, from $29, at https://leanpub.com/b/cc-operators-library (bought separately they run $51.96). Independent handbook — not affiliated with Anthropic, OpenAI, GitHub, or Google.
Written by an independent operator who runs Claude Code autonomously and maintains cc-safe-setup, a free MIT-licensed collection of 914 example safety hooks: https://github.com/yurukusa/cc-safe-setup
Team Discounts
Get a team discount on this book!
Up to 3 members
Up to 5 members
Up to 10 members
Up to 15 members
Up to 25 members
Bundles that include this book
About the Author
Everything I publish starts from something that actually broke.
I run Claude Code on real projects, often unattended, and I have lost work to it. Most of what the books catalogue did not happen to me, though. It happened to other people, in public: every incident is tied to a numbered issue you can open and read, including the ones that were closed without a fix. The hooks in cc-safe-setup (MIT, open source) exist because I wanted a floor under an agent nobody was watching, and I would rather show you a stranger's incident with a link than a story of my own without one.
Two things I hold myself to. If a number in one of my books is not something I measured, it says so. And if a command is printed, the output beside it came back from an actual run — failures included, because a check that cannot fail is not a check.
I am not selling certainty. Most of what I know here, I learned by breaking my own setup.
Click the buttons to get the free sample in PDF or EPUB, or read the sample online here
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.
Learn more about writing on Leanpub
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.