- How to use this book
- Day 0: Why sleep-driven development
- Day 1: The agentic loop
- Day 2: Context is a budget
- Day 3: CLAUDE.md and memory
- Day 4: Plan mode (coming soon)
- Day 5: Tests are the leash (coming soon)
- Day 6: Git, checkpoints and worktrees (coming soon)
- Day 7: Permissions and settings (coming soon)
- Day 8: Custom slash commands (coming soon)
- Day 9: Skills (coming soon)
- Day 10: Subagents (coming soon)
- Day 11: Agents in parallel (coming soon)
- Day 12: MCP (coming soon)
- Day 13: Hooks (coming soon)
- Day 14: Models, cost and ergonomics (coming soon)
- Day 15: Headless mode (coming soon)
- Day 16: CI and automated review (coming soon)
- Day 17: Cloud sessions and scheduled routines (coming soon)
- Day 18: Prompt injection (coming soon)
- Day 19: Secrets, sandbox and network (coming soon)
- Day 20: Plugins and sharing (coming soon)
- Day 21: Your operating system (coming soon)
- Case study: One night shift, start to finish (coming soon)
- Appendix A: Cheat sheet (coming soon)
- Appendix B: Agent Smells
- Appendix C: Index of rules (coming soon)
- Appendix D: What changed (coming soon)
Sleep-Driven Development
Master Claude Code in 21 Days and let your agent work the night shift, safely
Your coding agent can work while you sleep. This book teaches you to let it, without waking up to a disaster: 21 short days, one real project, and the guardrails that make autonomy safe.
Minimum price
$15.00
$19.00
You pay
Author earns
About
About the Book
Your coding agent can work while you sleep. The question is whether you can sleep while it works.
I run a Claude Code routine that wakes up at 1:47 every night, picks the next task from a plan, implements it, runs the tests and opens a pull request. Some mornings are great. Some mornings teach me something. Those lessons are in this book.
Sleep-Driven Development is a 21-day path from "I've tried Claude Code a few times" to "it works unattended, and I trust it", in any programming language.
WEEK 1, PAIR
The agentic loop, context, CLAUDE.md and memory, plan mode, tests as a leash, git and checkpoints, permissions.
WEEK 2, DELEGATE
Custom commands, skills, subagents, agents in parallel, MCP servers, hooks that enforce rules no prompt can override, and what it all costs.
WEEK 3, AUTOMATE
Headless runs, CI and automated review, scheduled routines, prompt injection, secrets, sandboxes and network rules, plugins for your team, and your own playbook.
WHAT MAKES IT DIFFERENT
- One project that grows every day: Ledger, a small expenses API and CLI that you build in the language you prefer from a one-page spec.
- Safety is not a chapter, it's the thread: every day ends with a "Guardrail of the day".
- A public companion repository with reference implementations and a kit of ready-to-copy CLAUDE.md files, skills, subagents, hooks and routines.
- Every day states the Claude Code version it was verified on, and the book is updated as the product changes. Updates are free for readers.
- A case study: one complete night shift on Ledger, from the issue to the pull request, with the rules, the logs, the costs and what went wrong.
WHO IT'S FOR
Working developers and tech leads, in any language, who want an agent to do real work without babysitting it, and without handing it the keys to everything.
This book is an independent publication and is not affiliated with, sponsored by, or endorsed by Anthropic, PBC. "Claude" and "Claude Code" are trademarks of Anthropic, PBC.
Feedback
Author
About the Author
Hi, I'm Matt. I've been writing .NET since 2016 and work as a senior backend software engineer, mostly on e-commerce platforms and business management systems: the kind of software nobody notices when it works, and everybody notices when it leaks.
I write practical, code-first books for .NET developers who have a pentest report on their desk and a deadline on their calendar. Every vulnerability is reproduced, fixed and locked in with a test.
When I'm not at the keyboard, I'm at a different one: piano, or a guitar.
Contents
Table of Contents
Get the free sample chapters
Click the buttons to get the free sample in PDF or EPUB, or read the sample online here
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...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
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.)
Learn more about writing on Leanpub
Free Updates. DRM Free.
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
Write and Publish on Leanpub
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.