10 Battle-Tested Claude Code Practices (From a 20K-Star GitHub Repo)

10 Battle-Tested Claude Code Practices (From a 20K-Star GitHub Repo)

A GitHub repository called "claude-code-best-practice" hit 20,000 stars on GitHub Trending this week, and a developer named Evan Dong distilled its top ten practices into a hands-on post verified against production workflows. The most immediately actionable: keep your CLAUDE.md file under 60 lines. It sounds arbitrary, but the reasoning is concrete — frontier LLMs reliably follow roughly 150 to 200 instructions, and Claude Code's own system prompt already consumes about 50 of that budget. If your CLAUDE.md is sprawling, the instructions toward the end are effectively invisible. The fix is to split overflow rules into .claude/rules/ files loaded on demand, and to wrap your most critical constraints in XML tags to improve parsing reliability.

Two other practices stand out as genuinely underused. The AskUserQuestion interview pattern involves asking Claude to interview you about a complex feature before writing a single line of code — then starting a completely fresh session for execution. The interview context is useful for requirements gathering but it clutters the execution context, and a clean session produces measurably better output. The second is proactive use of Plan Mode: Shift+Tab twice puts Claude into a research-only mode where it explores the codebase and surfaces a plan without touching any files. Most users skip this step and pay for it in revisions later.

The 60-line CLAUDE.md constraint is backed by Boris Cherny, Head of Claude Code at Anthropic, in his own public guidance. That it's still being violated by most users — and that violating it doesn't produce obvious errors — makes it one of the more important invisible failure modes in the ecosystem right now. If your Claude Code sessions have been producing inconsistent results on complex tasks, checking your CLAUDE.md length is a faster diagnostic step than most developers realize.

Read the full article at DEV Community →