Ops Command Center v3.2.1
AIA-CC-2024 Ready
Created Dec 23, 2024

10 Claude Code Best Practices I Wish Someone Told Me on Day One

Ten practices that transformed Claude Code from a novelty into my primary productivity tool. Each one addresses a mistake I made so you don't have to.

Tools
General
Joshua Schultz
-
Claude
Tags:
#claude code #ai tools #best practices #productivity #quick reference
Article Content

I’ve been using Claude Code daily for months now. These ten practices are the ones that transformed it from “interesting toy” into the tool I reach for first on every project. Each addresses a mistake I made — or watched someone else make — so you can skip the learning curve.

The common thread across all ten: reduce ambiguity, maximize clarity, and automate what you can. Claude Code is powerful. These practices help you use that power consistently instead of sporadically.

Ten Claude Code best practices grouped by category: Prompting, Workflow, Automation, Maintenance

1. Be Specific, Not Vague

This is the single highest-leverage change you can make.

Bad: “Add tests”

Good: “Write unit tests for user authentication covering successful login, failed login with invalid password, and account lockout after 5 failures. Use Jest, avoid mocks, test against real database.”

Specificity eliminates guesswork. More context upfront means fewer iterations. I’ve seen people spend 30 minutes going back and forth on something that one specific prompt would have nailed in 60 seconds.

2. Plan Before You Build

Always use the explore, plan, build, commit pattern:

  1. “Read the auth module, don’t write code yet”
  2. “Think hard about the best approach, create a plan”
  3. “Implement the plan we discussed”
  4. “Create appropriate commits”

This prevents wasted effort from misunderstood requirements. It sounds slower, but it’s dramatically faster because you catch wrong directions before they become wrong implementations.

3. Match Thinking Budget to Complexity

Thinking budget keywords control how much reasoning Claude applies:

  • think — basic analysis
  • think hard — moderate complexity
  • think harder — significant complexity
  • ultrathink — maximum thoroughness

Simple tasks don’t need thinking time. Complex architectural decisions do. Matching the budget to the problem saves time on easy tasks and improves quality on hard ones.

4. Clear Context Between Tasks

Use /clear between unrelated tasks. Better to clear too often than too rarely.

Old context from a previous task actively confuses new ones. I used to try to keep sessions going for hours. Now I clear aggressively and get better results. Fresh starts produce better output than stale, crowded context windows.

5. Let Hooks Handle Formatting

Don’t waste instructions telling Claude how to format code. Configure hooks instead:

{
  "hooks": {
    "PostToolUse": [{
      "matcher": "Edit|Write",
      "hooks": [{"type": "command", "command": "prettier --write $CLAUDE_FILE_PATHS"}]
    }]
  }
}

Hooks are deterministic — they run every time, correctly, with zero tokens consumed. Instructions are hopeful — they work most of the time. Automate what you can, and save instruction budget for things that actually need judgment.

👉 Tip: Anything that has a binary right/wrong answer — formatting, linting, type checking — should be a hook, not an instruction. Reserve your CLAUDE.md instructions for decisions that require reasoning.

6. Use Subagents for Verification

Have one Claude write, another review:

  1. Claude #1 writes the implementation
  2. /clear for fresh context
  3. Claude #2 reviews with fresh perspective
  4. Claude #3 makes fixes based on review

Fresh eyes catch what tired eyes miss — even artificial ones. This pattern catches bugs, inconsistencies, and missed edge cases that a single continuous session would sail right past.

7. Provide Visual Context for UI Work

For anything visual, provide screenshots:

  • Design mocks to implement
  • Current state for reference
  • Expected output comparison

Paste images directly or reference file paths. Visual context eliminates ambiguity that text descriptions can’t resolve. “Make the button bigger” means something different to everyone. A screenshot of what you want is unambiguous.

8. Reference Files by Exact Path

Use: “Update src/config/database.ts to add connection pooling”

Not: “Update the database config”

Explicit references prevent wrong-file edits. Use tab-completion to get exact paths. This seems minor until Claude edits the wrong file and you spend 10 minutes figuring out what happened.

9. Course Correct Early and Often

  • Press Escape to interrupt a direction you don’t like
  • Double-tap Escape to go back and retry
  • Ask for plans before implementation

Catching a mistake in progress is infinitely faster than fixing it after completion. Don’t let Claude run for three minutes in the wrong direction when you can see it going wrong in the first 15 seconds.

10. Iterate on Your CLAUDE.md Relentlessly

Treat it like prompt engineering:

  • Add one guideline at a time
  • Test if Claude follows it
  • Remove what doesn’t work
  • Add emphasis where needed (“IMPORTANT”, “NEVER”, “YOU MUST”)

Your CLAUDE.md affects every single session. Small improvements compound across every interaction. This is the highest-leverage optimization in your entire setup.

👉 Tip: Keep CLAUDE.md under 300 lines — 60 is ideal. Research shows LLMs reliably follow 150-200 instructions. Claude Code’s system prompt already uses ~50 of that budget. You’re working with the remainder, so make every line count.

Quick Reference

Essential Commands

CommandPurpose
/clearReset conversation
/compactCompress context, preserve decisions
/resumeContinue previous session
/rewindUndo to previous checkpoint
/project:nameRun project command

Keyboard Shortcuts

ShortcutAction
EscapeInterrupt current operation
Escape EscapeGo back, retry different approach
Shift+TabToggle auto-accept mode
#Let Claude update files automatically
TabFile path completion

CLI Flags

FlagPurpose
-p "prompt"Headless mode (no REPL)
-cContinue most recent session
--model opusUse Opus model
--agent nameUse specific agent

Continue reading:

Back to AI Articles
Submit Work Order