Creating Your First CLAUDE.md — Start with One Line

A beginner's walkthrough of actually creating your first CLAUDE.md in Claude Code. Covers auto-generating with /init, doing it by hand, a short minimal example, the start-small-and-grow flow, and what to fill in first.

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).

첫 CLAUDE.md, 두 가지로 시작할 수 있어요 방법 A — /init (추천·빠름) /init · Claude가 프로젝트를 스캔 · 빌드·테스트·패턴을 감지 · 시작용 CLAUDE.md 자동 생성 → 만든 뒤 검토·수정하면 끝 방법 B — 직접 만들기 · 프로젝트 폴더에 파일 생성 CLAUDE.md · 한 줄부터 직접 적기 · 형식 강제 없음 (마크다운) → 작게 시작해 점점 추가

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.

  1. Run Claude Code in your project folder.
  2. Type /init.
  3. Claude examines the codebase (it may ask to run commands to read files — usually fine to allow).
  4. 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.

처음엔 이렇게 짧아도 충분해요 완벽할 필요 없이, '매번 다시 설명하던 것' 한두 가지부터 # 프로젝트 안내 ## 명령 - 개발 서버: npm run dev - 테스트: npm test ## 규칙 - 설명과 주석은 한국어로
# 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.

작게 시작해 점점 키우세요 CLAUDE.md는 한 번에 완성하는 게 아니라 '살아있는 문서' 1 파일 만들기 /init 또는 직접 2 한두 줄 적기 자주 쓰는 명령부터 3 검토·커밋 팀과 공유 4 계속 추가 또 설명할 때마다
  1. Create the file — via /init or by hand.
  2. Write a line or two — starting with common commands.
  3. Review and commit — check the content, and for a team project commit it to version control (Git) to share.
  4. 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.

Keep reading

Have a question or want to share how you use Claude?

Join the community to share tips with other users, or explore more guides.