Claude Code Tip#01: Use /init Before You Start Coding
Why Context Matters More Than You Think
Imagine you just joined a new team. It is your first day. A colleague walks up and says
“Can you fix the authentication bug in the user service?”
You have no idea where the user service lives, what language the project uses, whether there is a test suite, or what the team’s coding style looks like. You could ask a dozen follow-up questions or worse, you could guess and get it wrong.
This is exactly the situation Claude is in when you open a project and immediately ask it to help with code. Without context, it is flying blind.
Your project might have dozens or even hundreds of files spread across multiple folders. Claude does not automatically know which files matter, what the project is trying to do, or how pieces connect to each other.
Here is the important part most people do not realise: giving Claude too much irrelevant context actually makes it less helpful, not more. It is like briefing a consultant with 500 pages of documents when only 10 pages are relevant. The signal gets lost in the noise.
Enter /init
The /init command is your starting point. When you run it, Claude reads through your codebase and builds an understanding of,
- What the project does , its purpose and overall structure
- How it is organised , key folders, entry points, important files
- What patterns it follows , naming conventions, coding style, how modules connect
- How to work with it , build commands, test commands, setup steps
Think of it like giving Claude a proper onboarding. Instead of starting every conversation from scratch, it already has a working mental model of your project.
Say you have a small web app , a recipe website you built in your spare time. It has a backend, a frontend, a database layer, and some config files. You open Claude Code and type:
“Add a search feature to the recipe list page.”
Without /init, Claude might ask which framework you are using, where the recipe data comes from, what your folder structure looks like, or how your existing API routes are set up.
With /init run first, Claude already knows it is a React frontend talking to a Node.js API, that recipe data comes from a specific service file, and that your existing routes follow a particular pattern. It can give you a targeted, accurate answer immediately.
What Happens After /init Runs
Once Claude finishes analyzing your codebase, it does not just hold that knowledge in memory and move on. It writes a summary to a file called CLAUDE.md and saves it in your project.
Think of CLAUDE.md as the briefing document Claude wrote for itself after its first day on the project. Every time you open the project again, Claude reads this file first so it does not start from zero.
The Three CLAUDE.md Files
This is where it gets interesting. There are actually three levels of this file, each serving a different purpose:
| File | Shared? | Purpose |
|---|---|---|
CLAUDE.md |
Yes , commit to source control | Generated by /init. Shared with the whole team. Contains the project summary, architecture notes, and coding patterns. Every engineer on the team benefits from it. |
CLAUDE.local.md |
No , stays on your machine | Your personal instructions and preferences for this project. Things like “always use my local Docker setup” or “remind me to run linting before commits”. Add this to .gitignore. |
~/.claude/CLAUDE.md |
No , global to your machine | Instructions you want Claude to follow across every project on your computer. Useful for personal habits like preferred coding style, language preferences, or output format. |
When Should You Run /init?
- At the start of any new session on a project you have not worked on with Claude recently
- When you first bring Claude into an existing project , before asking it to do anything
- After major restructuring , if you have reorganised folders, renamed modules, or changed the architecture significantly
You do not need to run it every single time if you are mid-session and the codebase has not changed. But as a habit, running /init at the start is a low-effort step that consistently improves the quality of Claude’s responses.
The Takeaway
/init is not a magic button , it is a setup step.
Think of it as the equivalent of saying: “Before we get started, here is what we are building and how it works.”
That one sentence changes everything.