7 CLAUDE.md Sections Every Project Needs
Not all CLAUDE.md files are created equal. These 7 sections separate a useful config from a game-changing one.
Everyone knows they need a CLAUDE.md. But most people write three lines and call it done. Here are the 7 sections that actually matter.
1. Tech Stack Declaration
List your framework, language version, and key libraries. This alone eliminates 50% of wrong suggestions. "Next.js 16, TypeScript, Tailwind CSS 4, Drizzle ORM." Done.
2. Coding Conventions
Tabs or spaces? Named exports or default? Functional components only? Put it here. Claude Code follows whatever you write. If you don't write it, you get a coin flip every time.
3. File Structure Map
Tell Claude Code where things live. src/app/ for routes, src/components/ for UI, src/lib/ for utilities. It stops creating files in random places.
4. Communication Style
This is the underrated one. "Be direct. No fluff. Code first, explain only if asked." Or "explain your reasoning step by step." Claude Code adapts to whatever voice you want.
5. Build and Run Commands
List your dev server command, build command, test command, and deploy command. Claude Code can then run them without asking you what to type.
6. Session Lifecycle
Tell Claude Code what to do at the start and end of each session. "Read the latest handoff. Check git status. At the end, write a handoff to .claude/handoffs/." This is how you get continuity.
7. Forbidden Patterns
What should Claude Code NEVER do? "Never use any type. Never suppress lint rules. Never commit directly to main." Guardrails prevent disasters before they happen.
Start with these 7. Add more as you discover your own patterns. The CLAUDE.md deep dive covers the full five-layer architecture.
Related Posts
CLAUDE.md Is Not Optional
Skipping CLAUDE.md is like hiring a developer and never telling them about the project. Stop doing it.
4 MCP Servers Every Developer Should Connect First
MCP turns Claude Code from a coding assistant into an orchestration layer. Start with these 4 servers and you'll never go back.
3 Skills You Can Build in Under 10 Minutes
Claude Code Skills sound complex. They're not. Here are 3 you can build right now in under 10 minutes each.
Stay in the loop
New guides, templates, and tips. No spam. Unsubscribe anytime.