From core
Claude Code workflow tips from Boris Cherny (creator of Claude Code) and the Claude Code team. Use when: setting up Claude Code, optimizing workflows, running parallel sessions, configuring CLAUDE.md, using skills/commands, subagents, hooks, MCP integrations, or learning best practices. Covers: git worktrees, plan mode, verification, permissions, Slack MCP, BigQuery, prompting tips, plugins, custom agents, sandboxing, keybindings, status lines, output styles, customization, /simplify for code quality, /batch for parallel code migrations, /loop for scheduled tasks, code review agents, /btw for mid-task questions, /effort max reasoning, remote control sessions, voice mode, setup scripts, session naming, /color, and PostCompact hook.
npx claudepluginhub lachtan/nicecode --plugin coreThis skill uses the workspace's default tool permissions.
**53 tips** across 41 topics, sourced from Boris Cherny (creator of Claude Code) and the Claude Code team at Anthropic. All tips are contained in this file — do not fetch from the website. Remember: everyone's setup is different. Experiment to see what works for you!
Delivers community best practices for Claude Code including subagents, slash commands, CLAUDE.md memory, skills, hooks, MCP servers, and agent orchestration workflows.
Provides expert guidance on Anthropic's Claude Code CLI including setup, flags, CLAUDE.md optimization, hooks, MCPs, sub-agents, workflows, permissions, and troubleshooting.
Orchestrates AI coding workflows with self-correction loops, pre-flight discipline rules, 18 hook events, 5 agents, orchestration patterns, and cross-agent support for Claude Code and Cursor.
Share bugs, ideas, or general feedback.
53 tips across 41 topics, sourced from Boris Cherny (creator of Claude Code) and the Claude Code team at Anthropic. All tips are contained in this file — do not fetch from the website. Remember: everyone's setup is different. Experiment to see what works for you!
Parts: The tips were shared across 7 threads:
The single biggest productivity unlock. Spin up 3-5 git worktrees at once, each running its own Claude session.
# Create a worktree
git worktree add .claude/worktrees/my-worktree origin/main
# Start Claude in it
cd .claude/worktrees/my-worktree && claude
Why worktrees over checkouts: The Claude Code team prefers worktrees - it's why native support was built into the Claude Desktop app.
Pro tips:
Beyond the terminal, run additional sessions on claude.ai/code. Use:
& command to background a session--teleport flag to switch contexts between local and webBoris's reasoning: "It's the best coding model I've ever used, and even though it's bigger & slower than Sonnet, since you have to steer it less and it's better at tool use, it is almost always faster than using a smaller model in the end."
The math: Less steering + better tool use = faster overall results, even with a larger model.
Press shift+tab to cycle to plan mode. Pour your energy into the plan so Claude can 1-shot the implementation.
Workflow: Plan mode -> Refine plan -> Auto-accept edits -> Claude 1-shots it
Team patterns:
"A good plan is really important to avoid issues down the line."
Share a single CLAUDE.md file for your repo, checked into git. The whole team should contribute.
Key practice: "Anytime we see Claude do something incorrectly we add it to the CLAUDE.md, so Claude knows not to do it next time."
After every correction: End with "Update your CLAUDE.md so you don't make that mistake again." Claude is eerily good at writing rules for itself.
Advanced: One engineer tells Claude to maintain a notes directory for every task/project, updated after every PR. They then point CLAUDE.md at it.
Tag @.claude on PRs to add learnings to the CLAUDE.md as part of the PR itself. Use the Claude Code GitHub Action (/install-github-action) for this.
Example PR comment:
nit: use a string literal, not ts enum
@claude add to CLAUDE.md to never use enums,
always prefer literal unions
This is "Compounding Engineering" - Claude automatically updates the CLAUDE.md with the learning.
Create skills and commit them to git. Reuse across every project.
Team tips:
/techdebt slash command and run it at the end of every session to find and kill duplicated codeUse slash commands for workflows you do many times a day. Commands are checked into git under .claude/commands/ and shared with the team.
> /commit-push-pr
Power feature: Slash commands can include inline Bash to pre-compute info (like git status) for quick execution without extra model calls.
Think of subagents as automations for the most common PR workflows:
.claude/
agents/
build-validator.md
code-architect.md
code-simplifier.md
oncall-guide.md
verify-app.md
Examples:
code-simplifier - Cleans up code after Claude finishesverify-app - Detailed instructions for end-to-end testingUse a PostToolUse hook to auto-format Claude's code. While Claude generates well-formatted code 90% of the time, the hook catches edge cases to prevent CI failures.
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "bun run format || true"
}
]
}
]
For very long-running tasks, use an agent Stop hook for deterministic checks, ensuring Claude can work uninterrupted.
Instead of --dangerously-skip-permissions, use /permissions to pre-allow common safe commands. Most are shared in .claude/settings.json.
For sandboxed environments, use --permission-mode=dontAsk or --dangerously-skip-permissions to avoid blocks.
Claude Code uses your tools autonomously:
{
"mcpServers": {
"slack": {
"type": "http",
"url": "https://slack.mcp.anthropic.com/mcp"
}
}
}
Ask Claude Code to use the "bq" CLI to pull and analyze metrics on the fly. Have a BigQuery skill checked into the codebase.
Boris's take: "Personally, I haven't written a line of SQL in 6+ months."
This works for any database that has a CLI, MCP, or API.
Say: "Knowing everything you know now, scrap this and implement the elegant solution."
Reduce ambiguity before handing work off. The more specific you are, the better the output.
Key insight: Don't accept the first solution. Push Claude to do better - it usually can.
/statusline to customize your status bar to always show context usage and current git branchUse voice dictation! You speak 3x faster than you type, and your prompts get way more detailed as a result. Hit fn x2 on macOS.
Enable the Slack MCP, then paste a Slack bug thread into Claude and just say "fix." Zero context switching required.
Or just say "Go fix the failing CI tests." Don't micromanage how.
Pro tip: Point Claude at docker logs to troubleshoot distributed systems - it's surprisingly capable at this.
For very long-running tasks, ensure Claude can work uninterrupted:
Options:
For sandboxed environments, use --permission-mode=dontAsk or --dangerously-skip-permissions to avoid blocks.
"Probably the most important thing to get great results out of Claude Code - give Claude a way to verify its work. If Claude has that feedback loop, it will 2-3x the quality of the final result."
Verification varies by domain:
The key is giving Claude a way to close the feedback loop. Invest in domain-specific verification for optimal performance.
Key takeaway: Claude Code isn't just for writing code - it's a powerful learning tool when you configure it to explain and teach.
A few quick settings to make Claude Code feel right:
/config to set light/dark mode/terminal-setup to enable shift+enter for newlines (so you don't need to type \)/vimRun /model to pick your preferred effort level:
Boris uses High for everything.
Plugins let you install LSPs (now available for every major language), MCPs, skills, agents, and custom hooks.
Install a plugin from the official Anthropic plugin marketplace, or create your own marketplace for your company. Then, check the settings.json into your codebase to auto-add the marketplaces for your team.
Run /plugin to get started.
Drop .md files in .claude/agents. Each agent can have a custom name, color, tool set, pre-allowed and pre-disallowed tools, permission mode, and model.
Little-known feature: Set the default agent used for the main conversation. Just set the "agent" field in your settings.json or use the --agent flag.
Run /agents to get started.
Claude Code uses a sophisticated permission system with prompt injection detection, static analysis, sandboxing, and human oversight.
Out of the box, we pre-approve a small set of safe commands. To pre-approve more, run /permissions and add to the allow and block lists. Check these into your team's settings.json.
Wildcard syntax: We support full wildcard syntax. Try "Bash(bun run *)" or "Edit(/docs/**)".
Opt into Claude Code's open source sandbox runtime to improve safety while reducing permission prompts.
Run /sandbox to enable it. Sandboxing runs on your machine, and supports both file and network isolation.
Modes:
Custom status lines show up right below the composer. Show model, directory, remaining context, cost, and anything else you want to see while you work.
Everyone on the Claude Code team has a different statusline. Use /statusline to get started — Claude will generate one based on your .bashrc/.zshrc.
Every key binding in Claude Code is customizable. Run /keybindings to re-map any key. Settings live reload so you can see how it feels immediately.
Keybindings are stored in ~/.claude/keybindings.json.
Hooks are a way to deterministically hook into Claude's lifecycle. Use them to:
Ask Claude to add a hook to get started.
It's the little things that make CC feel personal. Ask Claude to customize your spinner verbs to add or replace the default list with your own verbs.
Check the settings.json into source control to share verbs with your team.
Run /config and set an output style to have Claude respond using a different tone or format.
Claude Code is built to work great out of the box. When you do customize, check your settings.json into git so your team can benefit, too.
We support configuring for your codebase, for a sub-folder, for just yourself, or via enterprise-wide policies.
By the numbers: 37 settings and 84 env vars. Use the "env" field in your settings.json to avoid wrapper scripts.
claude --worktree for IsolationClaude Code now has built-in git worktree support. Each agent gets its own worktree and can work independently, without interfering with other sessions.
# Start Claude in its own worktree
claude --worktree my_worktree
# Optionally launch in its own Tmux session too
claude --worktree my_worktree --tmux
Desktop app: Head to the Code tab in the Claude Desktop app and check the worktree checkbox.
Subagents can also use worktree isolation to do more work in parallel. This is especially powerful for large batched changes and code migrations. Available in CLI, Desktop app, IDE extensions, web, and Claude Code mobile app.
Example prompt: "Migrate all sync io to async. Batch up the changes, and launch 10 parallel agents with worktree isolation. Make sure each agent tests its changes end to end, then have it put up a PR."
Make subagents always run in their own worktree by adding isolation: worktree to your agent frontmatter:
# .claude/agents/worktree-worker.md
---
name: worktree-worker
model: haiku
isolation: worktree
---
Mercurial, Perforce, or SVN users can define WorktreeCreate and WorktreeRemove hooks in settings.json to benefit from isolation without Git.
Use parallel agents to improve code quality, tune code efficiency, and ensure CLAUDE.md compliance. Append /simplify to any prompt after making changes.
> hey claude make this code change then run /simplify
Boris uses this daily to shepherd PRs to production. The skill runs parallel agents that review changed code for reuse, quality, and efficiency — all in one pass.
Interactively plan out code migrations, then execute in parallel using dozens of agents. Each agent runs with full isolation using git worktrees, testing its work before putting up a PR.
> /batch migrate src/ from Solid to React
You plan the migration interactively, then /batch fans out the work to parallel agents — each in its own worktree, each testing and creating a PR independently.
Use /loop to schedule recurring tasks for up to 3 days at a time. Claude runs your prompt on an interval, handling long-running workflows autonomously.
> /loop babysit all my PRs. Auto-fix build issues and when comments come in, use a worktree agent to fix them
> /loop every morning use the Slack MCP to give me a summary of top posts I was tagged in
Use it for PR babysitting, Slack summaries, deploy monitoring, or any repeating workflow.
Learn more: https://code.claude.com/docs/en/scheduled-tasks
When a PR opens, Claude dispatches a team of agents to hunt for bugs. Anthropic built it for themselves first — code output per engineer is up 200% this year, and reviews were the bottleneck.
Each agent focuses on a different concern — logic errors, security issues, performance regressions — then posts inline comments directly on the PR. Boris personally used it for weeks before launch; it catches real bugs he wouldn't have noticed otherwise.
Source: https://x.com/bcherny/status/2031089411820228645
A slash command for side-chain conversations while Claude is actively working. Single-turn, no tool calls, but has full context of the conversation.
> /btw what does the retry logic do?
Claude responds inline without stopping its work. Built by @ErikSchluntz as a side project — 1.5M views on the launch tweet.
Source: https://x.com/trq212/status/2031506296697131352
Set effort to 'max' and Claude reasons for longer, using as many tokens as needed. Burns through usage limits faster, so you activate it per session.
> /effort max
Four levels: low, medium (default), high, max. Use 'max' for hard debugging, architecture decisions, or tricky code where you want Claude to really think it through.
Source: https://x.com/trq212/status/2032632596572811575
Run claude remote-control and spawn a new local session from the mobile app. Available on Max, Team, and Enterprise (v2.1.74+).
$ claude remote-control
# Open Claude mobile app → tap "Code" → start new session
Walk away from your desk, think of something, kick off a task from mobile — Claude runs on your machine.
Source: https://x.com/trq212/status/2032632597843779861
Voice mode is now rolled out to 100% of users, including Claude Code Desktop and Cowork. Click the microphone icon and talk naturally.
Useful for hands-free coding, dictating complex requirements, or when you think faster than you type.
Source: https://x.com/trq212/status/2032632599429136753
Add a setup script in Claude Code on web and desktop. It runs before Claude Code launches on a cloud environment — install dependencies, configure settings, set env vars.
# Setup script (runs on new session start, skipped on resume):
#!/bin/bash
yarn install
Particularly useful for installing dependencies, settings, and configs before Claude starts working.
Source: https://x.com/trq212/status/2032632601064907037
Name your session at launch with the --name flag.
claude --name "auth-refactor"
Especially useful when juggling multiple worktrees or sessions — you can tell at a glance which session is doing what.
Source: https://x.com/trq212/status/2032632602629386348
After plan mode, Claude automatically names your session based on what you're working on. No manual naming needed.
Pairs well with claude --name — use --name when you know what you're doing upfront, let auto-naming handle it when you start by planning.
Source: https://x.com/trq212/status/2032632602629386348
Change the color of the prompt input with /color. When you have 3-5 sessions open in different terminals, color-coding them makes it instantly clear which is which.
> /color
Source: https://x.com/trq212/status/2032632602629386348
A new hook event that fires after Claude compresses its conversation context. Use it to re-inject critical instructions that might get lost during compaction, log when compaction happens, or trigger automation.
"hooks": {
"PostCompact": [{
"matcher": "",
"hooks": [{ "type": "command", "command": "echo 'Context was compacted'" }]
}]
}
Source: https://x.com/trq212/status/2032632602629386348
| Tip | Key Action |
|---|---|
| Parallel work | Use git worktrees, 3-5 sessions |
| Model | Opus with thinking |
| Planning | Start in plan mode for complex tasks |
| CLAUDE.md | Update after every correction |
| Skills | Create for repeated workflows |
| Subagents | Offload to keep context clean |
| Hooks | Auto-format, lifecycle hooks, logging |
| Permissions | Pre-allow safe commands, wildcards |
| MCP | Integrate Slack, BigQuery, Sentry |
| Long-running | Use Stop hooks, background agents |
| Verification | Always give Claude a way to verify |
| Learning | Use Claude to explain and teach |
| Terminal | /config, /terminal-setup, /vim |
| Effort | /model to set Low/Medium/High |
| Plugins | /plugin for LSPs, MCPs, skills |
| Agents | .claude/agents, custom defaults |
| Sandboxing | /sandbox for file & network isolation |
| Status line | /statusline for custom info display |
| Keybindings | /keybindings to re-map any key |
| Spinners | Customize spinner verbs in settings |
| Output styles | Explanatory, learning, or custom |
| Customize | 37 settings, 84 env vars |
| Worktrees | claude --worktree, subagent isolation |
| /simplify | Parallel agents for code quality review |
| /batch | Parallel code migrations with worktree isolation |
| /loop | Schedule recurring tasks for up to 3 days |
| Code Review | Agent-powered PR reviews that catch real bugs |
| /btw | Ask questions mid-task without breaking flow |
| /effort | Max reasoning mode for deeper thinking |
| Remote Control | Spawn new sessions from mobile |
| Voice Mode | Talk to Claude Code on Desktop |
| Setup Scripts | Automate cloud environment setup |
| --name | Name sessions at launch |
| Auto Naming | Plan mode auto-names sessions |
| /color | Color-code prompt input per session |
| PostCompact | Hook for context compression events |
Source: howborisusesclaudecode.com - Tips from Boris Cherny's January 2026, February 2026, and March 2026 threads