Development · Tip

Claude Code: What Works and What Doesn't

Practical rules and common mistakes for working with AI coding assistants.

A field-tested workflow guide by a daily practitioner outlining best practices for AI-assisted coding. It covers a structured Plan-Code-Review workflow and highlights common pitfalls like context dumping and vague prompting.

How it works

From u/Intelligent_Goat5960 on r/ClaudeAI: 'After months of running Plan → Code → Review every day, here's what works and what doesn't'

WHAT REALLY WORKS

- State GOALS in clear plain words — AI can't read your mind; write 1-2 lines on what and why before handing over the task (better to make points).

- PLAN before touching code — add a deeper planning layer, break work into concrete, file-level steps before you edit anything.

- Keep CONTEXT small — point to file paths (/src/auth/token.ts, better with line numbers too like 10:20) instead of pasting big blocks — never dump full files or the whole codebase.

- REVIEW every commit, twice — give it your own eyes first, then let AI reviewer catch the tiny stuff.

NOISE THAT HURTS

- Expecting AI to guess intent — vague prompts yield vague code (garbage in garbage out); architect first, then let the LLM implement. E.g. 'Make button blue', wtf? Which button? Properly target it like 'Make the 'Submit' button on /contact page blue'.

- Dumping the whole repo — (the worst mistake) huge blobs make the model lose track; models don't have great attention even with large context, even with MILLION token context.

- Letting AI pick — be clear with packages you want to use or are already using, otherwise AI ends up using any random package from its training data.

- Asking AI to design the whole system — don't ask AI to make your next 100M $ SaaS itself. (Do things in pieces)

What it's for

  • Structure prompts and context before generating code with Claude Code
  • Reduce hallucination and code drift by keeping AI context tight and specific
  • Establish a consistent code review workflow for AI-generated commits

Key points

  • Clear goal-setting guidance using plain language and 1-2 line objectives
  • Plan-first strategy that breaks work into file-level steps prior to editing
  • Context optimization advice recommending exact file paths and line ranges
  • Two-step commit review process combining human verification with secondary AI review
  • Breakdown of common mistakes including repo dumping and unconstrained package selection

Pricing

Free

Details

Type
Tip
Category
Development
Topic
AI Coding Tips
Open source
No
For
Software developers using Claude Code or similar AI coding agents
Tags
claude code, ai coding, prompt engineering, developer tips, code review

Why it was saved

  • @boringmarketer, 2 July 2025: Concrete, field-tested guidance on the Plan → Code → Review workflow with AI coding

Related

Updated