Freeive

claude-code·Published 2026.06.01·Views 1

The First Command for a New Project: Teach AI "Our Code" with /init

/init analyzes a project and auto-generates a guide (CLAUDE.md). Learn how it organizes build, test, and structure so AI adapts fast, and how to use it for

You got a new project, but Claude does not know your code structure, so you got tired of explaining "this is here, the build works like this" from scratch every time. It would be nice to give that explanation just once. That is exactly /init. It scans the folder on its own and automatically creates a guide that says "this project has this structure."

Definition

/init is a command that auto-generates a guide (CLAUDE.md) for the current project. CLAUDE.md is a "project manual" that Claude reads automatically at the start of every conversation. It is like the work manual you give a new hire.

When you run /init, Claude scans the whole folder, grasps things like the build method, test tools, code structure, and frequently used patterns, and organizes them into this file. Then, from then on, Claude starts quickly with an understanding of your project without you explaining every time.

How to Use (by difficulty)

Basics — Basic Generation

In the project folder, type this into the chat box.

/init

Once you enter it, Claude starts analyzing the folder. The process of looking over the files scrolls on screen, and when done, a CLAUDE.md file with the project structure, build commands, etc. organized is created. The file is created inside the project folder.

Advanced — Including Rules Too

/init 한국어 주석 규칙도 넣어줘

If you write the rules you want after /init, it includes your rules in the guide on top of the auto-analyzed content. You can put your team's agreements like "use Korean comments" or "indent with 2 spaces" in from the start.

Deeper — Interactive Detailed Setup

CLAUDE_CODE_NEW_INIT=1 claude
/init

If you start Claude Code with the config value CLAUDE_CODE_NEW_INIT=1 (claude) and then run /init, it does not stop at simple analysis but operates in a detailed mode that asks step by step about skills and hooks (auto-run features) and shows you a proposal. It is an advanced method for when you want to set things up more thoroughly.

Real-World Example

Newly received outsourced code had an unfamiliar structure and I did not know the build method, so I was stuck. Before figuring it out one by one, I ran this first.

/init

Claude scanned the folder and made a CLAUDE.md that organized the structure and build/test commands, and I understood the project quickly just by reading that file. When I put that file in Git (Git — a code version control tool) and shared it with the team, a newly joined colleague could start from the same document. One /init became even an onboarding document.

Using It Further

  • First for every new project: Make it your first habit to have /init organize the structure as soon as you receive code.
  • Integrate other configs too: If there are existing config files like AGENTS.md or .cursorrules, it reads them and reflects them into CLAUDE.md.
  • Detailed mode: Set up step by step all the way to skills and hooks with CLAUDE_CODE_NEW_INIT=1.
  • Team sharing: Putting the created CLAUDE.md in Git lets every team member start with the same understanding, speeding up onboarding.

Tip: The CLAUDE.md made with /init is a starting point, not a finished product. If there are parts Claude frequently gets confused about while working, open the file with /memory and refine the rules. The more you grow it into a living guide, the smarter Claude gradually gets.

How Others Use It

Summary

The core fits in one sentence. When you get a new project, start with /init. It analyzes the folder and auto-creates a guide organizing structure, build, and test, so the AI starts quickly with an understanding of your project. Share the created file with the team to use it as an onboarding document too, and keep refining it with /memory.

Based on: Claude Code v2.1.154 (2026.05)

#ClaudeCode#init#CLAUDE.md#onboarding#vibe-coding#developer

Comments

Comments 0

Checking sign-in status…

Loading comments…

Recent

More notes.