Project Onboarding
How /init bootstraps project understanding and generates CLAUDE.md
When a user runs /init, Claude Code analyzes the entire codebase—file tree, conventions, dependencies, and architecture—to generate a CLAUDE.md that gives every future session a head start. Two prompt variants handle modern structured setup and full-analysis legacy mode.
6 stepsonboardinginitproject-setup
Step-by-step breakdown
1
⌨️Modern /init prompt
/init NEW_INIT PromptThe new /init flow sets up CLAUDE.md and optionally configures skills and hooks, giving future Claude Code sessions a project-aware starting point.
Set up a minimal CLAUDE.md (and optionally skills and hooks) for this repo
Techniques
step-by-stepstructured-outputtool-use-guidance
2
⌨️Legacy /init (full analysis)
/init OLD_INIT Prompt3
🔧Map the project tree
Glob Tool4
🔧Find conventions
Grep Tool5
🔧Read key files
File Read Tool6
🔧Write CLAUDE.md
File Write Tool