The gist
These are the techniques that turn Claude Code from a "smart assistant" into a "power tool." They're organized by level: start at 1 and work your way to 32. Commands and features are as of October 2026 (Claude Code version 2.1.289); for the current list of changes, see What's current.
🟢 Level 1: Basic hacks (1-10)
For those just getting started: this is the foundation
Hack 1: /init on every new project
What it does: scans your folder and generates a CLAUDE.md describing the architecture, conventions and key files.
# Open the project → type in the chat
/initWhy: instead of explaining "what this project is" to Claude every session, run /init once → Claude picks up the context automatically (text the AI can see). If the project is new, Claude helps you create CLAUDE.md from scratch.
The payoff: saves time on explanations in every session. Claude also reads an AGENTS.md file, and it can write down lessons from your corrections between sessions on its own (auto memory, managed with /memory).
Hack 2: Status Line, a mini dashboard in the terminal
What it does: adds a line to your terminal showing the model, % of context used and the session cost.
/statusline
# Example request:
# "Show the model, % of context, cost in USD"Why: you see in real time how much context is left, so you can head off context rot. You know how much money you're spending.
🪙 Token (a unit of text for AI): the unit AI uses to measure text. Roughly 1 token = 4 characters of English text.
Hack 3: Voice input (/voice)
What it does: Claude Code's built-in voice input (requires a Claude.ai account).
/voice
# Space = you talk → let go → it gets transcribedAlternative: Aqua Voice works in every app on your system, not just Claude Code. More in the lesson Voice tools.
Why: thoughts come faster than you can type. Especially useful for long prompts.
Hack 4: Keep the context small
The rule: don't load the whole codebase into the session. Give Claude only what the current task needs.
❌ Bad: /add-dir . (adds everything) ✅ Good: mention just the file you need with @: @src/components/Button.tsx
Why: the less noise in the context, the better the output. It's a simple rule most people ignore.
Hack 5: /context, find where your tokens are leaking
What it does: shows what's eating your tokens: a color map of the window with optimization tips.
/context
# A made-up example breakdown (the numbers are illustrative): system prompt 15%, tools 8%, MCP servers 22%, conversation 55%Why: if a session feels bloated, you diagnose the problem and fix it. The usual cause is too many MCP servers connected.
Hack 6: /compact at 60% context, /clear between tasks
The 60% rule:
/compact # compresses the history, keeping what matters
# When starting a new task (unrelated to the last one):
/clear # clears the context completelyWhy /clear instead of a new chat: CLAUDE.md stays, all the files stay. You don't start from zero, you just clear the history (you can bring back a past conversation with /resume).
Hack 7: Always start in Plan Mode
How to switch:
Shift+Tab # cycle through modes
/plan # enter plan mode with a commandWhat you get: Claude reads and explores but doesn't change files. It builds a plan and asks clarifying questions. When you like the plan, you switch to execute. Note: since version 2.1.283, Claude Code starts in auto mode by default, so you need to enter plan mode yourself.
📝 Prompt (your request to the AI): the instruction text you send to Claude.
The payoff, in the author's experience: fewer rounds of revisions. Claude does better on the first try when it plans before acting.
Hack 8: Give Claude a problem, not a command
❌ Bad: "Write a function to track growth" ✅ Good: "What's the best way for us to track user growth?"
Why: when Claude thinks through the approach itself, it explains its decisions and does better work. It's like plan mode, but at the level of thinking.
Hack 9: Make Claude ask questions
"Keep asking me questions until you're 95% sure you understand the task"
Why: 5 minutes of questions → saves 30 minutes of fixes. Claude lines up with what you actually want.
Pairs with Plan Mode: in Plan Mode this happens naturally. But you can force it in any mode.
Hack 10: Self-checking in to-do lists
What to do: add verification steps to the to-do list Claude creates.
Add to your prompt: "After each step, verify that it works before moving on to the next one. Don't move on until you're 95% sure."
What a good to-do list looks like:
☐ Create the Button component
☐ Check that Button renders without errors ← verification step
☐ Add a hover state
☐ Check hover in the browser ← verification step🟡 Level 2: Intermediate hacks (11-22)
For those already using Claude Code who want to move faster
Hack 11: Run subagents in parallel
🤖 Agent (an autonomous AI worker): a separate AI helper with its own context and task. A subagent is an agent launched by another agent.
In your prompt: "Use subagents for this task. Run 3 agents in parallel: - Agent 1: explores the architecture - Agent 2: writes tests - Agent 3: writes documentation"
How it works: each subagent has its own context. The main thread stays clean. Subagents work in parallel and then report back. They now run in the background by default.
Combo: subagents on Haiku (cheaper) + the main thread on Sonnet or Opus. Quality where you need it, savings where you don't. You can create a subagent by asking Claude or with a file in .claude/agents/.
Hack 12: Custom skills, automate your SOPs
# Create the file .claude/skills/code-review/SKILL.md
# Inside: a description (when to use it) and instructions for doing a code review
# To call it:
/code-review # slash command (by the skill's folder name)
# or
"run a code review" # Claude picks up the skill from its descriptionOld files in .claude/commands/ still work: commands have been merged with skills.
What to build: techdebt.md, security-audit.md, seo-check.md, performance-audit.md.
The big win: commit your skills to GitHub → the whole team uses the same SOPs.
Hack 13: Different models for different tasks
| Task | Model (as of October 2026) | What you get |
|---|---|---|
| Simple refactor | Haiku | the cheapest |
| Writing code | Sonnet | a balance of speed and price |
| Architecture decisions | Opus (the default on subscriptions) | high quality |
| The longest, hardest tasks | Fable (manually: /model fable) |
the most capability, more expensive |
| Subagents (background) | Haiku | cheaper |
Switch models with the /model command (for example, /model haiku) before a simple task
For current model names and prices, see What's current.
The rule: don't push Opus through hundreds of thousands of tokens when you only need a couple of facts.
Hack 14: Keep updating CLAUDE.md
After each session: "Write the new patterns and gotchas you found into CLAUDE.md"
What goes in it:
- New skills you've added
- Patterns that work / don't work
- Conventions you've set
- Known project issues
The length rule: about 200 lines max. If it keeps growing, it's time to clean it up.
Hack 15: CLAUDE.md routes to other files
# In CLAUDE.md: ## Code style See: @docs/style-guide.md ## Business context See: @business/context.md ## Current status See: @STATUS.md
Why: CLAUDE.md stays small. Claude knows where to look when it needs something. Tokens aren't spent on information that isn't needed right now.
Hack 16: Exit early and re-prompt
See Claude heading the wrong way?
→ Press Escape
→ Correct course
→ Re-promptThe rule: every token spent going the wrong direction is money thrown away. Steer firmly and early.
Hack 17: Push hard for better
"Not good. Try a more elegant approach" "I'm not happy with this. Try something completely different" "Give me three different solutions"
Why: Claude often produces a dramatically better result on the second try when it knows the first one wasn't good enough.
The key: once you get the better version, tell Claude to update the skill or CLAUDE.md so the mistake doesn't repeat.
Hack 18: /rewind for a quick rollback
/rewind
# Rolls the conversation and/or code back to an earlier point without starting over
# Aliases: /checkpoint, /undoWhen: you took a wrong turn in the middle of a session. /rewind → go back → try another path. Much faster than /clear and explaining the context all over again.
Hack 19: Hooks for notifications
# Claude Code → set up a hook:
"Send me a desktop notification with a sound when you finish a session"In practice: you run 5-10 sessions in parallel. A sound = one of them is done and waiting for input. No need to keep switching over to check.
Hack 20: Claude can see the screen, so use it
What it can do:
"Take a screenshot of the website and tell me what's wrong with the layout"
→ Claude takes a screenshot, analyzes it visually, points out problems
"Here's a screenshot of the error, what is it?"
→ Claude reads the error message from the imageWorkflow for websites: design → screenshot → fixes → screenshot → fixes → screenshot. Three passes before V1. V1 comes out much better.
Hack 21: Chrome DevTools through Claude
"Open the browser, go to localhost:3000, click the Register button and check whether there are any errors in the console"
What it can do: open a browser, navigate, click buttons, fill out forms, read the console. Not just a screenshot: full browser automation. For this there's the Claude in Chrome extension (out of beta in 2026) or the Chrome DevTools MCP server.
Uses: QA testing, scraping where there's no API (application programming interface), checking functionality after a deploy.
Hack 22: Cloning websites for inspiration
"Here's a screenshot of Stripe.com. Build a checkout page in the same style. DON'T copy it: take the design pattern and adapt it to our brand"
Important: you take the pattern, you don't copy it one-to-one. Claude recreates the design language without copying it literally.
Bonus: you can pass in actual HTML/CSS as inspiration for specific components.
🔴 Level 3: Advanced hacks (23-32)
For those who want to get the most out of Claude Code
Hack 23: Parallel sessions with Git worktrees
# Three parallel agents on one project without conflicts:
claude --worktree feature-auth
claude --worktree feature-payments
claude --worktree feature-dashboard
# When done, merge them like regular git branches
git merge feature-authWhy: three features at once. Each agent is isolated. No files getting overwritten. At the end, a standard git merge.
Hack 24: API endpoints instead of MCP when it makes sense
The rule: MCP (Model Context Protocol, the protocol for extending Claude) brings descriptions of its tools into the context. In newer versions Claude Code loads them as needed (tool search), and idle tools take up little space, but the problem hasn't gone away entirely. If you need just one operation, you can use a direct API call.
# MCP with Notion: 40+ tools in the context (thousands of tokens)
# If you only need to read one database:
# → Just hardcode the direct API endpoint
import requests
data = requests.get(
"https://api.notion.com/v1/databases/DATABASE_ID/query",
headers={"Authorization": f"Bearer {NOTION_TOKEN}"}
)The rule: MCP = when you need flexibility. Direct API = when you know exactly what you need.
Hack 25: /loop for recurring tasks
/loop
# Example requests:
"Every 5 minutes, check the deploy status and tell me if anything goes wrong"
"Remind me at 3:00 PM to check the team's PR"
"Monitor the error logs and warn me about every critical error"Limitation: /loop runs only while the session is open, and recurring tasks expire on their own after 7 days. For a schedule that lives apart from the session: Desktop Scheduled Tasks on your computer, or Routines in the cloud (/schedule; they run even when your computer is off; they need the Pro plan or higher and are in research preview).
The difference: /loop = one session with memory. Scheduled Tasks and Routines = a new session every time (no context memory). In detail: Loop vs Scheduled Tasks.
Hack 26: A VPS for always-on sessions
# Run Claude Code on a remote server
ssh user@server.com
claude # now running on the server
# When your laptop is closed, Claude keeps working
# SSH back in when you need to
# Control it through messaging bots (Telegram, for example)What it's for: long-running tasks (analyzing big datasets, monitoring, overnight automations). You're not tied to your local machine.
Bonus: if you've set up a Telegram bot (see the lesson Telegram bots with the Claude API), you can control the VPS session from your phone anywhere.
Hack 27: Remote Control from your phone
The feature: Claude Code lets you control local sessions from your phone or any browser.
1. Start a heavy task on your computer 2. Open the link on your phone 3. Keep steering from your pocket
Important: the code doesn't go anywhere; it stays on your machine. Only the connection runs through your phone.
In practice: you start a build at home → head out for coffee → at the café you check progress and give direction.
Hack 28: SQL analytics without SQL
# Connect the BigQuery CLI or any database CLI tool
bq --project_id=myproject
# Now ask in plain English:
"What were the top 10 revenue sources last quarter?"
"How many users signed up this week?"Claude translates natural language into SQL, runs it and returns the answer.
Works with any database CLI tool: MySQL CLI, psql, SQLite, BigQuery BQ.
Hack 29: Ultrathink, the maximum thinking budget
ultrathinkYou literally type the word ultrathink in your prompt, and Claude Code asks for deeper reasoning on that one request without changing the session's effort level. You set a lasting effort level with the /effort command.
When to use it:
- Architecture decisions
- Tricky debugging (after 2+ attempts)
- Large refactors
- When regular attempts give poor results
When NOT to use it: simple fixes, routine tasks; it's just extra cost.
Hack 30: Smart permission settings instead of --dangerously-skip-permissions
// .claude/settings.json
{
"permissions": {
"allow": [
"Bash(npm run *)",
"Bash(git add *)",
"Bash(git commit *)",
"Read(*)",
"Write(src/**)",
"Write(tests/**)"
],
"deny": [
"Bash(rm -rf *)",
"Bash(DROP *)",
"Bash(DELETE *)"
]
}
}Why not --dangerously-skip-permissions: the deny list takes priority over the allow list. You get the same speed and autonomy, but destructive commands are blocked.
Permission modes switch with Shift+Tab: Manual (the default value), acceptEdits, plan, auto, dontAsk, bypassPermissions. In auto mode, a separate classifier model checks actions. Rules are managed with /permissions.
Hack 31: Agent Teams, agents that talk to each other
How they differ from subagents:
| Subagents | Agent Teams | |
|---|---|---|
| Communication | Only with the main agent | With each other |
| Shared task list | No | Yes |
| Cost | Lower | Higher |
| Output | Independent reports | A cohesive result |
"Create an agent team to build a full-stack feature: - Architect agent: designs the structure - Backend agent: writes the API - Frontend agent: writes the UI - QA agent: writes the tests They should coordinate their work with each other"
When to use it: large projects where you need cohesive output. The agents divide up the tasks themselves and can check with each other.
Status: Agent Teams is an experimental feature, off by default (you turn it on in settings; see the documentation). For big migrations and audits there's another route too: dynamic workflows (/workflows), where a script launches many subagents and double-checks their results.
Hack 32: Context7 MCP, always up-to-date documentation
# Install
claude mcp add --transport http context7 \
https://mcp.context7.com/mcp
# In your prompt:
"Use Context7 to find the current Next.js documentation
on server components"The problem it solves: Claude is trained on data with a cutoff date. Functions may have been renamed, deprecated or changed. Context7 injects current documentation right into the conversation before Claude writes code.
Coverage: Next.js, React, MongoDB, PostgreSQL, Stripe, Supabase, and thousands of other libraries with version-specific docs.
Quick reference: all 32
| # | Hack | Level | Effect |
|---|---|---|---|
| 1 | /init on every project |
🟢 | Automatic context |
| 2 | Status Line in the terminal | 🟢 | See % of context and cost |
| 3 | Voice input /voice |
🟢 | Faster input for long prompts |
| 4 | Keep the context small | 🟢 | Better quality |
| 5 | /context, find token bloat |
🟢 | Diagnose problems |
| 6 | /compact at 60% |
🟢 | Head off context rot |
| 7 | Start in Plan Mode | 🟢 | Fewer iterations |
| 8 | Give a problem, not a command | 🟢 | Better thinking from Claude |
| 9 | Make it ask questions | 🟢 | 95% confidence before work starts |
| 10 | Self-checking in to-do lists | 🟢 | Verification at every step |
| 11 | Parallel subagents | 🟡 | Faster on big tasks |
| 12 | Custom skills | 🟡 | Automated SOPs |
| 13 | Different models for different tasks | 🟡 | Savings on simple tasks |
| 14 | Keep updating CLAUDE.md | 🟡 | Knowledge builds up |
| 15 | CLAUDE.md routes to files | 🟡 | Fewer tokens on context |
| 16 | Exit early, steer early | 🟡 | No wasted tokens |
| 17 | Push hard for better | 🟡 | Often better quality on the second try |
| 18 | /rewind for a quick rollback |
🟡 | No lost context |
| 19 | Hooks for notifications | 🟡 | Many parallel sessions |
| 20 | Screenshot loop | 🟡 | A better first version |
| 21 | Chrome DevTools through Claude | 🟡 | Browser automation |
| 22 | Cloning for inspiration | 🟡 | No generic AI look |
| 23 | Git worktrees in parallel | 🔴 | Several features at once |
| 24 | API instead of MCP when it makes sense | 🔴 | Token savings |
| 25 | /loop for monitoring |
🔴 | An autonomous watchdog |
| 26 | VPS for always-on sessions | 🔴 | Claude works without you |
| 27 | Remote control from your phone | 🔴 | Steer from anywhere |
| 28 | SQL analytics without SQL | 🔴 | Natural language → data |
| 29 | Ultrathink for hard tasks | 🔴 | Maximum reasoning |
| 30 | Smart permissions | 🔴 | Autonomy without risk |
| 31 | Agent Teams | 🔴 | Cohesive big projects |
| 32 | Context7 MCP | 🔴 | Always-current docs |
A power user's stack (where to start)
If you're just starting, set these up right now:
# 1. Context7, hack #32 (right away)
claude mcp add --transport http context7 https://mcp.context7.com/mcp
# 2. Set up the status line (hack #2)
/statusline
# 3. Turn on voice (hack #3)
/voiceNext week:
- Create 3 custom skills for your recurring tasks (hack #12)
- Set up permission rules (hack #30)
- Try your first worktree (hack #23)
A month from now:
- Launch your first Agent Team (hack #31)
- Set up a VPS for overnight tasks (hack #26)
- Automate monitoring with
/loop(hack #25)
Key takeaways
Hacks 1-10 = basic hygiene. Use them ALWAYS. They speed up your work and prevent most common problems.
Hack #29 (Ultrathink) + Hack #7 (Plan Mode) = "thinking mode." Indispensable for complex decisions. Overkill for routine work.
Hack #23 (Worktrees) + Hack #11 (Subagents) + Hack #31 (Agent Teams) = three levels of parallelism. Used well, it's parallelism close to a small team.
Hack #32 (Context7) noticeably improves code quality: Claude mixes up outdated APIs less often. Install it right away.
Next lesson
→ Security in Claude Code: .env, secrets and data protection
The mark stays in this browser only and is never sent anywhere. My progress