← Claude Code Hub
Apr 29, 2026 · 2 min read ✦ Tip #055

/init in Claude Code: way more than a CLAUDE.md template

By default `/init` generates a basic CLAUDE.md. With `CLAUDE_CODE_NEW_INIT=1` you unlock an interactive flow that also scaffolds skills and hooks by analyzing your repo, applying the rule "only include what Claude wouldn't infer on its own."

The two modes of /init: default generates a basic CLAUDE.md; with CLAUDE_CODE_NEW_INIT=1 it scaffolds a minimal CLAUDE.md + skills + hooks

/init is one of those built-in commands almost everyone runs once on day one and never again. And they're stuck with the poor mode: a generic CLAUDE.md that Anthropic itself considers deprecated under its current philosophy ("CLAUDE.md is loaded into every Claude Code session, so it must be concise — only include what Claude would get wrong without it").

The new flow goes further: it can also generate the project's first skills and hooks. More importantly, it applies discipline on CLAUDE.md from day one. If your CLAUDE.md is already full of junk, re-running /init with the new flow is the cleanest way to start over.

How it works internally

When you run /init, Claude Code loads one of two prompts depending on CLAUDE_CODE_NEW_INIT:

Mode Variable Description What it generates
Default (unset) "Initialize a new CLAUDE.md file with codebase documentation" Basic CLAUDE.md + note about /plugin
New CLAUDE_CODE_NEW_INIT=1 "Initialize new CLAUDE.md file(s) and optional skills/hooks with codebase documentation" Minimal CLAUDE.md + skills (optional) + hooks (optional)

The new mode is governed by a literal rule in the prompt: "CLAUDE.md is loaded into every Claude Code session, so it must be concise — only include what Claude would get wrong without it." That means: don't list package.json dependencies, folder structure, or language conventions — Claude infers those.

How to enable it

For a single session:

CLAUDE_CODE_NEW_INIT=1 claude

Then inside the session:

/init

Permanently in your shell:

echo 'export CLAUDE_CODE_NEW_INIT=1' >> ~/.zshrc

When to re-run it

/init is not "once and forget":

  • Major refactor: if you moved code to a monorepo, switched frameworks, or introduced new skills, re-init so CLAUDE.md and the hooks reflect the new state.
  • After removing deprecated code: if your CLAUDE.md describes a module that no longer exists, regenerating is cleaner than patching.
  • Before onboarding: a clean CLAUDE.md on day one shortens the ramp for new developers.

Bonus: /init-verifiers

There's a sibling command almost nobody knows about:

/init-verifiers

Generates skills specifically for automated verification of code changes. Useful when you want certain checks (linter, specific tests, type validation) to run consistently as auto-invocable skills after each edit.

Reference

Command Use it for
/init (default) Basic CLAUDE.md generated from automatic analysis
CLAUDE_CODE_NEW_INIT=1 + /init Minimal CLAUDE.md + skills + hooks
/init-verifiers Post-edit verification skills

Official docs: Claude Code commands

FREE GUIDE

You don't need Opus every time.

Model and effort are two settings, not one. 8 pages with the settings that actually move your bill, a three-question diagnostic for when something fails, and the price ladder.

  • 1. What "better" means capability, time and money
  • 2. Model who you send
  • 3. Effort how much rope you give
  • 4. Diagnostic three questions when something fails
  • 5. The bill where it comes from
Are you a professional Web developer?

It arrives by email · You join the Gravitas newsletter · Unsubscribe anytime

Stop overpaying in Claude Code
FREE GUIDE

You don't need Opus every time.

Are you a professional Web developer? · Unsubscribe anytime
Workshop for teams

Multiply your team's output without sacrificing quality: a 6 to 8 hour AI First workshop, online, on the Claude platform.

See the workshop

Using Opus for everything? See when you don't need it.