liveBook · Manning

/init command

As explained in Claude at Work

The /init command is a Claude Code command that generates a CLAUDE.md file from an existing codebase or its documentation.

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

How Claude at Work covers it

How deep it goes
Shows prompt construction, shared-file selection, follow-up decisions, and review of documentation discrepancies.
Examples
Uses a design-doc-based app prompt specifying Docker for local use and Helm for Kubernetes deployment.
What it assumes
Assumes an existing codebase or design documentation; explains how CLAUDE.md supplies context to otherwise fresh sessions.
What you can do after
Configure future Claude Code sessions with shared project guidance and checked setup decisions.
How it connects
Connects Claude Code session context with CLAUDE.md, README files, and project design documentation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Claude at Work. The section links point to the parts of the book it draws on.