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 5 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 are working in a git worktree isolated from main. The branch is `feat-x`
(replace with actual branch name). This worktree's job is ONLY: [one sentence
describing the feature].
Before touching any code:
1. Run `git log --oneline -10` and tell me where this branch diverged from main.
2. Skim the 3 files most likely to change for this feature.
3. State the plan in 5 bullets max. Get my OK before you start.
If you find yourself about to edit a file outside the feature's blast radius,
stop and ask. We have other Claude sessions running on the other worktrees;
don't step on them.
Why this works: The "we have other sessions running" 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.
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 to enter plan mode before any non-trivial change. Refine the plan in dialogue; then switch to auto-accept.
The combination matters. Plan mode without auto-accept makes you confirm every edit (slow). Auto-accept without plan mode makes Claude move fast in the wrong direction (expensive). Plan first, accept second, ship fast in the right direction.
The plan-mode prompt that compresses 30 minutes into 8
Don't let plan mode degenerate into "think out loud." Give it shape. This is the prompt that gets a sharp, executable plan instead of a rambling outline.
# Use this BEFORE switching out of plan mode
I want to [one sentence describing the change].
Before any code:
1. Read the 3-5 files most affected. Tell me their current responsibility.
2. List the EXACT changes you'd make, file by file, in 1-2 lines each.
3. Identify the 1-2 places where this could break something else.
4. Tell me what tests should change and why.
5. Give me a confidence score 1-5 that this is the right approach.
If your confidence is < 4, tell me why and what would raise it.
If your confidence is ≥ 4, ask permission to switch out of plan mode.
Format the plan so I can scan it in 60 seconds.
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
Use the strongest model with high effort for the plan; switch to a faster cheaper model for the execution. One careful, expensive plan; many cheap, fast follow-throughs.
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 to enter plan mode (the input line shows
plan). - 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 edits, near-trivial changes. |
/effort medium | Default. Most everyday work. |
/effort high | The recommended default for non-trivial work — the extra tokens pay back in less back-and-forth. |
/effort max | Hard problems. Architectural decisions. Subtle bugs. |
/fast | Trades a bit of depth for noticeably faster responses. Good for chat-like back-and-forth. |
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 5 events (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.
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 to
~/.claude/.mcp.jsonwith the official config. - 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 # interactive: pick one of 3 configs # Auto mode: harness auto-approves anything in the permission set claude --enable-auto-mode
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 NanoClaude / 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.
- I use plan mode by default for any change spanning more than one file.
Don't switch out of plan mode without giving me a 1-5 confidence score
on the plan.
- I prefer explicit file paths over inferred ones. When I say "the auth
handler", ask which file.
## Defaults
- Effort: high for plans, medium for execution.
- Always run tests before committing. If tests don't exist for the area
you touched, suggest one.
- Use `gh` CLI for any GitHub operation. Never open the web UI.
## Hooks I rely on
- Pre-edit: linter must pass on the file before modification
- Pre-commit: prettier + eslint must pass on staged files
- Post-tool-use: log the file paths Claude touched to ~/.claude-edits.log
- Pre-bash: warn me before any rm, drop, or destructive command
- Post-task: append a one-line summary to ~/.claude-changelog.md
## Things I don't want
- Apologies. Just say what happened and what you'll do next.
- "Let me know if you need anything else" at the end of every reply.
- Emoji in code comments.
- Filler before a code block — just show the code.
## 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.
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.