5 Claude Code Hacks — Cheat Sheet
The Cheat Sheet

5 Claude Code hacks, one page.

You came from the Instagram post. Here's every command, every config, every shortcut. Print it, pin it, save it to your dotfiles. Whatever turns it into muscle memory fastest.

HACK 01Never lose your context

Pick up any past Claude Code session exactly where you left off. Full history restored, no re-priming, no re-pasting your CLAUDE.md.

# Resume the most recent session claude --resume # Or pick from a list of recent sessions claude --resume --pick
  • Works across days — your sessions persist beyond a single terminal
  • Useful for long projects where you context-switch mid-task
  • Pair with CLAUDE.md so the resumed session also has your project rules loaded

HACK 02Build your own shortcuts

Slash commands are just markdown files. Drop one in your project, and you have a reusable prompt callable from anywhere.

# Make the file mkdir -p .claude/commands echo "Review this PR for security issues, performance, and naming" \ > .claude/commands/review.md # Then in Claude Code: /review
  • Name it whatever you want — the filename becomes the command
  • Use $ARGUMENTS in the markdown to accept input
  • Store team-wide commands in ~/.claude/commands/ instead of the project
  • The 10 prompts you type every day belong in here

HACK 03Make Claude auto-run on triggers

Hooks fire bash commands whenever Claude does something — finishes an edit, stops a task, prompts you. Format-on-edit, test-on-commit, ping-on-stop all become automatic.

# settings.json → hooks { "hooks": { "PostToolUse": [{ "matcher": "Edit|Write", "command": "prettier --write \"$CLAUDE_FILE\"" }], "Stop": [{ "command": "osascript -e 'display notification \"Claude is done\"'" }] } }
  • PostToolUse fires after every Edit/Write/Bash — perfect for formatters and linters
  • Stop fires when Claude finishes a turn — use for desktop notifications or Slack pings
  • PreToolUse can block dangerous commands before they run
  • Project-level .claude/settings.json overrides user-level — version-control it

HACK 04Plug in real superpowers

MCP servers turn Claude into a multi-app agent. One command adds Notion, Slack, GitHub, your calendar, whatever — Claude can read and write across all of them in a single turn.

# Add a server from the Anthropic registry claude mcp add notion # Or add any MCP-compatible server claude mcp add my-server -- npx -y @owner/server # Then list what Claude can talk to claude mcp list
  • Start with Notion + Slack + GitHub — covers 80% of knowledge-worker workflows
  • Scope matters: --scope user persists across all projects, --scope project stays local
  • You can build your own MCP server in ~50 lines if no one has built one for the tool you need
  • Browse the public registry first — most popular tools already have community servers

HACK 05Run agents in parallel

The Task tool spawns subagents that run concurrently, each with its own context window. Research, code, and review can happen at the same time instead of one after another.

# Tell Claude to delegate the work > Spin up 3 subagents in parallel: 1. researcher — find every existing pricing page in our repo 2. designer — propose 3 layouts based on the research 3. reviewer — critique each layout against our brand rules Synthesize their reports into a single recommendation.
  • Each subagent gets its own context window — long research doesn't pollute your main session
  • Use specialized subagent types (researcher, coder, reviewer) for cleaner divisions of labor
  • Roughly 5x faster than sequential for parallel-friendly work
  • Pair with hooks: spawn subagents on a PR trigger, post their results to Slack on Stop

Want me to build this for your stack?

If setting these up yourself feels like a week of yak shaving you don't have time for, I build custom Claude Code configurations for teams who want to move faster without the trial-and-error tax.

Book a call →

— Mike