A hundred and one field tips from a team that ships courses with Claude Code: the useful ones boil down to six habits.
Why this book
You hand a bug to Claude Code, a programming assistant that runs in your terminal: it reads your project, edits files and runs commands. It answers "it's fixed", with full confidence. Sometimes that's true, sometimes it isn't, and nothing in how it says so tells you which. The book answers with one reflex. Its last tip sums it up: "The agent gives us speed; the discipline of treating its output like real work is what keeps the speed valuable" (tip 101, module 15).
"101 Claude Code Tips" lines up 101 tips across fifteen modules, signed by Zenva Academy, an online course publisher from Queensland. No named author: a team "we" telling what Claude Code cost them. I use Claude Code every day, and I read this book on ExpertEdge in October 2026, through a partnership with Packt.
It is a short course (53 lessons, 1 h 26), so a short page. Two words come up everywhere. The instructions you type to Claude are called prompts. They go into a session, a conversation that stays open until you close it. From the book, I keep six ideas that answer two questions. How do you avoid taking Claude's word when it claims success (ideas 1, 3, 4 and 5)? And how do you keep it inside the frame you set (ideas 2 and 6)?
The ideas that stick
1No check, no victory
The first answer is the most direct one: give Claude a way to check itself. The book gives a broad definition: "Anything Claude can run and read is verification" (module 6). An automated test is one. A type check verifies that every value has the type it claims: that's one too, and so is a screenshot to compare against a target. When no verification is possible, you shrink the task until you find one, or you don't delegate it.
The verification goes into the prompt itself. The book's template relies on bun, a JavaScript tool that runs the tests. Here it is, preceded by the bare prompt:
✗ BEFORE (my own example)
Add a rate limiter in src/limiter.ts.
✓ AFTER (the book's template)
After implementing the rate limiter in src/limiter.ts:
- Run `bun test src/limiter.test.ts` and confirm all tests pass.
- Run `bun run typecheck` and confirm zero new errors.
If verification fails, do not declare success. Try again.
Without that last line, the book says, "Claude will frequently produce a confident summary even when the verification step failed."
Two setups with two sessions reinforce this check. In the first, one session writes the change and a fresh one reviews the diff (the list of modified lines) without knowing the first one's reasoning. In the second, one session writes the test and the other writes the code that makes it pass.
How do you pick the check? Ask what Claude could run, then read, to know the task worked. A few examples:
- Fixing a bug: ask first for a test that reproduces the bug and fails. The bug is fixed when that test passes.
- Building a web page: a script opens the page in a real browser, checks that an element shows up, and saves a screenshot that Claude looks at.
- A PHP site with no tests:
php -lchecks the syntax of every changed file. Thencurlcalls the page from the terminal, and it must answer 200. It is modest, and it is still a check. - A SQL query: run it on a few rows you know, and compare the result with what you worked out by hand.
- A refactoring: the existing tests must stay green, and the diff must only touch the files you planned.
None of these is universal. Start from the result you expect and look for the command that shows it. If no such command exists, you are back to the book's advice: shrink the task until one does.
2A fifty-line CLAUDE.md, mostly about what's off limits
Checking afterwards can't save a task that went the wrong way. Hence the second family of ideas: keep Claude inside the frame, starting with a file. CLAUDE.md is the file of standing instructions that Claude rereads at the start of every session. Bloated, it does the opposite of what you want. The book puts it this way: "Bloated CLAUDE.md files cause Claude to ignore actual instructions because the rules get lost in noise" (module 2). The book measures its size in tokens. A token is a chunk of a word, the unit the model counts and bills. The book's target: about 50 lines, under 1,000 tokens. Boris Cherny, who leads Claude Code at Anthropic, prunes his team's file with every new model version.
The book recommends two sections in it. The first sets the limits of the project: one line on what you do, several on what you don't:
## Project boundaries
**In scope:** slide deck generation, PDF export and local HTML
**Out of scope:**
- Authentication or user accounts
- Database or any persistent backend
- Real-time collaborative editing
Without this section, one vague word is enough to derail Claude. You write "improve the slide editor". But "improve" has no limit. According to the book, Claude can spend four hours adding user accounts that nobody asked for. With the section, user accounts are on the list of what you don't do. Claude knows not to touch them.
The second section is a list of facts about your machine. One line says, for example: "Python: not installed (don't look for it)". Claude reads that line. So it stops wasting time looking for a tool that isn't there.
3A hook guarantees what CLAUDE.md only hopes for
CLAUDE.md has a limit: it only holds instructions. Claude follows them most of the time, and nothing proves it followed them this time. It is the problem of the first idea: you only have its word. For an absolute rule, the book switches to hooks. A hook is a small script that Claude Code runs automatically before or after one of Claude's actions. It can refuse that action. The module 7 formula: "hooks guarantee execution; prompts do not."
# ✗ In CLAUDE.md: "Never run rm -rf or git push --force."
# Claude often remembers, not always.
# ✓ The book's hook, run before every Bash command:
cmd=$(jq -r '.tool_input.command' <&0) # jq reads the JSON: extracts the proposed command
if echo "$cmd" | grep -Eq '(rm -rf|git push --force|git reset --hard)'; then
echo "Blocked dangerous pattern: $cmd" >&2 # message sent back to Claude
exit 2 # code 2 = "refused"
fi
exit 0 # anything else: let it through
The script compares the command to a blocklist. If the command is on it, the script exits with code 2, the refusal signal. Claude then reads the message and can propose a safer variant. The book flags three pitfalls:
- A blocking hook must fire before the action, on the
PreToolUseevent. Wired toPostToolUse, which comes after the action, it is too late: the file is already written. - Claude Code has a mode where it no longer asks for any confirmation,
bypassPermissions. A hook that exits with code 2, the refusal in the script above, still blocks the action. - Your terminal reads your
.bashrcat startup. Anechoin it gets appended to the hook's answer and breaks it. The fix checks that the shell is interactive:
if [[ $- == *i* ]]; then
echo "Welcome back, $(whoami)" # shown only in a human terminal
fi
I run a few hooks of my own. One refuses to read a file of secrets. One refuses a commit whose message carries an AI signature. One refuses a way around git's own hooks. The gain is real: the rule holds every time, even when I forget it. Three limits struck me.
- A hook only guarantees what it can see. Mine reads the command line. If the commit message comes from a file, it does not see it.
- A rule that is too broad blocks by mistake. Banning the word "Claude" in a commit message would forbid naming the CLAUDE.md file. So I target exact signatures.
- You must choose how it fails. If the script crashes, should it block everything or let everything through? I let it through: a bug in a hook must not stop the work.
One more point, in the hooks' favour. Claude Code adds an attribution line to commits by default. A rule written in CLAUDE.md can lose against that default. A hook cannot. Where you declare a hook also matters: in your user settings it covers every project, in a project's settings only that project.
4Ask Claude what it decided without you
A hook stops the actions you saw coming. But Claude also makes decisions you did not plan for, and it does not flag them.
The book suggests two questions. Before the code, you ask Claude for the list of all its assumptions. After the code, you ask for the list of decisions it made without being told. The second pays off most (module 5). Every implementation makes choices in silence. For example, Claude picks on its own:
- the library used;
- the error-handling style;
- where the new file goes;
- the name of the public API.
The fewer choices you leave open, the fewer there are to expose. The book goes the same way: "A short, constrained prompt outperforms a long, polished one with no scope." Here is a vague prompt, then the same prompt with constraints. Redis is an in-memory database: here, it keeps the login sessions.
✗ Add authentication to this app.
✓ Add email and password authentication using the existing user model,
store sessions in Redis, introduce no new abstractions and change
no existing route.
If that's impossible without breaking these constraints, stop and explain why.
Each part of the prompt closes a choice. "With email and password" says what to build. "In Redis" says where to keep the state. "Change no existing route" says what does not move. The last sentence asks Claude to stop rather than decide alone.
Some words open every choice at once. The book warns against "refactor", "improve", "clean up" and "optimize" (tip 100): read literally, each one gives Claude permission to redesign the area it targets. "Refactor" is heard as "rethink this code": extracted helpers, renamed functions, new abstractions, sometimes new files. A small localized improvement is heard as a surgical edit. The book advises keeping the strong words for when you really mean them, and otherwise using a bounded vocabulary: "tighten", "rename", "extract this one helper".
✗ Refactor the slide generation logic.
→ helpers extracted, functions renamed, new abstractions, sometimes new files
✓ Make a small, localized improvement to the slide generation logic,
without changing the structure.
→ a surgical touch-up of the existing code
An example for the question about silent decisions: you ask "add a CSV export of the orders". Claude may give three answers. It picked the comma as separator. It picked UTF-8 without a BOM (the byte order mark that some software expects). It generated the file on the fly instead of storing it on disk. None of that was in your request. And a French Excel expects a semicolon: it will show everything in one column.
5Chat is not proof
Back to the first family: do not take Claude at its word. What Claude writes is not proof. When you contradict it, it answers in the tone of a conversation. It agrees, then fixes, in smooth prose, whether the fix is right or not. The book says it: the model imitates the shape of agreement. So a "You're absolutely right!" proves nothing. The countermeasure is mechanical: read the diff rather than the answer. The book sums it up in one line: "The chat language is not load-bearing" (module 15). In other words, nothing should rest on what is written in the conversation.
Same trap with tests (tip 98). Claude can write "I ran bun test, all green" without ever calling the Bash tool, the one that actually executes a command. The text is fluent, plausible and wrong. The Ctrl+O shortcut opens the transcript: with no visible Bash call, there was no test. This check matters most in automated runs (-p mode, GitHub Actions), where nobody watches each call. The book asks to build the verification into the structure of the run.
6Clear the context, or it makes you pay
Back to the second family: keeping Claude inside the frame, this time during the session. Context is everything Claude has in front of it in the session: your messages, its answers, the files it read. "Stale context degrades performance," says module 14, hence three habits:
/clearempties the context between two unrelated tasks, for example after an authentication overhaul, before a payment bug./compactsummarizes the conversation when the same task continues. The book pairs it with an instruction on what to keep, for example "focus on the refactoring plan and the failing tests".- A handoff file, written before clearing the context and reread by the next session. On a long project, the book prefers it to
/compact: Claude finds the exact state of the work there.
## Current task
Migrate `src/auth/` to the new sessionStore.
## Done
- `loginHandler` migrated, tests green.
## In progress
- Migrating `passwordResetHandler`, blocked on the recovery-token branch.
## Next steps
1. Resume the migration of `passwordResetHandler`.
These gestures empty a context that is already full. Subagents keep it from filling up in the first place. A subagent is a second Claude, launched separately, with a context of its own. Module 9 gives a rule: "if the task involves search results, log dumps, or file contents we will not reference again, run it in a subagent." The book's example: "find every place that uses this deprecated API" returns hundreds of lines. Those lines stay inside the subagent. It hands you back only a summary, and your own context stays light.
How to choose between the three habits: did the task change? Then /clear. Is it the same task, but the conversation is getting heavy with failed attempts? Then /compact, with what to keep. Will the work span several sessions, or are you closing the terminal for the night? Then the handoff file.
This handoff file can be automated. I wrote a skill, a set of instructions Claude loads on demand: vide-contexte, published on my GitHub. When I say "clear the context", it stores in memory files what is worth keeping: the decisions, the pitfalls met, the state of the work. It clears nothing itself: it saves, and I run /clear afterwards. The context restarts clean, and the next session does not start from zero.
My take, honestly
Its strength: each tip smells of a lived incident. These are not principles, they are guardrails born from real mistakes. It first sent me back to my own CLAUDE.md, which I audited on my blog from 296 down to 142 lines. The book asks for fifty. That leaves me at almost three times the target, nothing to brag about.
Its weaknesses. It is thin: 101 tips in an hour and a half, to browse like a notebook, and it defines few of its terms. Above all, this notebook belongs to a team that makes online courses, and several tips are about that trade: Trello (a card-based tracking tool), YouTube uploads, the LMS (the team's course platform). For a web developer, they are of no use.
I left those tips aside, along with the modules on skills (instruction sets Claude loads on demand), pipelines and MCP (a protocol that plugs in external tools). I keep only one figure: a server with 30 tools can preload 30,000 to 40,000 tokens before any work starts.
Two warnings about accuracy. From me: the book's hook blocks (tips 48 and 49) lay command and matchers out flat. The current official documentation nests them in a hooks array, with a type. Check before copying. From the book: the "two to three times" gain attributed to Anthropic actually points to Boris Cherny's talks, with no precise reference.
Read modules 2, 5, 6, 7, 9, 14 and 15, skip the rest without remorse. Keep the punchline: treat every diff like a colleague's pull request, the change proposal you review before merging.
Odilon
Still relevant in 2026?
The book's habits do not age: verify by running the code, put in a hook what must always be respected, keep CLAUDE.md short, clear the context between two tasks. The details age fast, because Claude Code changes often. The book lists 13 hook events, and that list may have changed. Several of its configuration blocks no longer match the current documentation. Before copying a name or a format, check it in the official documentation. These habits work on a PHP or JavaScript project too: only the test command changes.
Who is it for?
Read it if
- You've been using Claude Code for a few weeks and want concrete guardrails
- You like short formats you can pick at
- You've already lived the "it's fixed" that wasn't
Skip it if
- You're a beginner: the book aims at an intermediate level and defines few of its terms
- You want an exact reference for hooks or skills: the official documentation is more reliable
- You want everything to serve a web developer: you'll have to sort
This book is part of ExpertEdge, Packt's subscription for technical books. The code ODILON50 takes 50% off the yearly plan: the book on ExpertEdge. Affiliate link: I earn a commission if you subscribe with this code, and my ratings don't depend on it.
Going further
Sister pages: The Claude Code Operating Model, Agentic Coding with Claude Code, Best Practices for Claude Code. On the blog: Claude Code hooks examples, AI tests and mutation testing, the AI reviewer, never the author.
Comments (0)