Skip to main content
📋 Core Concept

CLAUDE.md Principles

Write effective project instructions that give Claude Code the context it needs to help you succeed.

What is CLAUDE.md?

A CLAUDE.md file lives in your project root and contains instructions that Claude Code reads before helping you. Think of it as your project's documentation specifically for Claude.

# Project structure
my-project/
├── CLAUDE.md ← Your instructions for Claude
├── src/
├── tests/
└── package.json

Essential Sections

📖

Project Overview

What is this project? What does it do? Keep it concise.

# My Project
A real-time chat app using WebSocket
🛠️

Tech Stack

Frameworks, languages, and key dependencies.

**Tech Stack:** Node.js + TypeScript + PostgreSQL
🎯

Core Policies

How should Claude work? Default behaviors and rules.

## Core Policies
- Execute directly, don't ask for permission
- Use parallel agents for exploration
- Test before committing
📁

Directory Structure

Help Claude understand where things are.

⚠️

Rules & Constraints

What Claude should never do automatically.

## Forbidden
- Never git push without asking
- Never modify prod config directly

Best Practices

Be Specific

Clear instructions reduce misunderstandings

Keep It Updated

Outdated info is worse than no info

Use Examples

Show, don't just tell

Think Global vs Local

Global rules in ~/.claude/, project-specific in CLAUDE.md

Learn More

Get templates, examples, and advanced patterns for writing effective CLAUDE.md files.