My personal notes for Claude Code - Best Practices for Agentic Coding

An article by Boris Cherny from Anthropic Engineering

Workflows

Workflows are powerful, repeatable patterns that allow you to get much better results from LLMs. Here are a few battle-tested approaches:

  • Plan → Code → Commit: Understand the problem and plan the approach before implementation to reduce unnecessary changes.
  • Write tests → Commit → Code → Iterate → Commit: Start with failing tests to ensure proper coverage and validate test behavior.
  • Write code → Screenshot → Commit: Iterate on visual work by comparing screenshots until they match design mocks.
  • Create checklist → Implement checklist items one-by-one: Break complex tasks into steps, completing each before moving forward.
  • Verify/code review: Use a separate agent for code review to get fresh perspective on implementation.

Quick Tips

Some other tips worth remembering:

  • Use double <escape> to rewrite a previous prompt.
  • Claude tends to work better if you have it generate a checklist of tasks, and then go through and implement them one-by-one. This works even better if you have it use a markdown file with the scratchpad.
  • Use git worktree to have Claude work on multiple tasks in parallel.