Claude Code works fine out of the box. But you can do better. The gap between default Claude Code and your Claude Code is a handful of settings, a few hooks, and maybe ten minutes of setup.
Here are 10 customizations I've found to be the most useful. You don't need to edit config files for most of these. Tell Claude what you want, and it handles the setup. I'll show the prompt-first approach for each one, with the underlying JSON for when you want to understand what's happening or tweak things manually.
1. Set up the cc alias
This is how I start every Claude session. Open your ~/.zshrc (or ~/.bashrc if you use Bash) in any editor and add this line:
alias cc='claude --dangerously-skip-permissions'Or append it from the terminal without opening the file:
echo "alias cc='claude --dangerously-skip-permissions'" >> ~/.zshrcThen run source ~/.zshrc to load it in your current session. Every new terminal window will pick it up automatically after this.
Now you type cc instead of claude, and you skip every permission prompt. You can also pass -c for quick one-shot commands:
# Quick one-liner: generate a commit message
cc -c "write a commit message for the staged changes"
# Pipe in context
cat error.log | cc "explain this error and suggest a fix"I have a few more aliases that I reach for constantly:
# Start in plan mode for research (read-only, no edits)
alias ccp='claude --permission-mode plan'
# Resume the last session
alias ccr='claude --resume'The --dangerously-skip-permissions flag name is intentionally scary. It lets Claude run any command and edit any file without asking. Only consider this after a few months of daily use, when you fully understand what Claude Code can and will do to your codebase. I've used it long enough to make that call, but use it at your own risk.
2. Auto-compact before context degrades
Claude's context window is its working memory. As it fills up, Claude starts losing track of earlier details and quality drops. The default auto-compaction threshold is ~95%. By then, you've already lost coherence.
Just tell Claude:
Set my auto-compact threshold to 75% in my user settings
Claude will update ~/.claude/settings.json for you. Under the hood, it adds this:
{
"env": {
"CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "75"
}
}There's no consensus on the right number. 60-75% works well for most tasks, but if you're working on something that needs a lot of context, 85% gives Claude more room before compacting kicks in. Try a value and adjust based on how your sessions feel.
The two context commands to know are /clear (wipes everything, starts fresh) and /compact (summarizes history, keeps key details). Use /clear when switching to a completely different task. Use /compact when you're mid-feature but the conversation is getting long.
You can also tell Claude what to preserve during compaction. Add this to your CLAUDE.md:
When compacting, always preserve:
- Current file paths being edited
- Test failure messages
- Architecture decisions made this sessionThis way, when /compact runs (manually or automatically), the important context survives.
3. Write your personal CLAUDE.md
CLAUDE.md has more impact on Claude's behavior than any other customization. It's how you tell Claude what you care about, and it persists across every session.
Your personal CLAUDE.md lives at ~/.claude/CLAUDE.md and applies to every project. Just tell Claude what you want. For example:
Create my personal CLAUDE.md at ~/.claude/CLAUDE.md. I prefer pnpm over npm, types over interfaces, Vitest over Jest, and concise PR descriptions.
Claude will create the file. Here's roughly what you'd get:
# Global preferences
- Use pnpm, not npm
- Prefer types over interfaces
- When writing tests, use Vitest not Jest
- Keep PR descriptions concise — summary + test plan onlyKeep it under 50 lines. Instruction compliance drops sharply with length. Specific, concise rules ("use pnpm, not npm") get ~89% compliance, while vague instructions ("write clean code") hover around ~35%.
For project-level instructions, you can run /init to generate a CLAUDE.md in your repo. The output tends to be bloated though so trim it heavily and keep only what matters. For the full deep-dive on scoping, rules directories, and team-shared conventions, see how to write a great CLAUDE.md file.
4. Add a live status line
The status line is a shell script that runs after every Claude turn. It displays live information at the bottom of your terminal, like a dashboard for your session.
The fastest way to set one up is /statusline inside Claude Code. It'll ask what you want to display and generate the script for you.
If you'd rather build your own, here's the script I use. It shows the current directory, git branch with dirty status, and context usage color-coded by how full the window is (green < 50%, yellow 50-80%, red > 80%):
#!/bin/bash
input=$(cat)
# Extract data from JSON
cwd=$(echo "$input" | jq -r '.workspace.current_dir')
input_tokens=$(echo "$input" | jq -r '.context_window.current_usage.input_tokens // 0')
cache_creation=$(echo "$input" | jq -r '.context_window.current_usage.cache_creation_input_tokens // 0')
cache_read=$(echo "$input" | jq -r '.context_window.current_usage.cache_read_input_tokens // 0')
context_window_size=$(echo "$input" | jq -r '.context_window.context_window_size // empty')
current_dir=$(basename "$cwd")
# Git branch + dirty status
git_info=""
if git -C "$cwd" rev-parse --git-dir > /dev/null 2>&1; then
branch=$(git -C "$cwd" --no-optional-locks branch --show-current 2>/dev/null)
if [ -n "$branch" ]; then
if [ -n "$(git -C "$cwd" --no-optional-locks status --porcelain 2>/dev/null)" ]; then
git_info=" git:($branch)✗"
else
git_info=" git:($branch)"
fi
fi
fi
# Context usage with color coding
context_info=""
ctx_color=""
total_input=$((input_tokens + cache_creation + cache_read))
if [ "$total_input" -gt 0 ] && [ -n "$context_window_size" ] && [ "$context_window_size" -gt 0 ]; then
input_k=$(printf "%.0f" "$(echo "$total_input / 1000" | bc -l)")
window_k=$(printf "%.0f" "$(echo "$context_window_size / 1000" | bc -l)")
percentage=$(( (total_input * 100 + context_window_size / 2) / context_window_size ))
context_info=" ctx:${input_k}k/${window_k}k (${percentage}%)"
if [ "$percentage" -lt 50 ]; then ctx_color="\\033[32m"
elif [ "$percentage" -lt 80 ]; then ctx_color="\\033[33m"
else ctx_color="\\033[31m"; fi
fi
printf "\\033[36m%s\\033[0m" "$current_dir"
[ -n "$git_info" ] && printf "\\033[34m%s\\033[0m" "$git_info"
[ -n "$context_info" ] && printf "${ctx_color}%s\\033[0m" "$context_info"Then tell Claude:
Save the above script to ~/.claude/statusline-command.sh, make it executable, and set it as my status line in user settings
The script receives a JSON object on stdin with your session data. You can display whatever combination matters to you. Some people show the active model, others show cost-per-session.
Community tools like ccstatusline and starship-claude also offer pre-built templates if you don't want to write your own.
5. Auto-format on every edit
Every time Claude edits a file, your formatter should run automatically. Your code stays formatted every time.
Tell Claude:
Set up a PostToolUse hook in the project settings that runs Prettier on any file after you edit or write it
This creates a PostToolUse hook that fires after Edit or Write operations:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "npx prettier --write \\"$CLAUDE_FILE_PATH\\" 2>/dev/null || true"
}
]
}
]
}
}You can also chain other tools: linters, type checkers, or even a quick test run. Just add more entries to the hooks array. For example, you could run ESLint right after Prettier:
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "npx prettier --write \\"$CLAUDE_FILE_PATH\\" 2>/dev/null || true"
},
{
"type": "command",
"command": "npx eslint --fix \\"$CLAUDE_FILE_PATH\\" 2>/dev/null || true"
}
]
}Add this to your project's .claude/settings.json since formatters are project-specific. The || true at the end prevents hook failures from blocking Claude. You want formatting to be best-effort.
6. Customize the spinner verbs
While Claude thinks, the terminal shows a spinner with verbs like "Flibbertigibbeting..." and "Flummoxing...". You can replace them with whatever you want.
Tell Claude:
Replace my spinner verbs in user settings with these:
Under the hood, this adds to ~/.claude/settings.json:
{
"spinnerVerbs": {
"mode": "replace",
"verbs": [
"Hallucinating responsibly",
"Pretending to think",
"Confidently guessing",
"Blaming the context window",
"Consulting my imagination",
"Speedrunning your tech debt",
"Overthinking this",
"Apologizing in advance",
"Vibing with your codebase",
"Submitting my best guess"
]
}
}Use append instead of replace if you want your verbs mixed in with the defaults.
You don't have to provide a list either. Just tell Claude what vibe you're going for:
Replace my spinner verbs with Harry Potter spells
Claude will generate the list for you. It's a small thing that makes the wait more fun.
You can also customize the spinner tips (the helpful hints shown while waiting) with spinnerTipsOverride and toggle them with spinnerTipsEnabled.
7. Play a sound when Claude finishes
This one changed how I work with Claude Code. I kick off a task, switch to something else, and hear a sound when Claude's done. It sounds small, but you go from "sitting and waiting" to "multitasking and getting pinged."
You can set this up interactively with /hooks, or just tell Claude:
Set up a Stop hook in my user settings that plays the Glass sound when you finish responding. Use afplay on macOS.
Hooks are shell commands that execute automatically at specific points in Claude Code's lifecycle. The Stop hook fires when Claude finishes a response. Here's what Claude adds to ~/.claude/settings.json:
{
"hooks": {
"Stop": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "/usr/bin/afplay /System/Library/Sounds/Glass.aiff"
}
]
}
]
}
}afplay is macOS's built-in audio player. The sound files live in /System/Library/Sounds/.
Here are the macOS system sounds you can pick from. Swap the filename to use a different one.
Glass.aiff— clean, subtleSubmarine.aiff— deep, satisfyingPurr.aiff— gentleFunk.aiff— playfulPop.aiff— quick, snappyFrog.aiff— memorableHero.aiff— triumphant
You're not limited to system sounds either. The hook just runs afplay, which can play any .aiff, .mp3, or .wav file on your machine. Download any sound effect, save it to ~/.claude/sounds/, and use that path instead.
For the complete hooks reference including more patterns and gotchas, see Claude Code hooks.
8. Set your output style
Output styles control how Claude formats its responses. Run /config and select your preferred style, or tell Claude:
Set my output style to Concise
The built-in options are:
- Explanatory for detailed, step-by-step responses (good for learning)
- Concise for brief, action-focused responses (good for shipping)
- Technical for precise, jargon-friendly responses (good for deep work)
You can also create custom output styles as files in ~/.claude/output-styles/. You can create a "code-review" style that's terse and finding-focused, or a "documentation" style that's thorough and structured. Create a markdown file with YAML frontmatter defining the style, and it shows up as an option in /config.
Two other settings worth knowing. showTurnDuration displays how long each response took (useful for spotting when a model switch might help), and prefersReducedMotion tones down animations for accessibility.
Wrapping up
Start with one customization that solves your biggest annoyance. The cc alias (#1) is a popular starting point. Then work your way through the rest as you hit friction.
Most of these are a prompt away. Tell Claude what you want, and it'll set it up. Under the hood, everything lives in three places: your shell profile (aliases), ~/.claude/settings.json (global settings and hooks), and ~/.claude/CLAUDE.md (instructions). That's it.
Once you've got these basics dialed in, MCP servers are worth exploring next. They connect Claude to external tools like databases and browser automation (the Playwright MCP server is a good first one to try). But these 10 customizations cover what you'll use every day.
FAQ
Where do Claude Code settings live?
Three locations: ~/.claude/settings.json for your personal global settings, .claude/settings.json in your project root for team-shared settings (committed to git), and .claude/settings.local.json for personal project overrides (gitignored). Run /status to see which layers are active.
How do I track Claude Code costs?
Use /cost within a session for API spending (API key users) or /stats for usage against your subscription quota (Claude Max/Pro subscribers). For analytics across sessions, ccusage (npx ccusage@latest) provides breakdowns by model, project, and time period from local JSONL files. Menu bar apps like Usagebar give you always-visible tracking.
How do I reset Claude Code to default settings?
Delete or rename your settings files: ~/.claude/settings.json (user), .claude/settings.json (project), .claude/settings.local.json (local). Claude Code loads built-in defaults on your next session. If you only want to reset one scope, remove just that file.
Can I share my customizations with my team?
Yes. Commit .claude/settings.json and .claude/skills/ to your repository for project-level sharing. For broader distribution, create a plugin that bundles your settings, skills, and hooks, then share it via a marketplace. Use /plugin to browse and install existing plugins.
Builder.io visually edits code, uses your design system, and sends pull requests.
Builder.io visually edits code, uses your design system, and sends pull requests.