Claude Code: Tips
2026-02-22 → 2026-08-09
Claude Code tips.
Principles#
Structure CLAUDE.md files with Progressive disclosure: keep the global file a set of thin pointers to per-repo CLAUDE.mds, so detail is read on demand instead of loaded every session. See Context engineering.
General tips#
Shift + Tabto cycle through normal, plan, and accept-edits mode.- Use
@to mention specific files. - Consider adding a concision prompt to the global
CLAUDE.md(Matt Pocock’s video: “Make Claude Code give you answers, not essays”). - Custom output styles for Opus 5 can make replies shorter and easier to scan. Ray Amjad’s
ELI5example asks for short sentences, only necessary results, no more than two choices, and exact paths and commands; the video also covers per-project styles.
Settings#
Permission modes#
bypassPermissions is intentionally excluded from the Shift+Tab mode cycle by default. If you’re comfortable using bypass permissions mode regularly, set it as your default in ~/.claude/settings.json:
{
"permissions": {
"defaultMode": "bypassPermissions"
}
}
With this config, Claude Code starts in bypass permissions mode, and Shift+Tab will include it in the cycle so you can freely switch between modes.
Preventing accidental file deletion#
Claude Code uses rm for file deletion, which is permanent. Combined with bypassPermissions, this can be dangerous. The fix: deny rm/rmdir in settings while keeping bypass mode, and use trash (macOS built-in) as the alternative.
In ~/.claude/settings.json:
{
"permissions": {
"deny": ["Bash(rm:*)", "Bash(rmdir:*)"],
"defaultMode": "bypassPermissions"
}
}
deny takes priority over bypass mode, so everything is auto-approved except destructive deletions.
In ~/.claude/CLAUDE.md, add:
- “Never use
rmto delete files. Always usetrashinstead.” - “When using
mv, always use-nflag to prevent silently overwriting existing files.”
mv without -n is also dangerous—Claude can rename multiple files to the same name, silently overwriting with no recovery.
(via @devdesign.kr)
Background jobs (Agent view): turn off worktree isolation when it’s overkill#
By default, Claude Code’s background-jobs / Agent view spawns each bg agent in its own git worktree. In small repos, non-git directories, or quick prototypes, that’s more friction than it’s worth—you end up fighting the harness every time you launch a bg agent.
In ~/.claude/settings.json:
{
"bgIsolation": "none"
}
This disables the forced worktree per background job, so agents run in place.
Running multiple sessions#
I used to run a tmux + Neovim pane per project, but dedicated agent multiplexers have made that setup obsolete: Herdr, Orca, cmux, the Codex app, and others manage many agent sessions with persistent state. (If you do pair tmux with Neovim, the one critical bit is auto-reloading externally edited files: vim.o.autoread + a checktime autocmd, and set -g focus-events on in tmux.conf.)
Reducing token usage#
MCP can use a lot of tokens. Turn on only when it’s needed.
RTK—CLI proxy that reduces LLM token consumption by 60–90% by filtering and compressing command outputs.
@atelic.io on Threads (Korean)—tips on reducing auto-inserted token traffic and capping tool output.
Tools#
- frontend-slides — create web-based slides using Claude’s frontend skills
- beautiful-html-templates — a library of reusable HTML slide templates (with an
AGENTS.md) so a coding agent can pick one and generate a deck
Collections#
- https://github.com/ykdojo/claude-code-tips
- https://adocomplete.com/advent-of-claude-2025/
- How I Use Obsidian + Claude Code to Run My Life
- everything-claude-code — agent-harness performance optimization: skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor, and others