Use `/init` to generate a `CLAUDE.md` file from a codebase or its design documentation. Claude Code automatically adds a repository’s `CLAUDE.md` to session context, giving future sessions project-specific guidance. section 5.4
For a useful first draft:
- Include the project’s purpose and practical details, such as how to run it locally and deploy it. section 5.5
- Choose a project-level file when the guidance should benefit everyone working in the repository. section 5.5
- Answer Claude’s follow-up questions and check its suggestions against authoritative project decisions; it may flag documentation discrepancies. section 5.5
A project initialization prompt
`/init - this repo will build out the whole app specced in the docs/design folder. we will use docker to run the stack locally, and package with helm for deployment to kubernetes` section 5.5
Listing 5.1 The CLAUDE.md file — a guide for AI agents joining the project
# CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## What this is CollabHub — team chat + collaborative canvas. Five Python backend services and a React SPA, specified in `docs/design/` and being built out from that spec. Run locally with Docker Compose; deploy to Kubernetes with Helm. **Read `docs/design/00-platform-conventions.md` before writing or changing any service code.** It is the authoritative cross-service contract (errors, pagination, auth, IDs, jobs, config, observability). Where a per-service doc disagrees with it, it wins. Per-service specs are `docs/design/01`–`06`.
Review a generated CLAUDE.md example with project context, operating guidance, and a directive to consult authoritative conventions before changing code. section 5.5
