How to Customize Claude Code Terminal: Step by Step Guide
By Braincuber Team
Published on May 7, 2026
Vanilla Claude Code is already useful out of the box, but a customized terminal transforms it into a different tool entirely. This complete beginner guide and step by step tutorial walks you through exactly how to customize Claude Code in the terminal with permissions, CLAUDE.md, plan mode, /loop, hooks, /voice, and cost tracking. By the end of this tutorial, you will have seven powerful upgrades that pay off inside a week, each taking less than ten minutes to set up.
What You'll Learn:
- How to stop re-approving the same bash commands with permissions
- How to make Claude Code remember your project with CLAUDE.md
- When to use /compact vs /clear and how to rewind sessions
- How to plan hard tasks and choose the right model and effort level
- How to automate recurring checks with /loop and hooks
- How to track costs with /usage, /context, and /statusline
- Extra features: /voice, /teleport, and /btw commands
Why Customize Claude Code Terminal?
Out of the box, every new tool invocation asks you for approval. Fine the first time you run pytest. Annoying by the third. By the tenth, you're hammering Enter without reading the prompt. That's the worst of both worlds: you've trained yourself to ignore the safety check, and it's still slowing you down.
The version of Claude Code that someone with a customized terminal is using is a different tool. They've pre-approved the bash commands they trust, so Claude almost never asks for permissions. A CLAUDE.md sits in their project root, so Claude already knows their conventions the moment a session opens. And when a session starts to feel confused, the command they reach for isn't a restart.
This article is the gap between those two Claude Code setups, in seven upgrades. None of them takes more than ten minutes to set up, and each one pays back inside a week.
Prerequisite
If you've never opened Claude Code before, our main Claude Code guide is a better starting point. Everything below assumes you can already prompt and accept tool calls.
Upgrade 1: Stop Re-Approving the Same Commands
Out of the box, every new tool invocation asks you for approval. The fix is a .claude/settings.json file in your project root, with a permissions block that pre-approves the patterns you trust and blocks the ones you don't.
Defining Permissions in settings.json
Create a .claude/settings.json file with allow and deny rules:
{
"permissions": {
"allow": [
"Bash(pytest *)",
"Bash(uv run *)",
"Bash(ruff check *)",
"Read(~/.zshrc)"
],
"deny": [
"Bash(curl *)",
"Read(./.env)",
"Read(./.env.*)",
"Read(./secrets/**)"
]
}
}
Rules evaluate in a fixed order: deny first, then ask, then allow. The first match wins, so a deny rule always beats a later allow.
Mastering Scope and Wildcards
Three things trip people up the first time they write one of these:
Scope
A project .claude/settings.json overrides your global ~/.claude/settings.json. If you've allowed Bash(rm *) globally and a project denies it, the project wins.
Wildcards on Network Commands
Bash(curl http://github.com/*) looks restrictive but doesn't catch https://, options before the URL, redirects, or shell variable expansion. Deny Bash(curl *) outright, then use the WebFetch tool with WebFetch(domain:github.com) for allowed domains.
Whitespace
Bash(ls *) matches ls -la but not lsof. Bash(ls*) matches both. The space before the asterisk is doing real work.
Essential Keybindings
A few keybindings sit alongside permissions and are worth learning on day one:
| Keybinding | Action |
|---|---|
| Shift+Tab | Cycles permission modes (default, auto-accept, plan) |
| Esc+Esc | Opens the rewind picker |
| Ctrl+R | Reverse-searches your prompt history |
| Ctrl+U | Deletes from cursor to line start |
| Shift+Enter | Adds a new line inside the prompt |
Upgrade 2: Make Claude Code Remember Your Project
Each session starts with a fresh context window. By default, Claude doesn't remember that you use uv instead of pip. It doesn't remember that your tests live in tests/ and not test/. The fix is a CLAUDE.md file at your project root.
Three Layers of Persistent Context
There are three places Claude looks for context, stacked on top of each other:
| File | Location | What to Put Here |
|---|---|---|
| Project CLAUDE.md | ./CLAUDE.md | Package manager, test commands, directory layout, project conventions |
| User CLAUDE.md | ~/.claude/CLAUDE.md | Personal preferences, coding style, docstring format |
| Auto Memory | ~/.claude/projects/<project>/memory/MEMORY.md | Auto-written corrections (e.g., "we use snake_case here") |
Project CLAUDE.md ships with the repo and is the same for every contributor. User CLAUDE.md follows you across every project on your machine — put personal preferences here, not project facts. Auto-memory is written by Claude itself when you correct it during a session.
The fastest way to start is /init. Run it inside the project and Claude reads the codebase and writes a starter CLAUDE.md. Keep each CLAUDE.md under 200 lines — past that, the file starts eating noticeable context on every turn.
Upgrade 3: Stop Restarting Sessions When They Go Bad
The instinct, when a session starts to feel off, is to /clear and start over. It's the wrong instinct most of the time. Restarting throws away the file paths Claude has been editing, the failing test it was tracking, or the constraints you spelled out at the beginning.
When to Use Each Option
Once you see context rot signals (Claude re-asks for a file path, repeats rejected suggestions, loses track of branch), you have four options:
| Situation | Use This | Why |
|---|---|---|
| Context filling, task still going | /compact | Summarizes earlier turns, keeps session and task context alive |
| Switching to unrelated task | /clear | Empty context, fresh thread. Previous conversation stays in /resume |
| Claude repeating mistakes | /clear | Context is degraded. Clean session with better prompt beats patching |
| Went down bad path, want to undo | Esc+Esc → Restore | Jumps back to prompt checkpoint and restores file state |
Esc+Esc rewind picker is the one most people don't know exists. It opens a list of every prompt checkpoint in the session. Once you pick one, it offers three options: restore the conversation only, the code only, or both. "Restore code and conversation" is what most people want — a half-hour of bad turns can vanish without opening git.
Naming and Reopening Sessions
claude -n <name> starts a named session. /rename changes the name mid-session. Reopening goes through claude --continue (loads most recent) or claude --resume (opens interactive picker).
Upgrade 4: Plan the Hard Stuff, Cheap Out on Easy Stuff
The single biggest cost on a customized setup isn't the editor or the keybindings. It's matching the amount of compute you're spending to the difficulty of the task in front of you. Three tools work together: plan mode, /effort, and /model.
Using Claude Code Plan Mode
Plan mode tells Claude to think through an approach before touching files. A trick to make plans rock solid is a simple prompt: Red-team this plan from multiple angles using as many Opus 4.7 agents as you need. This launches multiple subagents to review the plan from multiple aspects.
| Method | Where to Enter | Best When |
|---|---|---|
| Shift+Tab (twice) | Mid-session, any time | Hands-on keyboard toggle |
/plan | Mid-session prompt | No task in mind yet |
/plan <description> | Mid-session prompt | Task is clear, skip two-step |
--permission-mode plan | CLI launch flag | One session, plan mode from start |
| "defaultMode": "plan" | settings.json | Every session defaults to plan |
Setting Appropriate Effort Level
Effort controls how much extended thinking Claude does on each turn. Five levels: low, medium, high, xhigh (persist across sessions), and max (session-only). The right default for everyday work is low or medium. Reserve high or xhigh for genuinely hard problems.
Choosing the Right Model
Model selection is where real cost savings happen. Key aliases: sonnet (daily driver), opus (hardest problems), haiku (speed), opusplan (Opus in plan mode, Sonnet in execution).
Cost Tip
If you're defaulting to Opus for everything, switching to Sonnet for the bulk of your day is the single biggest spend cut available to you. The cost gap between them is large enough that "I'll just use Opus to be safe" is the most expensive habit you can leave on autopilot.
Upgrade 5: Automate the Stuff You Do by Hand
Scheduled Tasks with /loop
/loop re-runs a prompt on a recurring schedule. Two shapes: /loop 5m <prompt> (runs every 5 minutes) or /loop <prompt> alone (cadence decided by model). Interval units: s, m, h, d, with one-minute minimum. Loops live for 7 days.
Examples: /loop 2m run the test suite and report failures (test watcher), /loop 10m check if staging deploy is green (deploy poll), /loop 1m tail last 50 lines of app.log (log tail during incidents).
Hooks for Guaranteed Automation
Hooks run shell commands at specific points in Claude's workflow, configured in .claude/settings.json. The reason to reach for a hook instead of CLAUDE.md instruction: CLAUDE.md is advisory, hooks are guaranteed to run.
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{ "type": "command", "command": "/path/to/lint-check.sh" }
]
}
]
}
}
Six events cover most cases: SessionStart (session begins), UserPromptSubmit (before Claude sees prompt), PreToolUse (before tool call), PostToolUse (after tool call), PreCompact (before compaction), Stop (after response). One gotcha: only exit code 2 blocks Claude. Exit 1 is treated as non-blocking error.
| Event | Fires When | Example Use |
|---|---|---|
| SessionStart | Session begins | Print git branch and last commit |
| PreToolUse | Before tool call | Block writes to migrations/ |
| PostToolUse | After tool call | Run linter after file edit |
| Stop | After response | Run test suite, append results |
Upgrade 6: Keep an Eye on What It Costs
Loops, long sessions, and Opus-by-default all burn tokens. Three commands make spending visible: /usage (plan tier, session totals, per-model breakdown), /context (visualizes context window as colored grid), /statusline (persistent bar at terminal bottom showing model, context %, rate-limit windows).
For longer-term tracking across sessions, npx ccusage is a community tool that aggregates token burn over time.
Upgrade 7: Three More Things Worth Knowing
/voice (Push-to-Talk)
Hold Space, speak, release — transcribed text lands in prompt. Great for walking and thinking out loud. Requires v2.1.69+.
/teleport
Pull a cloud session into your local terminal. Requires clean git state, right repo, same account, and pushed branch.
/btw (By The Way)
Ask a quick side question without breaking flow. Answer pops up in dismissible overlay, never enters conversation history.
Conclusion: Three to Start With
The fastest way to backslide is to try it all in a single day. Pick two or three, build muscle memory, and add the rest later:
Morning Setup
Tight project CLAUDE.md plus 2-3 wildcard permission rules in .claude/settings.json. You only feel it when the interruptions stop.
Mid-Session Habit
/compact vs /clear call and Esc+Esc rewind picker. Cue: when Claude re-asks for a file path it knew an hour ago.
Background Habit
One /loop for a recurring check that already takes your time. Once running, it pays back on its own.
Frequently Asked Questions
What is the difference between /compact and /clear in Claude Code?
/compact summarizes earlier turns and keeps the current task context alive, so use it when the context bar is filling up but you are still on the same task. /clear empties the context for an unrelated task or when Claude is repeating mistakes. Previous conversation stays available through /resume.
How do I stop Claude Code from asking for permission every time?
Add a permissions block to .claude/settings.json in your project root with allow and deny patterns. For example, allow Bash(pytest *) and Bash(uv run *) for trusted commands, and deny Bash(curl *) to block risky ones. Rules evaluate in deny-first order.
What does the Esc+Esc rewind picker do in Claude Code?
Press Esc twice to open a list of every prompt checkpoint in the current session. Pick one, then choose to restore the conversation only, the code only, or both. "Restore code and conversation" is the closest thing Claude Code has to undo for an entire session, and it works without touching git.
When should I use Opus, Sonnet, or Haiku in Claude Code?
Sonnet is the default daily driver for most coding work. Reach for Opus on the hardest problems where you want the smartest model. Haiku is the right pick when you want speed over depth. Switching from Opus to Sonnet for everyday work is the single biggest spend cut available.
How does the /loop command work in Claude Code?
/loop 5m <prompt> runs a prompt on a fixed interval (units: s, m, h, d, one-minute minimum). /loop <prompt> alone hands cadence to the model. Loops live for 7 days, fire one final time on day seven, then delete. Requires Claude Code v2.1.72 or later.
Need Help with AI Implementation?
Our AI experts can help you integrate Claude Code and other AI coding tools into your development workflow. From setup to advanced automation, we guide you through every step.
