Claude Code Tips and Tricks: 12 Power Moves
12 Claude Code tips and tricks that actually move the needle: context hygiene, plan mode, permissions, skills, and cost control. Copy-paste ready.
--- These Claude Code tips and tricks are the difference between an agent that burns tokens in circles and one that ships. Every tip below is copy-paste ready: a command, a setting, or a habit you can adopt in under five minutes. They fall into four groups — context management, planning, workflow automation, and cost control.
Context management: keep the window clean
Claude Code's performance degrades as its context window fills up. Half of all "Claude got dumb" complaints are really context problems. These three tricks fix that.
1. /clear between unrelated tasks
When you finish one task, run /clear before starting the next. Stale context from the previous task pollutes the new one — old file paths, abandoned approaches, corrected mistakes. A clean window beats a long memory every time.
/clearMake it a reflex: task done → /clear → new task. If you've argued with Claude for five turns without progress, /clear and rewrite the prompt from scratch instead of turn six.
2. /compact with a focus, don't just let it auto-compact
When the window fills mid-task, Claude auto-compacts and you lose control of what survives. Compact deliberately instead, with a focus that tells it what matters:
/compact focus on the auth module refactor, keep the API contract decisionsThis keeps the decisions and drops the dead ends. Do it before the window is full — check /context to see how much room you have left.
3. Esc is your steering wheel
Claude heading the wrong way? Hit Esc immediately to stop it mid-response — every extra paragraph costs tokens and pollutes context. Double-Esc opens the rewind menu to undo the last turn entirely. Stopping after one bad paragraph is ten times cheaper than cleaning up after ten.
Planning: think before it types
4. Plan mode for anything non-trivial
Press Shift+Tab twice to enter plan mode. Claude researches and proposes a plan without touching your code. Use it for multi-file refactors, new features, and bug investigations — anywhere the "obvious" approach might be wrong.
The two-phase rhythm (explore, then implement) beats diving straight in. Ask for the plan, poke holes in it, approve, then let it build. You'll throw away far less code.
5. Demand a plan in the prompt itself
Even outside plan mode, start complex requests with: "Propose a 3–6 step plan first and wait for my confirmation." This surfaces hidden work — migrations, test updates, config changes — before a single file is touched, and it gives you a natural checkpoint to narrow scope.
6. Constrain the blast radius
Vague requests get sprawling diffs. Tell Claude exactly what it may touch:
Return a unified diff touching only src/auth/ and src/middleware/.
Do not change any other files.Small, surgical edits mean fewer regressions and reviews you can actually read. Pair this with plan mode for refactors: plan first, then implement with tight file constraints.
Workflow automation: make the machine do the boring parts
7. Keep CLAUDE.md lean — move playbooks into skills
Your CLAUDE.md loads on every single request. A bloated one taxes everything you do. Keep it to project facts (commands, conventions, architecture pointers) and move repeatable workflows into skills — debugging protocols, review checklists, release procedures.
Skills load on demand when the request matches their description, so they cost nothing until used. Our guide What Are Agent Skills? explains the split in depth. The rule of thumb: facts go in CLAUDE.md, procedures go in skills.
8. Install the four workflow skills first
If you install nothing else, install skills covering the daily coding loop. These four pay for themselves in the first week:
- Systematic Debugging — reproduce, hypothesize, verify with evidence, then fix. Unstructured debugging is where agent sessions burn the most time; this protocol ends the spiral.
- Test-Driven Development — red-green-refactor as an enforceable loop, so "write tests" becomes something Claude actually completes.
- Code Review and Quality — a checklist Claude applies to its own output and your PRs: correctness, edge cases, readability, and consistency with project conventions.
- Diagnosing Bugs — root-cause tracing through layers instead of patching the first suspicious line.
Drop the skill folder into ~/.claude/skills/ (global) or <project>/.claude/skills/ (shared with your team via git), restart Claude Code, and they're live.
9. Pre-approve the commands you trust
Instead of approving every Bash call or disabling permissions entirely, allowlist the commands you trust. Run /permissions, add patterns like Bash(npm run *) or Bash(git *), and check the result into .claude/settings.json so your whole team shares it:
{
"permissions": {
"allow": ["Bash(npm run *)", "Bash(npm test *)", "Edit(/src/**)"]
}
}Fewer interruptions, still auditable — much better than --dangerously-skip-permissions.
10. Delegate research to subagents
When you need to investigate — find all database connection sites, map how auth flows through the codebase — delegate it instead of doing it in your main session:
Use a subagent to find every place we create database connections
and report back the patterns used. Don't change any code.The subagent burns its own context and returns a summary. Your main window stays focused on the actual work. This is the single biggest context saver most people never use.
11. Turn repeated prompts into slash commands
If you type the same long prompt weekly ("review this PR for..."), stop. Save it as .claude/commands/review-pr.md and it becomes /review-pr — instant, consistent, shareable. Project-level commands live in the repo; personal ones go in ~/.claude/commands/.
Cost control: spend tokens where they matter
12. Match the model to the job
Not everything needs the biggest model. Switch mid-session with /model:
/model haiku # trivial edits, renames, formatting — fast and cheap
/model sonnet # the default; right for most work
/model opus # hard reasoning: tricky bugs, architecture decisionsA rename that costs full price on the top model costs a fraction on Haiku. Default to Sonnet, drop to Haiku for mechanical work, escalate to Opus only when you're stuck.
The 5-minute setup checklist
New machine or new repo? Do these once and every session gets better:
- Run
/initto generateCLAUDE.md, then trim it to facts only - Install the four workflow skills above into
~/.claude/skills/ - Allowlist your trusted commands in
.claude/settings.json - Save your two most-repeated prompts as slash commands
- Learn three keys: Esc (stop), double-Esc (rewind), Shift+Tab (plan mode)
FAQ
What's the single highest-ROI Claude Code tip? Context hygiene. /clear between tasks and deliberate /compact with a focus will improve results more than any model upgrade, because most degradation comes from polluted context, not model capability.
Do I need skills, or is CLAUDE.md enough? Different jobs. CLAUDE.md holds facts Claude needs every request; skills hold procedures it needs sometimes. A fat CLAUDE.md taxes every request, while skills load on demand. Move anything step-by-step into a skill.
How do I stop Claude from changing files I didn't ask about? Constrain the blast radius in the prompt ("touch only these files"), use plan mode for refactors, and set directory-scoped permissions like Edit(/src/**) in .claude/settings.json.
Are paid skills worth it? What you're paying for is testing: a trigger description that actually fires, steps that work across projects, documentation that explains why. Try a free skill first — if one saves a single debugging session, the math is obvious.
Conclusion: put these Claude Code tips to work
These 12 Claude Code tips and tricks share one theme: constraints make the agent smarter. Clean context, explicit plans, tight file scopes, lean memory files, and the right model for the job. Set up the checklist once, and every future session starts from a better baseline. When you're ready to go further, the catalog has workflow skills built for exactly these habits. ---
Put it into practice
Reading is step one. Browse hand-curated skills and prompts you can install and use in your AI workflow today.