What is CLAUDE.md?
CLAUDE.md is your AI's instruction manual. It lives in your project root and tells Claude who it is, what rules to follow, and how your codebase works. Without it, Claude starts every session from zero. With it, Claude behaves like a team member who already knows your conventions, stack, and preferences.
Writing Your First CLAUDE.md
Start with three sections: Identity (who Claude is on this project), Rules (non-negotiable standards like "always use TypeScript"), and Conventions (naming patterns, file structure, import style). Keep it under 100 lines. Claude reads the entire file at the start of every session, so every line counts.
Think of CLAUDE.md as the onboarding document you would give a new team member. The difference: Claude reads it perfectly every single time. No forgetting, no drifting. Write it once, enforce it forever.
Installing Skills
Skills are SKILL.md files — reusable instruction sets that teach Claude specific tasks. Want Claude to write better tests? Install a testing skill. Need consistent API design? Install an API skill. Skills live in ~/.claude/skills/ and load automatically when relevant tasks are detected.
Each skill is a markdown file with a trigger condition, step-by-step instructions, and quality standards. When Claude detects a matching task, it loads the skill and follows its playbook. You teach Claude once, and it executes consistently forever.
Setting Up Hooks
Hooks are automated actions that fire on specific events. Pre-edit hooks run safety checks before Claude modifies files. Post-commit hooks update memory after code changes. Session-start hooks restore context when you begin work. Hooks turn Claude from a reactive tool into a proactive system.
- PreEdit: Validate changes before they happen
- PostCommit: Update docs, run tests, notify team
- SessionStart: Load memory, check status, show briefing
Custom Slash Commands
Build your own commands like /morning, /deploy, or /review. Each command is a markdown file in .claude/commands/ that contains a prompt template. When you type the command, Claude executes those instructions. One command can orchestrate entire workflows.
Example: a /morning command that reads your memory file, checks your task board, reviews yesterday's commits, and gives you a daily briefing. Ten seconds to type, two minutes of automated context loading.
The Settings Hierarchy
Claude Code reads settings at three levels: Global (~/.claude/) applies everywhere, Project (CLAUDE.md) applies to one codebase, and User (CLAUDE.local.md) holds your personal overrides. Project settings are shared with your team. User settings are gitignored and private.
This hierarchy means your team shares consistent standards through CLAUDE.md while each developer keeps personal preferences in CLAUDE.local.md. Global settings apply across all your projects. Conflicts resolve in order: user overrides project, project overrides global.