# /init Command

> It writes a first CLAUDE.md by reading your project.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** /init, CLAUDE_CODE_NEW_INIT, Create CLAUDE.md

## Think of it like

It is like a kid who looks round the room, then writes the rules down.

## Definition

/init reads your project and writes a starting CLAUDE.md for it. Claude looks at the code and notes the build commands, the test steps and the habits the project follows. If a CLAUDE.md is already there, it suggests changes instead of writing over it. It also reads notes left for other AI tools and keeps the parts that help. Then you add what Claude could not find on its own.

## Example

Jack opens Claude Code in an old project for the first time. He runs /init, and a minute later CLAUDE.md lists how to build, test and lint it.

## Example code

```console
/init
```

Write a starting CLAUDE.md for this project.

## Why it matters

Each new session starts out knowing how this project is built and tested.

## Common mistake

Leaving the file as /init wrote it. It only finds what the code shows. The rules in your head still have to be added by hand.

## Three principles

- **Reads the project.** Build, tests, habits.
- **Writes CLAUDE.md.** Or suggests changes.
- **You finish it.** Add what it missed.

## Related terms

- [CLAUDE.md](https://learn.benibix.com/term/ai/claude-md)
- [CLAUDE.local.md](https://learn.benibix.com/term/ai/claude-local-md)
- [/import Command](https://learn.benibix.com/term/ai/import-command)
- [Auto Memory](https://learn.benibix.com/term/ai/auto-memory)

## Taught in

- [Setup and Config Commands](https://learn.benibix.com/learn/ai-claude-code-commands/setup-and-config-commands): Claude Code Commands, 9/17

![/init reads the project: its build files, its tests and any notes from other tools. Then it writes a CLAUDE.md with what it found.](https://learn.benibix.com/diagrams/cmd-init.svg)

---

Source: https://learn.benibix.com/term/ai/init-command
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
