Starting Claude Code & Initializing CLAUDE.md
Everything is set up. Your repo is cloned, Supabase is configured, and your environment variables are in place. Now it's time to actually open Claude Code and start building.
Opening Claude Code in your project
In your terminal, navigate to your project folder and launch Claude Code:
cd ~/repos/your-repo-name
claude
Claude Code will start and show you an interactive prompt. From here on, there are two places you'll be typing commands:
- Your terminal — for running shell commands like
npm installornpx supabase login. These are shown with thebashlabel. - Claude Code — for giving Claude instructions in plain English. These are shown with the
Claude Code promptlabel.
Make sure you know which one you're using at each step.
Keep Claude Code running throughout a work session. When you want to start a new task, just type your next instruction. Type /exit when you're done for the day.
What is CLAUDE.md?
CLAUDE.md is a special file that Claude Code reads at the start of every session. Think of it as a briefing document — you write down what your project is, how it's structured, what conventions to follow, and any rules Claude should always respect. Claude will refer back to it automatically so you don't have to repeat yourself every time.
A good CLAUDE.md makes Claude a better collaborator on your specific project.
Initializing CLAUDE.md
Claude Code can generate a starter CLAUDE.md for you based on your project. Type this inside Claude Code:
Claude Code prompt:
/init
Claude will scan your project folder and create a CLAUDE.md with basic information about what it found. Because your project is still empty (just a README), the generated file will be minimal — that's fine. We're about to fill it in.
Defining your project in CLAUDE.md
Now tell Claude what you're building. Adapt the prompt below to describe your app idea:
Claude Code prompt:
Update CLAUDE.md to describe this project. It is a [describe your app] — a private web app for [what it does].
The tech stack is:
- React with Vite for the frontend
- React Router for client-side routing
- Supabase for the database and authentication
- GitHub OAuth for login (already configured in Supabase)
- Tailwind CSS for styling
- Supabase CLI (linked to the project) for running database migrations
Key rules to always follow:
- Every database table must have Row Level Security (RLS) enabled
- Every protected page must check for an active Supabase session before rendering
- Never expose data from one user to another
- Use environment variables for all secrets and keys
- Write all database changes as SQL migration files in supabase/migrations/ and run them with `npx supabase db execute` — never ask the user to paste SQL into the dashboard manually
Claude will update CLAUDE.md with this description. Every future Claude Code session in this project will start by reading this file, so Claude always knows the context.
The more precise your CLAUDE.md, the less you have to explain later. Stating your stack upfront means Claude won't suggest the wrong libraries. Stating your security rules means Claude will apply them automatically instead of waiting for you to catch a mistake.
Review what was written
After Claude updates the file, open CLAUDE.md in any text editor and read through it. Make sure it accurately reflects your project. You can edit it directly anytime — it's just a Markdown file.
What's in a good CLAUDE.md?
Here's what matters most at this stage:
| Section | What to include |
|---|---|
| Project purpose | What the app does in one or two sentences |
| Tech stack | Every major library and service you're using |
| Security rules | Non-negotiable things Claude must always do |
| Conventions | Code style, folder structure, naming patterns |
You don't need to have everything figured out on day one. CLAUDE.md is a living document — you'll add to it as your project grows.
What's next?
With Claude Code open and CLAUDE.md defined, you're ready to build. The next step is the most important foundation of the app: authentication and the landing page. We'll tackle this before anything else.