CLAUDE.md
CLAUDE.md is a project-level context configuration file for the Claude AI coding assistant, typically placed in the root directory of a code repository. Written in Markdown format, the file is used to provide Claude with project background, technical specifications, coding conventions, and specific instructions, enabling it to follow project-specific rules and context during code generation and development assistance, thereby improving collaboration efficiency and output quality.
Core Facts
The core carrier of Claude Code's Skills is the CLAUDE.md file, placed in the project root directory or a specific directory.
The design inspiration for CLAUDE.md comes from the concept of project-level configuration files such as .editorconfig and .eslintrc
Claude Code supports multi-level CLAUDE.md instruction files, including three levels: global (~/.claude/CLAUDE.md), project root directory, and subdirectory.
Timeline (last 90 days)
The CLAUDE.md/AGENTS.md file in the project repository contains two hard rules: PCSX2 must be credited, and no feature may be claimed to work without testing.
'DRMD file' is very likely a slip of the tongue or transcription error for a project-level instruction file such as CLAUDE.md.
CLAUDE.md and AGENTS.md are both project-level instruction files, read into context at the start of a session by frameworks such as Claude Code and Codex respectively, but different harnesses handle instruction priority differently.
Based on anecdotal observation, the author believes Claude models are more willing than GPT models to follow conciseness requirements in system instruction files (such as CLAUDE.md and AGENTS.md), but this has not been quantified.
Previously, when Claude saw only the beginning of an oversized CLAUDE.md, rules file, or @-referenced file in a subdirectory, it might overwrite the entire file; now the Write tool requires Claude to read the file in full or switch to in-place editing.
v2.1.311 fixes the issue where Claude saw stale MEMORY.md and CLAUDE.md content after automatic compaction; when the model's reply contains no summary, Claude Code typically requests a summary once more before replacing the conversation.
The author recommends clearing CLAUDE.md once every six months, observing how the bare model performs and then rebuilding it as needed, keeping only three types of information: who you are, what your goals are, and how you define "done".
Entering /init generates CLAUDE.md, and you can either attach a description or leave it blank to let Claude summarize on its own.
Claude Code's /init command can generate a CLAUDE.md file, which serves as project-level persistent memory and is automatically read at the start of each new conversation.
In test three, CLAUDE.md contained five rules (receipts in uppercase only, a test for every change, write a changelog, update the flag in the readme, no commits allowed); Claude Code read it automatically and completed the task in 23 seconds with all five rules followed; the homemade agent did not load it initially but discovered the file itself and followed all five rules within 20 seconds; after setting settingSources: project, the SDK loaded the file automatically.
40 more timeline events
All Facts (20)
The core carrier of Claude Code's Skills is the CLAUDE.md file, placed in the project root directory or a specific directory.
90%VerifiedThe design inspiration for CLAUDE.md comes from the concept of project-level configuration files such as .editorconfig and .eslintrc
80%VerifiedClaude Code supports multi-level CLAUDE.md instruction files, including three levels: global (~/.claude/CLAUDE.md), project root directory, and subdirectory.
80%VerifiedClaude Code's memory system is divided into three levels: session memory (short-term), project memory (via the CLAUDE.md configuration file), and global memory (cross-project user preferences).
80%VerifiedCLAUDE.md是Anthropic推出的Claude Code所支持的一种项目级配置文件
80%VerifiedCLAUDE.md supports multi-level configuration: the CLAUDE.md in the project root directory applies to the entire project, those in subdirectories can override or supplement higher-level configurations, and a global CLAUDE.md can be placed in the user's home directory.
80%VerifiedClaude Code's memory system simulates cross-session memory by writing key information to external files and injecting it into the context at the start of each session.
80%VerifiedCLAUDE.md文件让Claude Code在每次启动时自动读取项目规范,实现跨会话的记忆功能
80%VerifiedClaude Code 的 /init 指令可以扫描当前项目的文件结构并自动生成一份适合该项目的 CLAUDE.md
80%VerifiedAGENTS.md is a common naming convention that has emerged in the AI programming tools ecosystem, and tools such as OpenAI Codex and Cursor also recognize this file to varying degrees.
80%VerifiedAI programming assistant configuration files (such as CLAUDE.md and .cursorrules) are essentially an engineering practice of prompt engineering, solidifying scattered prompts into standardized files that can be version-controlled and shared across teams.
75%VerifiedAGENTS.md是一种新兴实践,开发者通过在项目根目录放置Markdown文件向AI编码代理传达编码规范、架构偏好和工作流程要求
70%VerifiedCLAUDE.md is Claude Code's persistent system prompt mechanism, which automatically injects the file's contents to the very front of the context at startup.
70%VerifiedClaude Code's official documentation explicitly states that it reads CLAUDE.md, not AGENTS.md.
65%VerifiedThe contents of CLAUDE.md are appended to the prompt, becoming the contextual foundation for every conversation.
65%VerifiedAs a project file, CLAUDE.md can be incorporated into the Git version control system, allowing team members to review and iterate on specification content via Pull Requests.
65%VerifiedClaude Code uses the CLAUDE.md file as its memory file, and Cursor uses the .cursorrules file.
65%VerifiedClaude Code's command files can be incorporated into a Git repository for version management, allowing team members to share the same set of workflows.
65%VerifiedThe claude.md file is the core configuration file for Claude Code projects and should include the tech stack, project structure, code style conventions, and prohibited items.
65%VerifiedClaude Code v2.1.277 added support for the AGENTS.md configuration file.
80%