The non-obvious tricks.
Twelve patterns that turn Claude Code from "AI in the terminal" into a working engineer's tool. Parallel worktrees, plan mode discipline, hook conventions, voice input, scheduled loops, multi-repo orchestration. The moves that nobody puts in a getting-started guide because they assume you'll figure them out.
This is the practice for the engineer who's already shipped a few things with Claude Code, hit the ceiling, and wants to know what's past it. Not a tutorial. A working playbook of what experienced operators actually do every day.
- Run 3–5 parallel worktree sessions on the same repo without context-mixing
- Use plan mode to compress 30-min features into 8 min of agreed-upon plan plus 2 min of execution
- Set up the core hook events that catch the bugs you currently catch in PR review
- Trigger Claude Code from your phone or a webhook for tasks you used to wait until laptop time
- Have a personal
~/.claude/CLAUDE.mdthat makes every project smarter from minute one
Parallel worktree sessions.
The single biggest productivity multiplier in Claude Code: stop running one session at a time. Run 3–5 in parallel, each in its own git worktree, each working a different ticket. The CLI has native support. Almost no one uses it.
# Start an isolated session in a new worktree claude --worktree claude --worktree my-feature # named # Open it in a new terminal window claude --worktree my-feature --tmux
The discipline
- Name your worktrees.
auth-rewrite, nottmp-3. - Color-code terminal tabs so you don’t lose track.
- Enable terminal notifications. You’ll get a ping when a session is waiting on you.
- Set shell aliases.
alias auth='cd ~/wt/auth-rewrite && claude'.
The first prompt in each worktree
Drop this in the moment you start a fresh session in a new worktree. It primes Claude with what's different about this worktree vs the others you have running.
# Paste this as your first message in a new worktree's Claude session
You're in a git worktree on branch `feat-x` (replace with the actual
branch name), isolated from main. This worktree has one job: [one sentence
describing the feature].
Other Claude sessions are working the other worktrees at the same time, so
stay inside this feature's blast radius. If the work needs a file outside
it, ask me before you edit that file.
Show me your plan and get my OK before you change code.
Why this works: The "other Claude sessions are working the other worktrees" line dramatically reduces a known failure mode. Parallel sessions reaching into each other's files. Claude respects an explicit blast-radius rule far better than an implicit one. Notice what the prompt doesn’t say: which files to skim, how many bullets the plan gets, which git command to run first. It gives the goal, the constraint, and the reason; Claude works out the investigation itself.
Spin up a worktree for a real task.
git worktree add ../my-repo-feat-x feat-xcd ../my-repo-feat-xand start a fresh Claude session there.- Work on the feature without polluting your main checkout.
- When done:
git worktree remove ../my-repo-feat-x.
git worktree list shows 2+ paths, each on a different branch, with no uncommitted-stash juggling between them. You edited a file in the new worktree while your main checkout’s git status stayed clean. Confirm by running git status in both directories.Stretch. Run 3+ Claude sessions in parallel against different worktrees. The bottleneck moves from your IDE to your brain.
Plan mode & auto-accept.
Press Shift+Tab until the status bar shows ⏸ plan mode on (or prefix one prompt with /plan) when the approach is uncertain, the change spans files, or the code is unfamiliar. Refine the plan in dialogue; then let it run. If you could describe the diff in one sentence, skip the plan.
The combination matters. Approving every edit one by one after you’ve already agreed the plan is slow. Running hands-off without a plan on a change you haven’t scoped makes Claude move fast in the wrong direction (expensive). Plan first, then approve the plan into Auto or Accept-edits mode, and ship fast in the right direction.
The plan-mode prompt that compresses 30 minutes into 8
Plan mode already investigates on its own. What it can’t guess is what you need to see before you say yes. Tell it what the plan has to contain, not how to research it.
# Use this BEFORE switching out of plan mode
I want to [one sentence describing the change].
Before I approve, the plan needs:
- The changes file by file, a line or two each.
- Where this could break something else.
- Which tests change, and why.
- Your confidence (1-5) that this is the right approach. If it's below 4,
say what would raise it.
I'll read it before approving, so make it easy to scan.
The confidence score is the trick. Without it, plan mode turns into "do you approve?". Which you'll just answer yes to. The score forces Claude to flag its own uncertainty, which is the signal you actually wanted.
The model + effort combo for plans
Start with the default, Opus 5.5 at medium effort, for both plan and build. Judge it by cost per finished change, not price per token. A plan that keeps coming back wrong is the signal to raise effort (/effort high) for the planning turn, not to add longer instructions. If you want cheaper execution, the opusplan model alias plans with Opus and builds with Sonnet. Measure it on your own changes before you make it the default (as of Oct 2026).
Run plan mode on a real change before you approve it.
- Open Claude Code in a repo with a real pending change. Press Shift+Tab until the status bar shows
⏸ plan mode on. - Paste the confidence-score prompt above, filling in
[one sentence describing the change]. - Read the plan it returns. Do not press approve yet.
- Only switch out of plan mode once the plan contains both required pieces (see Verify). If either is missing, reply “add the missing piece” and keep it in plan mode.
N/5 or “confidence: N” with N from 1–5, and (2) a file-by-file change list naming each file it will touch with a one-line description. Both present → approve. Either absent → the plan isn’t ready.Stretch. Run the same change twice. Once with high effort, once with default. And compare the two plans’ confidence scores and file lists. Codify which effort level you trust to plan unsupervised.
Effort & fast mode.
Two knobs that change how Claude trades quality for speed. The defaults that experienced operators converge on after a few weeks of using the tool seriously.
| Setting | Use for |
|---|---|
/effort low | Quick exchanges you review as you go: a rename, a first sketch, brainstorming. |
/effort medium | The default on the 5.5 models (Opus, Sonnet, Haiku). Day-to-day engineering with a clear scope, such as building a planned feature. |
/effort high | Work where verification matters or edge cases are likely, such as fixing a bug in an existing codebase. |
/effort xhigh | Deeper reasoning at a higher token spend. Reach for it when high measurably falls short. |
/effort max | Hard problems you want Claude to work through without you, such as hunting security bugs. Can overthink; test before adopting it broadly. |
/fast | Same Opus model at up to ~2.5× output speed, premium pricing (Opus 5.5 / Opus 5 / Opus 4.8, as of Oct 2026). Good for chat-like back-and-forth. |
Level guidance follows the model configuration docs (as of Oct 2026). Effort is the depth control; “think harder” in a prompt is just text. Claude Code recognizes only ultrathink, for one deeper turn.
Try effort levels on the same task.
- Pick a task that’s gone wrong before at default effort.
- Run at
/effort medium. Save the diff. - Re-run on the original branch at
/effort high. Save that diff too. - Compare: which got it right? At what cost?
/cost after each). If both diffs are identical, the task wasn’t hard enough to tell the levels apart. Pick a harder one.Stretch. Codify: low for boilerplate, medium for refactors, high for design decisions.
Subagent isolation.
Add isolation: worktree to an agent’s frontmatter and the harness will dispatch it in a fresh worktree. Parallel investigation without polluting the main context.
--- name: dependency-auditor description: Audits package.json for outdated and abandoned deps. Run proactively before any release. tools: [Bash, Read, WebFetch] isolation: worktree --- Your job is to audit dependencies...
Combined with the /batch command from the support article: “Use /batch to fan work across dozens of worktree agents automatically.” Twenty migrations in parallel; the main session only sees the summaries.
Spin up a subagent for one isolated task.
- From the main Claude session, type
/agentsto see available subagents. - Pick one (Explore for codebase questions).
- Give it a narrow task: ‘Find every place we set the user role.’
- Read the subagent’s summary. Decide whether to act on it from the main session.
Stretch. Pair: dispatch two subagents in parallel against orthogonal questions. The main session stays sharp.
Hooks at scale.
Hooks aren’t one-off scripts. They’re your team’s conventions, enforced by the harness so Claude can't forget them. The five patterns that pay off fastest:
| Event | What to put on it |
|---|---|
PostToolUse | Auto-format on every Edit. bun run format || true. |
PermissionRequest | Route approval prompts to Slack, WhatsApp, or your phone via push. |
SessionStart | Dynamically load context (current branch, last 5 commits, open PRs). |
PostCompact | Re-inject critical instructions after compression cuts them. |
PreToolUse | Block dangerous commands. git reset --hard, rm -rf /, etc. |
Stop | Deterministic verification before declaring done. Run tests, check coverage. |
The Stop hook is especially powerful. Have the harness run a deterministic check (tests pass? lint clean?) before claiming the work is finished. If the check fails, the harness re-prompts Claude with the failure. This is how you get an agent that actually hits its goals.
The starter settings.json. Five hooks, paste-ready
This is the walk-away config the practice promises: five hook events wired at once, each on a different event from the table above. Save it to .claude/settings.json (project-local) and every session in this repo runs all five. The commands are deliberately conservative. Format-if-present, warn-don’t-block on destructive Bash. So you can paste first and tighten later.
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "in=$(cat); echo \"$in\" | grep -Eq \"rm -rf|git push --force|git reset --hard|: >\" && { echo 'Blocked: destructive command.' >&2; exit 2; }; exit 0"
}
]
}
],
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{ "type": "command", "command": "npx --no-install prettier --write . 2>/dev/null || true" }
]
}
],
"SessionStart": [
{
"hooks": [
{ "type": "command", "command": "echo \"Branch: $(git branch --show-current). Last 5 commits:\"; git log --oneline -5" }
]
}
],
"Stop": [
{
"hooks": [
{ "type": "command", "command": "npm test --silent 2>/dev/null || echo 'Tests not green — verify before done.'" }
]
}
],
"PreCompact": [
{
"hooks": [
{ "type": "command", "command": "date +'## context compacted %Y-%m-%d %H:%M' >> .claude/compaction.log" }
]
}
]
}
}
Install all five hooks, then prove the blocker fires.
- In a repo, create
.claude/settings.jsonand paste the five-hook block above. - Start a fresh Claude Code session there. The
SessionStarthook should print your branch and last 5 commits as the session opens. - Run
/hooksto list what’s registered. - Ask Claude to run
rm -rf ./build. ThePreToolUsehook should stop it.
/hooks lists the hookable events — 30-plus today, including the five you just wired (PreToolUse, PostToolUse, SessionStart, Stop, PreCompact). The rm -rf attempt is refused with the “Blocked: destructive command” message instead of executing. Verify the ./build dir is still there.Stretch. Swap the PostToolUse formatter for your repo’s real one (ruff format, gofmt, bun run format) and add a sibling PreToolUse matcher for the next behavior you keep correcting by hand.
Voice input.
From the support article: “/voice or microphone button for space-bar recording; ~3× faster than typing.”
Use cases that earn the trade-off:
- Describing a feature you want at the start of a session (the description is always longer when you talk than when you type).
- Reading aloud a stack trace or error so Claude has full context.
- Quick “run the tests, deploy if green” style commands during a walk.
Stop hook from Unit 05). Talk through the problem, approve the plan, walk away. The check is what lets the session finish the work correctly while you’re away from the keyboard; without one, “looks done” is the only signal it has.
Try voice mode for one session.
- Start a Claude session.
- Hit the voice input shortcut (look up in your config; usually a hotkey).
- Describe a task in 30+ seconds of natural speech.
- Watch the transcript appear. Edit if needed, then submit.
Stretch. Use voice for all your ‘here’s the situation’ prompts and keyboard for ‘here’s the precise edit’.
MCP from a CLI.
MCP servers are usually associated with Claude Desktop. They work just as well in Claude Code. Two patterns the support article highlights.
Data analytics
Wire bq (BigQuery CLI) or your warehouse’s MCP server. Ask Claude to pull metrics, plot them, summarize. You never write SQL; Claude does. The MCP server enforces the safe-query patterns.
Bug fixing from Slack
Connect a Slack MCP server. Paste a bug-report thread URL. Say “fix.” Claude reads the thread, finds the relevant code, proposes the fix, opens a PR. Zero context-switching between Slack and the editor.
Log troubleshooting
Point Claude at docker logs for a distributed system. The model can scan thousands of lines for patterns a human would miss. Useful for the “something’s slow but I don’t know what” class of problem.
Connect one MCP server from the CLI.
- Pick a service you use daily that has an official MCP (GitHub is a good start).
- Add it with the service’s documented
claude mcp add …command. Add--scope userto make it available in every project; user-scoped servers live in~/.claude.json(as of Oct 2026). - Restart Claude. Verify with
/mcp. - Ask Claude something that requires the MCP (e.g. ‘list my open PRs’).
Stretch. Add a second MCP. Cross-service queries (‘PRs mentioning Linear issue X’) become possible.
Sandboxing & permissions.
As your agent does more, the cost of one wrong action grows. Three primitives from the support article keep that cost bounded.
# Pre-approve known-safe commands so you stop confirming each one /permissions > add Bash(bun run *) > add Edit(/docs/**) # Run a session in a sandbox (file/network isolation) /sandbox # toggle sandbox mode on/off (file/network isolation) # Auto mode: a classifier reviews each action and blocks what looks risky claude --permission-mode auto
Run Claude in a sandboxed directory.
--add-dir + permissions to limit what Claude can touch.- Pick a sensitive folder where Claude shouldn’t write.
- Start Claude with
--add-dir /safe/dironly. - Try to make Claude write outside. It should be blocked.
- Compare to full-access mode. Notice the friction/safety tradeoff.
~/secrets/note.txt). It is refused or prompts for a permission you didn’t grant. Confirm the file was never created with ls ~/secrets/note.txt (no such file). A write inside the allowed dir succeeds.Stretch. Habit: every sensitive project starts with explicit --add-dir.
Remote & mobile.
Claude Code escaped your laptop. Remote Control, the mobile app, push notifications, and channel plugins make sessions portable.
- Mobile app. Open the Claude iOS/Android app, switch to the Code tab, and connect to a Remote Control session running on your machine.
- Remote Control.
/remote-controlorclaude --remote-controlenables phone or web control of your local session. Watch what Claude is doing from the next room. - Push notifications. Enable push in
/configso long-running work can notify your phone when tests finish or Claude needs a decision. - Channels. Install a channel plugin or build your own when you want external events from Telegram, Discord, CI, or team chat to trigger local Claude Code work.
Try remote control from your phone.
- Open Claude Code on your laptop. Run
/remote-control. - Open the Claude mobile app. Connect to the session.
- Send a prompt from the phone. Watch it execute on the laptop.
- Try checking on a long-running task while away from your desk.
Stretch. Pair with /loop: kick off a recurring task and check on it from your phone over a meal.
Scheduled local loops.
Claude Code can babysit a long-running task without you. Two flavors.
# A local loop on a recurring interval (laptop must stay awake) /loop 5m /babysit-prs # every 5 minutes, run /babysit-prs # A cloud job (laptop can sleep; runs in the cloud) /schedule '0 6 * * *' /morning-brief
The cloud-job version is what makes the morning briefing in NanoClaw / Real-Life Claude feasible without owning hardware. The loop runs in the cloud; you get the output on your phone.
Set up one scheduled job.
/loop or /schedule.- Pick a task that should run on a cadence (morning briefing, hourly status, daily PR triage).
/loop 1h check open PRs and ping me about stale ones. Or use/schedulefor cron-based.- Let it run for 24 hours.
- Decide: keep, adjust cadence, or kill.
/loop list (or /schedule list for the cloud version) and confirm a run fired once and produced output (a message, a file, or a logged result). No run after the interval elapsed → the job didn’t arm; re-check the command.Stretch. Schedule 2 jobs that interact: one ingests, one summarizes. The brain gets thicker.
Multi-repo workflows.
Most engineers work across more than one repo. Claude Code has CLI flags and slash commands that grant cross-repo access cleanly.
# Grant access to additional directories claude --add-dir ~/other-repo # or inside a session: /add-dir ~/other-repo # Bare mode for fast SDK startup (skips local discovery) claude -p 'task description' --bare # Branch a session — useful for exploring two paths from the same plan /branch # or from outside the session: claude --resume <session-id> --fork-session
Work across two repos in one session.
--add-dir to give Claude access to both repos at once.- Start Claude in repo A.
- Add repo B:
claude --add-dir /path/to/repoB(or use/add-dirinside). - Ask a cross-repo question (‘which functions in A call into B’s API?’).
- Watch Claude grep across both. Note where context gets confusing.
/add-dir.Stretch. Use /branch to fork a session at a clean point so you can explore both directions.
Treat Claude Code like a package manager.
Motto: the most under-used productivity move is installing a plugin that already solves your problem.
Skills are single-purpose. Plugins are multi-tool bundles. A packaged set of commands, sub-agents, hooks, and tools that turn Claude Code into a specialised version of itself for one workflow. Three things to know:
- Install in seconds.
/plugin install <plugin>@<marketplace>in any Claude Code session pulls a plugin from a marketplace and wires it in. - One plugin can replace a week of homemade scripts. Codebase-onboarding, deployment workflows, doc generation, testing pipelines. If someone has already published it, install rather than build.
- Plugins are removable. If a plugin clutters your slash-command namespace or you stop using it,
/plugin uninstall <plugin>@<marketplace>and it’s gone. Try with low cost.
The case-study pattern: codebase onboarding via knowledge graph
One of the most useful plugin patterns is "scan-the-repo, build a graph, give me a guided tour." A multi-agent pipeline (orchestrator + per-file workers + synthesizer) reads every file, extracts entities and relationships, and assembles a navigable map. New team member, 200k-line codebase, two hours of guided exploration instead of two months of stumbling.
You don’t need to build it; the pattern exists. The lesson is: before you write a tool, check the Discover tab and your configured marketplaces. Two minutes saves two weeks.
# Browse before you build /plugin # List configured marketplaces /plugin marketplace list # Install when something fits /plugin install <plugin-name>@<marketplace-name> # Apply plugin changes during the current session /reload-plugins # Clean up what didn't stick /plugin uninstall <plugin-name>@<marketplace-name>
The "build vs install" decision in 60 seconds
- Install if: a plugin exists that does ≥70% of what you want, AND its hooks/commands won’t clash with yours.
- Build a skill if: it’s a single repeated task, narrow, you want full control.
- Build a plugin if: it’s a bundle of related capabilities your whole team would use; publish it back if it generalizes.
The under-rated move: 90% of engineers who hit "Claude Code can’t do X" don’t check whether someone else already published a plugin that does X. The Discover tab is the cheapest first move every single time.
Browse, then install one plugin.
- Run
/plugin marketplace list. If it prints nothing, add one first (e.g./plugin marketplace add anthropics/claude-code), then re-run. - Run
/pluginand skim the catalog for something that fits a task you repeat. - Install it:
/plugin install <plugin-name>@<marketplace-name>, then/reload-plugins. - Invoke one command the plugin added; if it doesn’t earn its slash-command space,
/plugin uninstallit.
/plugin marketplace list prints at least one configured marketplace, and after installing, /help (or /plugin) lists at least one command or agent that wasn’t there before. If /help looks unchanged, the install didn’t take. Re-run /reload-plugins.Stretch. Note the one homemade script the plugin replaced. That delta. Minutes saved per use × uses per week. Is your install-vs-build payback.
The awesome list.
The community has organized itself around two repos that are worth pinning. Read them periodically; the field moves fast.
- awesome-claude-code. Curated skills, hooks, slash commands, agents, plugins. 80+ specialized sub-agents in Seth Hobson’s collection.
- awesome-claude-skills. Curated SKILL.md files for every domain from quant finance to legal review.
- Dan Avila’s plugin marketplace. DevOps automation, doc generation, project management, testing suites.
- shinpr/claude-code-workflows. End-to-end development workflows with specialized agents.
The discipline: every fortnight, scan the awesome lists for one new pattern. Test it against your work. If it sticks, adopt; if not, move on. The cost of trying one new pattern is half an hour. The value of one that sticks is the rest of your year.
Pick three tricks to keep.
- Skim the units. Star the 3 most relevant.
- In your
~/.claude/CLAUDE.md, add a## Tricks I’m adoptingsection and list the three by name. - Use each at least twice this week. Each time, append a one-line dated note under its name (
2026-06-11: used plan mode on the billing fix). - Next week, drop any trick with zero dated notes; add one more from the practice.
~/.claude/CLAUDE.md lists the three tricks, and each has at least two dated use-notes from this week. Run grep -A6 "Tricks I" ~/.claude/CLAUDE.md and count the dated lines. A trick with no dates didn’t stick.Stretch. Power patterns work because you actually use them. Adoption > quantity.
Your power-user CLAUDE.md.
The single highest-leverage artifact from this practice. Drop this in ~/.claude/CLAUDE.md. It loads into every Claude Code session you start, anywhere, forever.
# Save to ~/.claude/CLAUDE.md — loads in every session
# CLAUDE.md — personal power-user defaults
## How I work
- I run 3-5 parallel worktrees. Before editing, check `git worktree list`
and confirm you're not stepping on another session's blast radius.
- For changes spanning more than one file I start in plan mode. Put a
1-5 confidence score in every plan so I know how hard to review it.
- When I name something loosely ("the auth handler"), find it and tell
me which file you picked.
## Defaults
- Run the tests before committing. If the area you touched has no
tests, suggest one.
- Use the `gh` CLI for GitHub operations; it's authenticated here and
the web pages aren't.
## Hooks in my setup
- A PreToolUse hook blocks rm -rf, force-push, and reset --hard. If it
blocks you, tell me what you were trying to do rather than working
around it.
- A Stop hook runs the test suite. When it reports red, fix that before
calling the work done.
## How I like replies
- Lead with the code when the answer is code. When something fails, say
what happened and what you'll do next, then stop.
- No emoji in code comments.
## My stack defaults (override when project differs)
- Language: [your default]
- Package manager: [your default]
- Test runner: [your default]
- CI: GitHub Actions
- Cloud: [your default]
Customize the bracketed parts, drop it in ~/.claude/CLAUDE.md, and it loads automatically in every Claude Code session you start. This file alone replaces 3-5 minutes of re-explaining yourself at the start of each session. Two things it deliberately leaves out. Effort: CLAUDE.md is context, not configuration, so set it with /effort (saved per model) or effortLevel in settings. The hooks themselves: they live in settings.json (Unit 05); the section above only tells Claude what they’ll do, so it doesn’t fight them. Keep the file short. For each line, ask whether Claude would get something wrong without it; if not, cut it (as of Oct 2026).
Install it today.
- Copy the block above.
mkdir -p ~/.claude && pbpaste > ~/.claude/CLAUDE.md(or open in your editor and paste).- Edit the [bracketed defaults] to match your stack.
- Start a new Claude Code session anywhere. Confirm Claude knows your conventions without re-explaining.
"What conventions are you following right now?". Claude should recite back the rules from your CLAUDE.md.