CLAUDE.md files give Claude Code persistent instructions for a project, your personal workflow or your organization. They load at session start as context, not enforced configuration. Rules can be split into .claude/rules/ files, optionally scoped to paths.
O que ela faz
Onde CLAUDE.md roda e o que acrescenta, segundo a documentação
Loads project instructions from ./CLAUDE.md or ./.claude/CLAUDE.md, shared via version control
Supports user-level ~/.claude/CLAUDE.md and private ./CLAUDE.local.md
Supports managed-policy CLAUDE.md for organization-wide instructions
Imports other files with @path/to/file syntax (max depth four hops)
Splits instructions into .claude/rules/*.md, with optional paths frontmatter for file-scoped rules
/init generates a starting CLAUDE.md from the codebase
Quando usar
Boa adequação
You re-explain the same build commands or conventions each session
A team wants shared coding standards in version control
An organization needs company-wide policies applied to all users
Não indicado para
Guaranteed enforcement: docs say to use a PreToolUse hook to block actions
Multi-step procedures or single-area instructions: use a skill or path-scoped rule
Como instalar o CLAUDE.md
Você precisa de: Claude Code
Create ./CLAUDE.md or ./.claude/CLAUDE.md in the project root
Add build/test commands, conventions and project layout, targeting under 200 lines
Or run /init to generate a starting file
Run /context and check the Memory files list to confirm it loaded
Add CLAUDE.local.md to .gitignore for personal preferences
Exemplo de configuração (da documentação oficial)
See @README for project overview and @package.json for available npm commands for this project.
# Additional Instructions
- git workflow @docs/git-instructions.md
Permissões e segurança
Notas de segurança dos mantenedores
Treated as context, not enforced configuration; use hooks to guarantee behavior
Managed policy CLAUDE.md cannot be excluded by users
Revise a fonte antes de conceder ao agente acesso a credenciais ou sistemas de produção. Documentamos o que os mantenedores informam; não auditamos o código.
Limitações
Longer files consume more context and reduce adherence; target under 200 lines
Contradicting instructions may be resolved arbitrarily
Imports do not reduce context cost, imported files also load at launch
Ferramenta de programação agêntica da Anthropic que lê sua base de código, edita arquivos e executa comandos pelo terminal, por IDEs, pelo app desktop ou pelo navegador.
O plano gratuito termina em: Não há plano gratuito: o Claude Code está incluído nas assinaturas pagas do Claude (Pro, Max, Team, Enterpris…