You may understand what CLAUDE.md is, but feel stuck on "so how do I actually make the first file?" It's quite simple. You don't need to fill it out perfectly — just start with one line. This article walks first-timers through actually creating their first CLAUDE.md in Claude Code. (If you want to know what CLAUDE.md is first, see What Is CLAUDE.md?)
Two ways to start
You can create your first CLAUDE.md two ways. If it's your first time, we recommend method A (/init).
Method A — the /init command (fastest, recommended)
The fastest way the official docs recommend is the /init command. Run Claude Code in your project folder and type /init; Claude examines your project (detecting build systems, test tools, code patterns) and automatically generates a starter CLAUDE.md.
- Run Claude Code in your project folder.
- Type
/init. - Claude examines the codebase (it may ask to run commands to read files — usually fine to allow).
- Open the generated CLAUDE.md and review and refine it to fit your needs.
Key point: the file /init makes is a "starting point," not a "finished product." Auto-detection catches visible patterns well but may miss the details only your team knows, so review and supplement it yourself.
Method B — create it by hand
For a very small project, or if you prefer to start by hand, create a file named CLAUDE.md in your project root and write in plain words. There's no required format. Markdown (plain text with headings and lists) is enough, and writing it concisely so both humans and Claude grasp it quickly is recommended.
Note that the filename is case-sensitive, so save it exactly as CLAUDE.md.
This short is plenty to start
Don't try to fill it perfectly — start with just one or two "things you kept re-explaining." Even noting your common commands and basic rules helps a lot.
# Project guide
## Commands
- Dev server: npm run dev
- Tests: npm test
## Rules
- Comments and explanations in Korean
- Do not modify the src/legacy folder
Even this gets read automatically at the start of every session, cutting repeated explanations like "how do I run tests?" or "can I touch this folder?"
Start small and grow it
CLAUDE.md isn't a document you finish in one go — it's a "living document." Whenever you catch yourself thinking "I'm explaining this again," add a line then.
- Create the file — via
/initor by hand. - Write a line or two — starting with common commands.
- Review and commit — check the content, and for a team project commit it to version control (Git) to share.
- Keep adding — a line at a time whenever repetition appears.
Good things to fill in first
- A one-line project intro — e.g., "a Next.js shop with Stripe payments."
- Common commands — build, test, run.
- Code style — indentation, naming, etc.
- Gotchas — files not to touch, unusual workarounds.
Since it gets messy when too long, move detailed procedures or content specific to one part into a separate doc or a Skill.
Summary
Making your first CLAUDE.md isn't hard. The fastest path is /init, and even by hand you can start with one line. Review and commit it, then grow it whenever repetition appears. To go deeper, continue with the complete CLAUDE.md guide and hands-on examples on this site.
This article summarizes public information from official Anthropic docs (code.claude.com/docs, claude.com/blog) for beginners. Commands and behavior can change with product updates, so check your actual screen and the official docs. This site is not an official Anthropic site.