Yar Malik
HomeFree CourseResourcesStartupsPortfolioPartnershipsAbout
Join the community
Build a 1-Person AI Business with Claude/Claude's Memory: CLAUDE.md

Course 02 · Lesson 5 of 10

Creating Your First CLAUDE.md: Two Methods

There are two ways to create your CLAUDE.md file.

The first is automatic: Claude generates one for you using the /init command. This works best when you already have project files Claude can scan.

The second is manual: you create the file yourself. This works best for brand new projects or when you want full control from the start.

We will cover both.

Method 1: Let Claude Generate It with /init

The /init command tells Claude to scan your project folder, analyse what it finds, and write a starter CLAUDE.md based on what it discovers.

In the Desktop App: open Claude Code and navigate to your project folder using File then Open Folder. In the conversation window, type /init and press Enter. Claude will scan your project and create a CLAUDE.md file in the project root. Open the file to review what was written.

In the Terminal: open your terminal and navigate to your project folder by typing cd followed by the path to your project, then press Enter. Launch Claude Code by typing "claude" and pressing Enter. Type /init and press Enter. Claude creates the CLAUDE.md file and confirms when done.

What /init generates: Claude looks at your files and writes entries for what tech and tools it detected, what commands it found if any, and what the basic project structure looks like.

This is a starting point, not a finished product. Claude writes what it can figure out from the files alone. It does not know your preferences, your audience, or the things that have gone wrong. You need to add those yourself.

After /init runs, open the CLAUDE.md file and add the personal and project-specific sections covered in the previous lesson.

Method 2: Create It Manually

If you are starting a brand new project or prefer to write your own from scratch, create the file yourself.

Step 1: Create the file.

On Mac: open any text editor such as TextEdit, VS Code, or Cursor. Create a new file, write your content, and save it as CLAUDE.md directly into your project folder. Make sure the file is saved as CLAUDE.md and not CLAUDE.md.txt. In TextEdit, go to Format and select Make Plain Text before saving.

On Windows: open File Explorer and navigate to your project folder. Right-click, go to New, then Text Document. Rename the file to CLAUDE.md and make sure to remove the .txt extension completely. If Windows asks for confirmation when changing the extension, click Yes.

Using VS Code or any code editor: go to File, then New File, then Save As, and save it as CLAUDE.md in your project root folder.

Step 2: Write your content.

Start simple. You do not need to fill every section immediately. Even a few lines is better than nothing:

My Project

About:

What is this project

Preferences:

  • Keep code simple.
  • Ask before making big changes.
  • No external libraries unless I approve.
  • You will fill in the full detail using the six sections from the previous lesson.
  • Step 3: Save the file and start a new Claude Code session in that folder. Claude will read the file automatically from that point forward.

Creating your global CLAUDE.md

Your global CLAUDE.md needs to live in a hidden folder called .claude inside your home directory. Here is how to create it on each system.

On Mac: open Terminal by searching for it in Spotlight. Run this command: mkdir -p ~/.claude and press Enter. Then run: touch ~/.claude/CLAUDE.md and press Enter. Open the file in any text editor by running: open ~/.claude/CLAUDE.md and add your global preferences, then save.

On Windows: open File Explorer. In the address bar type %USERPROFILE%.claude and press Enter. If the folder does not exist, right-click, go to New Folder, and name it .claude. Inside that folder, create a new file named CLAUDE.md. Open it with Notepad, add your preferences, and save.

On Linux: open Terminal and run this command: mkdir -p ~/.claude && nano ~/.claude/CLAUDE.md and press Enter. Write your preferences inside the editor, then press Ctrl and X together, then press Y to confirm, then press Enter to save.

How to check your memory files are working

Once your CLAUDE.md files are in place, you can verify Claude is reading them by running the /memory command inside any Claude Code session.

Type /memory and press Enter. Claude will show you a list of all the memory files currently loaded in the session including your global and project-level CLAUDE.md files. If they appear in this list, they are being read correctly.

If something goes wrong

The most common issue is the file name. Make sure it is CLAUDE.md with all letters uppercase. Not claude.md, not Claude.md. The name is case-sensitive and Claude will not find a file with the wrong capitalisation.

The second most common issue is the file being in the wrong folder. The project CLAUDE.md must be in the root folder of your project, the same level as your main project files, not inside a subfolder.

If Claude is not reading your file, check both of these things first before anything else.

Your action right now

If you have an existing project, open it in Claude Code and run /init, then review the generated file and add any missing sections.

If you are starting fresh, create a blank CLAUDE.md file manually in your project folder with at least three lines of content using the method above for your operating system.

Then create your global CLAUDE.md at the .claude path for your system and add two or three personal preferences from the previous lesson.

Move to the next lesson. We are going to cover how your CLAUDE.md grows over time.

Stuck on file creation? Post in the community and tag Yar Malik.

PreviousTwo Levels of Memory: What Goes WhereNext lessonWhat to Put in Your CLAUDE.md: The Six Sections

Do it with other builders

Post your homework. Get unstuck.

Every course ends with homework. Post yours in Claude Codex Mastery, the community this course comes from, and get feedback from Yar and 400+ people building the same way.

Join the community · $29/mo
Claude's Memory: CLAUDE.md
  1. 1.The Memory System: What This Course Changes
  2. 2.Why Claude Forgets You: & Why That Costs You Time
  3. 3.What Is CLAUDE.md: And How Claude Reads It
  4. 4.Two Levels of Memory: What Goes Where
  5. 5.Creating Your First CLAUDE.md: Two Methods
  6. 6.What to Put in Your CLAUDE.md: The Six Sections
  7. 7.Building Your CLAUDE.md Over Time: The Right Way
  8. 8.Sub-Agents: Specialist Assistants in Claude Code
  9. 9.Course Summary: What You Now Know
  10. 10.Homework: Your CLAUDE.md in Action

Yar Malik

AI operator, educator, and founder building businesses around automation, media, and monetizable skills.

HomeAboutFree CourseBlogsPartnershipsCommunity

© 2026 Yar Malik. All rights reserved.