Book Prompts
Type a prompt number from the book to copy it instantly.
Enter the prompt number printed in the book.

Mastering Claude Code
These prompts are excerpts from the book. Get the full collection with explanations and use cases.
Browse by Chapter
#1Chapter 00 — Introduction: Why This Book, Who It's For, How To Read It
Here are three things I accepted from Claude Code last week without reading carefully: [list three]. Here are three things I rewrote by hand that Claude had right: [list three]. What's my trust-calibration problem — am I closer to Chris (accept-without-reading) or Marco (verify-everything-including-safe-boilerplate), or am I uncalibrated on both ends? Reply in three sentences.
#2Chapter 00 — Introduction: Why This Book, Who It's For, How To Read It
I am a [role] working mostly in [language/stack]. My biggest frustration with AI coding tools is [specific pain]. Based on the table of contents below, suggest a 5-chapter reading order for my situation and say why for each pick. [Paste the TOC from the front matter of this book.]
#3Chapter 00 — Introduction: Why This Book, Who It's For, How To Read It
Here is our team's current Claude Code runbook: [paste the runbook]. I'm migrating to Opus 4.7. For every rule in the runbook, tell me: (1) whether 4.7 changes the rule's correctness, and which specific 4.7 change motivates the answer; (2) what the updated rule should be; (3) any uncertainty — mark with `[VERIFY]` so I can check it myself. Cite turn-by-turn where you are inferring versus where you can point to a specific 4.7 change.
#4Chapter 00 — Introduction: Why This Book, Who It's For, How To Read It
Read the README and tell me what this project does in three sentences. Then suggest one thing I could improve in the next sprint — not implement, just name — with one sentence of reasoning.
#5Chapter 01 — Claude Code in 15 Minutes
I'm a [your role] opening Claude Code for the first time in this repo. Read the README and tell me, in three sentences, what this project does. Then suggest one thing I could improve in the next sprint — not implement, just name — with one sentence of reasoning.
#6Chapter 01 — Claude Code in 15 Minutes
Open `[file]`. Add a single-line comment above function `[name]` explaining, in plain English, what the function does. Do not change anything else. Show me the diff before applying it.
#7Chapter 01 — Claude Code in 15 Minutes
Before I approve this diff, explain in one paragraph what you changed and why. If you changed anything beyond the comment, say so explicitly. If any change is broader than my original request, flag it — I'll decide whether to keep it.
#8Chapter 01 — Claude Code in 15 Minutes
Stage the diff. Then draft a commit message in the team's style — subject line under 60 characters, body explaining the why, not the what. Here's the most recent commit for style reference: [paste the output of `git log --oneline -3`]
#9Chapter 01 — Claude Code in 15 Minutes
Run `claude --version` and tell me what version you're on. Cross-reference against these four features I expect in 4.7: `xhigh` effort default, `opus[1m]` alias, `Ctrl+U` clears entire buffer, `Ctrl+L` force redraw. For each, mark `[VERIFY]` if you're not 100% sure my version supports it — I'll check against the changelog myself.
#10Chapter 02 — Prompting Well: Scope → Specify → Review
[Task in one line]. Files in scope: [list]. Out of scope: [list]. Success looks like: [testable outcome].
#11Chapter 02 — Prompting Well: Scope → Specify → Review
I want to [goal]. Before I ask you to write any code: what is the smallest testable outcome that would tell us the goal is met? Write it as a single sentence I can paste back into a follow-up prompt as "success looks like: …". Do not propose any implementation — I only need the success criterion.
#12Chapter 02 — Prompting Well: Scope → Specify → Review
Here's my current prompt: [paste]. Read it and tell me: (1) which sentences are redundant, (2) which contain decisions I already ruled out, (3) the minimum 3–5-sentence version that preserves the load-bearing constraints. Classify each remaining sentence as named-entity, numeric constraint, convention, or anti-goal.
#13Chapter 02 — Prompting Well: Scope → Specify → Review
Before you touch any files: in one paragraph, restate my ask in your own words, list the files you plan to read or edit, and name any ambiguity you resolved by guessing. Stop there and wait for my go-ahead.
#14Chapter 02 — Prompting Well: Scope → Specify → Review
Here's my ask: [prompt]. Before executing: list every noun, pronoun, or reference in my ask that could be interpreted more than one way. For each, mark your chosen interpretation with `[VERIFY]` so I can correct it. Do NOT proceed until I confirm.
#15Chapter 02 — Prompting Well: Scope → Specify → Review
[Paste stack trace]. Don't fix anything yet. First: identify which file and function is the most likely source of the error, in one sentence. Then propose the minimum diagnostic I should run before any code change.
#16Chapter 03 — Managing Your Context and Sessions
Before I give you the next task, take stock. List what you believe is currently loaded from this session: decisions we've made, files we've touched, conventions we've agreed on. Flag anything that's more than ten turns old or that you're inferring rather than remembering directly. Tell me what you'd drop if I ran `/compact` right now.
#17Chapter 03 — Managing Your Context and Sessions
Write a compact-ready recap of our session. Include only: (1) the decisions we made and the reasoning behind each one, (2) the three most important open questions still outstanding, (3) file paths we've touched and the intent of each change, (4) any conventions we've agreed on (naming, structure, formatting). Omit exploration, dead ends, and reasoning I already agreed with. Output in markdown, grouped by category.
#18Chapter 03 — Managing Your Context and Sessions
Before you write the migration, re-state the exact schema change in detail. For every column being added, removed, altered, or preserved, say which and cite where in the session that decision was made (turn number, a file we read together, or an explicit user statement). If you are inferring a decision from a compacted summary rather than a pre-compact fact, say so and flag it. Do not proceed if any item is uncertain.
#19Chapter 03 — Managing Your Context and Sessions
I'm about to clear this session. Before I do, write session notes for your next instance. Include: (1) decisions we've made with reasoning, (2) file paths and the intent of each change, (3) conventions agreed, (4) open questions. Mark any fact with `[VERIFY]` if you're less than 100% sure it's correct — I'd rather double-check than trust a fabrication. Output as markdown I can paste at the top of the next session.
#20Chapter 03 — Managing Your Context and Sessions
I'm rewinding to turn N because you misread X as Y. Before I resend my message: confirm what the rewind restored (conversation and file-tool edits), and list every Bash side effect from the rewound turns — commits, deletions, moves, network calls — that is still in the world. Anything you're not certain about, flag.
#21Chapter 03 — Managing Your Context and Sessions
Here is the task: [describe task]. Here are the files I know are relevant: [list]. Tell me: (1) Does this task actually need `opus[1m]`, or would it fit comfortably in default `opus` (200k) with the listed files plus targeted `--add-dir`? (2) Give me a rough token estimate for each approach. (3) Recommend one, with reasoning. If the right answer is "I can't tell from your description," say what you need to know.
#22Chapter 03 — Managing Your Context and Sessions
I've started this session with `claude --add-dir ../client-sdk`. The working directory is the SERVICE repo; the secondary directory is the CLIENT SDK. Ownership: - SERVICE owns: authentication token issuance, validation, refresh endpoint behaviour. - CLIENT owns: token storage, refresh scheduling, retry logic on 401. Task: users are getting logged out after 24 hours despite refresh tokens being valid. Symptom manifests in CLIENT on the first request after a 24h idle. Read only the files each repo owns for the concern involved. Do not read the CLIENT's payment code or the SERVICE's admin code. Report what you find before proposing changes.
#23Project CLAUDE.md
Audit the CLAUDE.md below. For every line that names a library (with or without version), external system, API endpoint, internal URL, or specific numeric constraint (timeouts, quotas, thresholds): mark the claim with `[VERIFY]` and state what would need to be checked to confirm it's still current. Cross-reference against the latest 20 commits on `main` to flag anything contradicted by recent code changes. Do not flag team conventions, architectural guidance, or anti-goals — only facts that can drift. Output as a markdown checklist.
#24Project CLAUDE.md
Scan `git log --pretty=format:'%s%n%b' -n 50`. Identify the five most consistent patterns in commit messages. Scan merged PR descriptions for the last 10 merges — identify recurring constraints, conventions, or anti-goals. Output a markdown list of 8–15 candidate rules for CLAUDE.md, ranked by how often they'd apply.
#25Project CLAUDE.md
Read the repo. List the conventions that would belong in a CLAUDE.md: naming patterns in the last 50 commits, recurring anti-goals in PR descriptions, tooling assumptions in `package.json` / `pyproject.toml`, architectural pointers from README and directory structure. Organise by category. Propose a 120–180 line first draft.
#26Chapter 05 — Plan Mode and Thinking Modes
Before you touch any files: produce a plan. List every step, every file you'll read or edit, every new file you'll create, every dependency you'll add or remove. Stop after the plan and wait for my approval. Do not execute until I say "go".
#27Chapter 05 — Plan Mode and Thinking Modes
Before you touch any files: produce a plan for this refactor. Group steps by service. For each service, list: files to read, files to edit, new files, dependencies added or removed. Stop after the plan and wait for my approval.
#28Chapter 05 — Plan Mode and Thinking Modes
The plan has two issues: (1) step 3 references `oldMethod` which doesn't exist — use `newMethod` instead, (2) step 5 should be skipped entirely. Revise the plan. Do not execute. Output the corrected plan only.
#29Chapter 05 — Plan Mode and Thinking Modes
Review the plan you just produced. For every named function, method, file path, library version, or module referenced: mark it with `[VERIFY]` and tell me how you'd confirm it exists and has the signature you're assuming. For each, propose the single shell command or file read that would verify it. Do not start executing. Output as a markdown checklist with three columns: Entity, Verify Action, Confidence (high / medium / low).
#30Per-team — settings.json
Set effort to `low` for this task. The work is a straightforward CRUD endpoint following the pattern in `src/api/users.ts`. I do not need extra reasoning — I need the straightforward answer fast.
#31Per-team — settings.json
Set effort to `max` for this ask. The task is architectural — you'll need to consider trade-offs across multiple files and reason about long-term consequences. Give me the full reasoning chain, not just the conclusion.
#32Per-team — settings.json
I'm about to do [task description]. Tell me: (1) which effort level should I use — low / medium / high / xhigh / max, (2) one-sentence reasoning, (3) what would change in Claude's output if I used one level higher vs one level lower. Do not execute the task — just recommend the level.
#33Include thinking content in the response
For this task, include your full reasoning chain in the response — not just the conclusion. Walk me through how you got to the answer.
#34Include thinking content in the response
Refactor `src/auth/session.ts` to use the new session store. Files in scope: `session.ts` only. Out of scope: tests, `src/auth/middleware.ts`, `src/auth/login.ts`. Success: existing auth tests still pass, sessions round-trip through the new store. Before touching any files: produce a plan. List every step, every file read, every file edited. Stop after the plan and wait for my approval.
#35Chapter 06 — Voice and Input Flow
Here's my raw voice transcript: [paste]. Rewrite it as a scoped Claude Code prompt using the three-line template (task / files in scope / success criterion). Preserve only: named entities, numeric constraints, conventions I stated, anti-goals. Drop filler words, self-corrections I crossed out in speech, and repetitions. Output the tight version only — don't execute the underlying task yet.
#36Chapter 06 — Voice and Input Flow
*(Dictate the intent and constraints; type the identifiers, paths, numbers, and exact syntax. Interleave within the same prompt. Don't send until every typed token is correct.)* **Shape:** - Dictate: what you want, why, what the constraints are. - Type: `file_path.ext`, `functionName`, `numeric_value_with_unit`, exact syntax. - Dictate: success criterion in plain English. - Type: success criterion as a check — test command, condition, measurable outcome.
#37Chapter 06 — Voice and Input Flow
I'm about to commit. My staged changes are [dictated one-sentence description]. The motivation was [dictated why]. Draft a commit message in the team's style — subject line under 60 characters, body explaining the why, not the what. Here's the most recent commit for style reference: [typed — `git log --oneline -3` output]
#38Chapter 06 — Voice and Input Flow
End-of-day handoff. I worked on [dictated task]. Current status: [dictated narrative of where you are]. Remaining: [dictated list]. Open questions: [dictated]. Turn this into the Chapter 03 session-notes format: decisions, file paths touched, open questions, anything marked `[VERIFY]` if you're unsure whether I said the identifier correctly.
#39Chapter 06 — Voice and Input Flow
Here's my raw voice transcript: [paste]. Before executing any action on this: identify every code identifier — function names, file paths, class names, variable names, library names, version numbers — that might have been mis-transcribed. Mark each with `[VERIFY]`, propose the most likely intended spelling, and ask me to confirm. Do not execute the task until I've confirmed each flagged item. Output as a markdown checklist: Raw Token | Likely Intended | Confidence (high / medium / low) | Confirmation Needed (yes / no).
#40Chapter 07 — Slash Commands: Inner-Loop Automation
I've been typing this prompt every day: [paste your most-repeated prompt]. Turn it into a `.claude/commands/*.md` file: frontmatter with `description` and `argument-hint`, body with `$ARGUMENTS` wired in the right place. The command should be invocable with zero additional typing beyond the arguments. Output only the command file content.
#41Chapter 07 — Slash Commands: Inner-Loop Automation
Here's an existing slash command file: [paste]. List every named entity in the body — scripts, binaries, CLI tools and their flags, file paths, config files, team conventions (channels, mentions, groups), external systems, version numbers, sibling commands referenced. For each: (1) mark with `[VERIFY]`, (2) classify by type (path / tool / flag / team / system / version / sibling-command), (3) propose the single shell command or file read that would confirm it's real and current, (4) rate confidence HIGH / MEDIUM / LOW. Do not execute anything. Output as a markdown table with columns: Entity | Type | Verify Action | Confidence.
#42Chapter 08 — Subagents: Isolation and Parallelism
Here's the summary a subagent returned: [paste]. List every named entity — file paths, function names, class names, method names, line numbers, library names, version numbers, config keys, CLI flags. For each: (1) mark with `[VERIFY]`, (2) classify (path / symbol / location / library / version / config / flag), (3) propose the single shell command or file read that would confirm it's real and current, (4) rate confidence HIGH / MEDIUM / LOW. Do not accept the summary as load-bearing context until every MEDIUM or LOW item is verified. Output as a markdown table: Entity | Type | Verify Action | Confidence.
#43Chapter 09 — Hooks: Safety Net and Automation
Here's a hook configuration and its command body: [paste]. List every named entity — script paths, binaries expected on `PATH`, environment variables, hard-coded directory paths, CLI flags, exit-code assumptions about invoked tools, regex patterns in the matcher. For each: (1) mark with `[VERIFY]`, (2) classify (path / binary / env / glob / flag / assumption), (3) propose the single shell command or file read that would confirm it's real and current, (4) rate confidence HIGH / MEDIUM / LOW. Do not commit the hook until every MEDIUM or LOW item is verified. Output as a markdown table: Entity | Type | Verify Action | Confidence.
#44Chapter 10 — Skills: Progressive Disclosure
Here's a `SKILL.md` file and its directory listing: [paste both]. For every referenced file path in `references/`, every script path in `scripts/`, every URL, every factual claim, every team convention, every statistic, every regulatory requirement, and every external resource in the body: (1) mark with `[VERIFY]`, (2) classify (file / script / URL / claim / convention / statistic), (3) propose the single shell command or file read that would confirm it's real and current, (4) rate confidence HIGH / MEDIUM / LOW. Do not commit the skill until every MEDIUM or LOW item is verified. Output as a markdown table: Entity | Type | Verify Action | Confidence.
#45PreToolUse on Bash
Here's an MCP server I'm about to install (or re-audit): [paste the `mcp.json` entry and the documentation link]. For each of: (1) publisher — who maintains it, how reputable, any security advisories; (2) permissions — what file-system, network, or shell access the server has; (3) credentials — what the `env` passes, what scope the credential has, what the blast radius would be if the credential leaked; (4) tool surface — what tools the server exposes, any beyond what I need; (5) trust level — first-party (I control) / trusted third-party / unvetted — mark each with `[VERIFY]`, classify, propose the single check that would confirm it, and rate confidence HIGH / MEDIUM / LOW. At the bottom: RECOMMEND / CAUTION / DO NOT INSTALL with a one-sentence justification. Output as a markdown table.
#46Chapter 12 — Permissions, Sandbox, `--enable-auto-mode`
Here's my allowlist: [paste]. For each entry: (1) mark with `[VERIFY]`, (2) name the specific tool-call patterns it would approve (give three examples), (3) flag whether the pattern is wildcard-style (potentially over-broad) or specific, (4) propose the narrower version if over-breadth is detected, (5) rate safety HIGH / MEDIUM / LOW. Output as a markdown table: Entry | Matches | Breadth | Narrower Version | Safety.
#47Chapter 12 — Permissions, Sandbox, `--enable-auto-mode`
I'm about to start an `xhigh` session for [describe the work — e.g., "deploying service X to staging"]. Help me design a sandbox config. For each of these three categories, list what should be allowed and explain why: (1) writable directories, (2) read-only directories, (3) network outbound endpoints. Then flag anything I might have missed — directories the build process writes to that I haven't listed, endpoints that dependencies call during build. Output as a three-column table with a "Risk if omitted" column.
#48After (precise)
I currently run Claude Code with `--dangerously-skip-permissions` for this workflow: [describe]. Help me convert to a precise permission stack. (1) List every command the workflow actually runs. (2) Write a narrow allowlist entry for each safe command. (3) Write denylist entries for anything that must never run unattended. (4) Show the replacement command using `--enable-auto-mode`. (5) Suggest a slash command wrapper for the daily ritual.
#49After (precise)
I want to enforce this safety rule: [describe — e.g., "edits to migrations/ should require confirmation"]. Which mechanism should I use: allowlist entry, denylist entry, hook (Ch09), or keep the default prompt? Explain why the other three are wrong for this case. If a hook is right, sketch the hook config.
#50Install dependencies in each (if needed)
I have three tickets to work in parallel: [list ticket IDs and branch names, e.g., "PROJ-412 on feature/proj-412, PROJ-415 on feature/proj-415, PROJ-418 on feature/proj-418"]. Generate: (1) `git worktree add` commands for each, placing worktrees as sibling directories, (2) `npm install` or equivalent dependency setup for each, (3) Claude Code session-start commands with `/rename` for each worktree. Output as a single bash script I can paste into my terminal.
#51Terminal 3
I have three active sessions: [list session names]. For each, `[VERIFY]`: (1) the session's working directory still exists on disk, (2) the worktree is on the expected branch (not detached HEAD), (3) no uncommitted changes from a different ticket have leaked in, (4) the session context hasn't been silently compacted. Output as a table: Session | Directory | Branch | Uncommitted | Context health | Action needed.
#52Test worktree — writable test only
We're a team of [N] using [ticketing system, e.g., Linear] with IDs like [format, e.g., ENG-1234]. Design our session naming convention, worktree cleanup policy, and the CLAUDE.md section that documents both. Include: naming pattern, max active worktrees, cleanup trigger, and a `/morning-resume` slash command that lists and resumes active sessions.
#53Test worktree — writable test only
Here's my `git worktree list` output: [paste]. For each worktree: (1) check if the branch has been merged into main, (2) check if the directory still exists on disk, (3) recommend: keep, remove, or prune. Output as a table with cleanup commands for each action.
#54Chapter 14 — Ralph Wiggum: Long-Running Autonomous Loops
I'm planning a long-running Claude Code session: [describe the task — e.g., "migrate 63 files from ORM v1 to ORM v2"]. Effort level: [xhigh/max]. Estimated file count: [N]. Help me estimate: (1) tokens per file (run a test on 3 sample files if you can), (2) total tokens with Opus 4.7 tokenizer inflation (1.0–1.35×), (3) dollar cost at $5/MTok input, $25/MTok output, (4) recommended task budget with 15% headroom. Output as a table.
#55Check no test file is empty
I'm launching a long-running session for [describe task — e.g., "migrating 63 files from ORM v1 to v2"]. Write a Stop hook script that validates the output before the session exits. The hook should check: (1) [primary validation — e.g., "schema consistency across all migrated files"], (2) [secondary validation — e.g., "no empty or boilerplate-only files"], (3) [integration check — e.g., "the test suite still passes"]. Output the shell script and the `.claude/settings.json` entry to register it.
#56PROGRESS.md — Migration ORM v1 → v2
I'm about to launch a long-running session for [describe task — e.g., "expanding unit tests for 40 modules"]. Design a `PROGRESS.md` template the session will update after each unit of work. Include: (1) a completed section with checkboxes, (2) a remaining section, (3) a timestamp, (4) a notes field for any issues encountered. The session instruction should explicitly say "update PROGRESS.md after each module."
#574. Launch with all guardrails
I'm planning an unattended Claude Code session for [describe task]. Safety constraints: [list — e.g., "writable only to ./migrations/ and ./src/models/, cost under $100, must pass migration validator"]. Generate the full launch checklist: (1) task budget (with estimation), (2) `--max-turns`, (3) effort level, (4) sandbox config, (5) auto-mode confirmation, (6) Stop hook script, (7) PROGRESS.md template. Output as a single launch command I can paste, plus the hook script and progress template as separate files.
#584. Launch with all guardrails
An overnight Claude Code session just completed. Here's its summary: [paste summary]. Here's the task it was running: [describe]. For each claim in the summary, `[VERIFY]`: (1) file count — does `git diff --stat` show the expected number of meaningfully modified files? (2) consistency — do the modified files pass the validation script? Are there conflicting changes (files modified multiple times with different patterns)? (3) PROGRESS.md — does it match the summary's claim about completed vs remaining? (4) cost — what does `/cost` or billing show vs what the summary claims? Output as a table: Claim | Verification | Status (confirmed/disputed/unverifiable).
#59Chapter 15 — Git and Pull Requests
Stage only [list files or directories — e.g., "./src/auth/session.ts and ./src/auth/middleware.ts"]. Do not stage any other files. Draft a conventional-commit message for this change: [one-line description — e.g., "fix null session crash in auth middleware"]. Show me `git diff --cached` before committing.
#60Chapter 15 — Git and Pull Requests
Create a pull request targeting [base branch — e.g., "main"]. Title: [short title — e.g., "Fix null session crash in auth middleware"]. Body: write a summary of what changed and why, plus a test plan with steps to verify the fix. Add reviewer [name — e.g., "@marco"]. Label: [label — e.g., "bug"]. Push the branch first if it hasn't been pushed yet.
#61Or via CLI:
I'm about to merge this PR: [paste PR URL or describe]. Before I merge, `[VERIFY]` each of these: (1) does `git diff main...HEAD` show only the changes I intended? Flag any unexpected files. (2) Does the commit message accurately describe the diff? (3) Are all HIGH and MEDIUM `/ultrareview` findings addressed? (4) Are CI checks passing? (5) Is the branch up to date with main? Output as a checklist: Check | Status | Issue (if any).
#62Or via CLI:
This PR is too large: [paste `git diff --stat` output or describe]. It has [N] concerns: [list — e.g., "a refactor of the token parser, a new auth feature that depends on the refactor, and test updates for both"]. Help me split it: (1) identify which commits belong to each concern, (2) plan the merge order (dependency chain), (3) generate the git commands (cherry-pick or rebase) to create separate branches, (4) draft PR titles for each split PR.
#63Chapter 16 — Debugging with Claude Code
Here's a bug I need diagnosed. Error: [paste 3–5 lines — the error message and the first stack frame in your code]. Screenshot: [attach screenshot of the broken state, if visual]. Context: [what changed recently — deploy, refactor, dependency update, env change]. Don't fix it yet — diagnose the root cause. What's the most likely cause, and how can I verify it?
#64Chapter 16 — Debugging with Claude Code
A user reports: [describe the symptom — e.g., "the checkout page crashes when clicking 'Place Order'"]. I can't reproduce it on my machine. Here's the code path: [paste the relevant handler or component]. Here's the user's environment: [browser, OS, version]. Analyze the code path for failure modes that could cause this symptom in the user's environment but not mine. List the most likely causes, ranked by probability.
#65Chapter 16 — Debugging with Claude Code
Something broke after [describe the change — e.g., "updating Node.js to v22", "switching to a new terminal", "running npm update"]. The error is: [paste error]. Run `/doctor` and interpret the results. If `/doctor` finds an environment issue, explain the fix. If the environment looks clean, the bug is in the code — tell me where to look next.
#66Chapter 16 — Debugging with Claude Code
I've been debugging this issue for 20 minutes without converging. Here's the bug: [describe symptom + error]. Here's what I've ruled out so far: [list eliminated hypotheses]. Give me a fresh diagnosis from a different angle. What root cause haven't I considered?
#67Chapter 16 — Debugging with Claude Code
I found a bug and wrote a fix. Bug: [describe the root cause — e.g., "race condition in useEffect: cleanup doesn't cancel pending fetch"]. Fix: [describe the change — e.g., "added AbortController in useEffect cleanup"]. `[VERIFY]`: (1) Does this fix address the root cause or just suppress the symptom? (2) Does the fix introduce new risks (deadlocks, skipped cleanup, changed return types)? (3) Are there callers or dependents affected by this change? (4) Run `/ultrareview` on the diff and report findings. Output as a table: Check | Status | Issue (if any).
#68Chapter 17 — TDD with Claude Code
Generate a test scaffold for `[function name]`. The function takes [describe inputs] and returns [describe output]. Write describe/it blocks with arrange-act-assert for these scenarios: [list test cases — e.g., "empty input returns zero, single item domestic, single item international, oversized item throws error"]. Use literal expected values, not function calls. Set `/effort low`.
#69Refactor commit
Here's the function signature: `[paste]`. Here are the constraints I know about: [list domain-specific rules — e.g., "negative prices are invalid, user IDs above 10M are from a legacy migration, the API rejects requests on Sundays"]. Generate additional test cases covering: (1) boundary conditions from the signature, (2) edge cases from the constraints I listed, (3) any boundary conditions you can infer that I haven't listed. For each, explain *why* it's an edge case.
#70Refactor commit
Here are failing tests for `[function name]` [paste test file or reference path]. Write the implementation that makes all tests pass. Don't modify the tests. If any test seems contradictory or impossible to satisfy, flag it — don't silently adjust the test or write dead code.
#71Refactor commit
Here's my test file: [paste or reference path]. For each test assertion, `[VERIFY]`: (1) Does it test meaningful behaviour — would it fail if the implementation were wrong? (2) Is the expected value a literal or a function-call tautology? (3) Does it cover the edge case it claims to cover — is the input actually at the boundary? (4) Are there side effects the test should check but doesn't (database writes, API calls, file creation)? Output as a table: Test name | Meaningful? | Tautology risk | Side effects checked? | Verdict.
#72Refactor commit
Here's a list of modules that need unit tests: [list module names or paths]. For each module, generate a test scaffold: describe/it blocks, arrange-act-assert, standard edge cases. Set `/effort low`. After generating, list any modules whose testing needs are non-standard (complex state, async workflows, external dependencies) — I'll handle those separately at higher effort.
#73Chapter 18 — Status Line and UX Customisation
I've been running this session for [duration]. The status line shows [token count] tokens and [cost]. Help me interpret: (1) is this token count normal for the work I've done, accounting for 4.7 tokenizer inflation? (2) Is the cost within the expected range for this effort level? (3) Should I compact, set a task budget, or continue?
#74Chapter 18 — Status Line and UX Customisation
Here are my custom keybindings: [paste keybindings.json or describe]. For each, `[VERIFY]`: (1) does it conflict with terminal-level shortcuts (`Ctrl+S`/XOFF, `Ctrl+Z`/suspend, `Ctrl+Q`/XON)? (2) Does it conflict with Claude Code's built-in bindings listed above? (3) Is it consistent with my muscle memory from [editor — e.g., vim, VS Code, Emacs]? Output as a table: Binding | Conflict? | Risk | Recommendation.
#75Chapter 18 — Status Line and UX Customisation
I want to design my Claude Code UX for maximum glanceability. I need to see at a glance: model, effort level, token count, cost, and session name. My terminal is [describe — e.g., "iTerm2 on macOS" or "Windows Terminal"]. My typical session runs [describe — e.g., "2–4 hours, xhigh effort, Opus"]. Configure: (1) status-line layout with these fields visible, (2) a theme that works in my terminal, (3) the three-second glance checklist I should follow before every prompt.
#76Chapter 19 — Your Daily Setup + Conclusion
Here's my Claude Code setup. CLAUDE.md: [paste or reference]. Hooks: [list hook files]. Permissions: [paste settings.json permissions block]. Custom commands: [list]. Check these against the latest Claude Code changelog. For each component: is it still current? Does any recent changelog entry require recalibration? Flag anything stale, broken, or referencing removed features. Output as a table: Component | Status | Action needed.
#77Chapter 19 — Your Daily Setup + Conclusion
I'm migrating Claude Code from [current version] to [target version]. Here's my setup: CLAUDE.md [paste], hooks [list], permissions [paste]. Based on the changelog between these versions, generate the migration checklist: (1) breaking changes that affect my setup, (2) new features I should adopt, (3) thresholds or defaults I need to recalibrate. Output as an actionable table: Change | My impact | Action.
#78Chapter 19 — Your Daily Setup + Conclusion
Here's my full Claude Code setup. CLAUDE.md: [paste]. Hooks: [list with brief descriptions]. Permissions: [paste settings.json]. Commands: [list]. Skills: [list]. For each component, `[VERIFY]`: (1) is it still current (no stale references)? (2) Does it match my actual workflow (used in the last month)? (3) Should it be updated, retired, or kept as-is? Output as a table: Component | Last used | Status | Recommendation.