Most developers use Claude Code like a chatbot. Type a question, get an answer, copy the result.

That is maybe 20% of what it can do.

Here are 5 tricks that change how you work.

1. The ! Prefix — Run Shell Commands Instantly

Type ! before any shell command in the chat and Claude runs it immediately — and reads the output.

! git log --oneline -5
! npm test
! docker ps
! cat package.json

Claude sees the result as part of your conversation. No copy-pasting terminal output into the chat. No switching windows.

This is especially useful when debugging. Instead of running a command, copying the error, and pasting it back — just type ! npm run build and Claude reads the error directly.

2. CLAUDE.md — Persistent Project Memory

Create a file called CLAUDE.md in your project root. Claude reads it automatically at the start of every session.

## Tech Stack
React 19, TypeScript, PostgreSQL, Prisma

## Commands
- Dev server: npm run dev
- Tests: npm test -- --watch
- Build: npm run build
- Lint: npm run lint

## Code Style
- Short functions, one responsibility each
- No any types in TypeScript
- Error messages must be user-readable

## Never
- Add console.log in production code
- Use var
- Mutate function parameters

Without this file, you explain your project to Claude at the start of every session. With it, Claude already knows your stack, your commands, and your rules before you type the first message.

Put your CLAUDE.md in version control. Your whole team benefits.

3. Hooks — Automation That Cannot Be Skipped

Hooks are shell commands that run automatically when Claude takes an action.

You configure them in ~/.claude/settings.json:

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|Write",
        "hooks": [
          {
            "type": "command",
            "command": "npm run lint:fix"
          },
          {
            "type": "command",
            "command": "npm run format"
          }
        ]
      }
    ]
  }
}

This runs lint:fix and format automatically after every file Claude edits.

The key difference from just asking Claude to lint: prompts can be ignored, hooks cannot. If you tell Claude “always run tests after changes,” it sometimes forgets. Hooks run every time, guaranteed, even if the model decides to skip a step.

Common hook uses:

  • Auto-format after every file edit
  • Run the test suite after changes to test files
  • Block dangerous commands before they execute (PreToolUse hook)
  • Log every file Claude touches

4. Git Worktrees — Parallel Claude Sessions

When you run Claude in a git worktree, it works on an isolated branch without touching your main working directory.

# Start Claude in an isolated worktree
claude --worktree feature/auth

# Or from inside Claude Code
/worktree feature/auth

The real power: run multiple Claude sessions simultaneously on different features.

# Terminal 1
claude --worktree feature/auth

# Terminal 2
claude --worktree feature/payments

# Terminal 3
claude --worktree feature/notifications

Three features being built at the same time. Each Claude session has its own branch. No merge conflicts during development because they never touch the same files at the same time.

When you are ready, review and merge each branch normally.

5. /batch — One Engineer, Team Output

/batch is a built-in skill that breaks a large task into parallel sub-agents.

/batch Refactor the entire authentication module to use the new JWT library

Claude decomposes this into 10–30 independent units, spins up one sub-agent per unit in an isolated git worktree, and each agent works independently. They run in parallel. When done, each agent opens a PR.

What used to take a full day of work can finish in 20 minutes.

/batch works best for:

  • Large refactors with independent files
  • Writing tests across many modules
  • Updating import paths after a rename
  • Migrating from one library to another

For tasks where order matters or files depend on each other, use a single session instead.

Bonus: The /compact Command

When Claude’s context window gets full, it slows down and starts making mistakes. Run /compact to summarize the conversation and free up space — without losing your session history.

Do this proactively at 70–80% context usage for best results.

Combining These Tricks

The real productivity jump comes from combining them:

  1. CLAUDE.md defines your project rules once
  2. Hooks auto-format and lint every edit
  3. Worktrees let you run 3 parallel sessions
  4. ! gives each session direct terminal access
  5. /batch handles the big refactors

This is how solo developers build at team speed in 2026.

What’s Next?