Back to blog
March 26, 2026Shadman Rahman

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.

Stay in the loop

New guides, templates, and tips. No spam. Unsubscribe anytime.