One CLAUDE.md file controls how Claude Code behaves on your project

Placing a CLAUDE.md file in your project folder lets you set rules for how Claude Code writes code, responds, and handles risky actions. Users report it solved 90% of their recurring frustrations with the tool.

Claude Code is an AI tool that writes and edits code directly in your terminal. Out of the box it can be overly chatty, add unwanted comments, or make changes without asking first. CLAUDE.md is a plain text file you drop in your project's root folder — Claude Code reads it automatically every time it starts. You write your rules in plain language: 'never add comments', 'always confirm before deleting files', 'keep responses short'. The AI then follows those rules throughout the session. Users are calling well-crafted versions of this file 'God Mode' configs because they can reshape nearly every aspect of Claude Code's behavior in one place.

Key points

  • Create a CLAUDE.md file in your project's root folder and Claude Code will read it automatically
  • Write rules in plain language — no special syntax required
  • Useful rules include: no comments, confirm before deleting, short answers, specific coding style
  • You can have a different CLAUDE.md per project for per-project behavior
  • A global file at ~/.claude/CLAUDE.md applies rules across all your projects

Quick term guide

CLAUDE.md
A project instruction file that tells Claude Code how to work with the codebase.
repo
A project folder that stores code and related files.
port
A specific virtual door on your computer used by apps to send and receive information.
terminal
A text-based way to use a computer by typing commands.
responses
An OpenAI API feature for creating and handling model answers.
session
A continuous period of interaction between a user and a computer program.
config
Settings that tell a program how to work.
diff
A view that shows exactly what changed in the code.

Sources covering this story (5)

Read original