xvibers / school / Set up your workshop

Install Claude Code and write your first CLAUDE.md

Install Claude Code, pick a plan, and give it a project memory file so it follows your rules every session.

video coming soon · the written steps below are complete

By the end of this lesson: you will have Claude Code installed and logged in on a paid plan, plus a CLAUDE.md in your project folder that makes it follow your rules in every session.

What you are setting up

Claude Code is an AI coding tool that runs in your terminal. It reads your files, runs commands and edits code, and you review what it does. It doesn't remember anything between sessions by itself. CLAUDE.md fixes that. It's a Markdown file loaded into Claude Code's context at the start of each new conversation. Think of it as the rules you would otherwise repeat every morning.

Install it on your laptop now. You will install it on your server later, once the VPS exists, using the same steps.

Step 1: Install Claude Code

Anthropic recommends the native installer. On macOS, Linux or WSL, run:

curl -fsSL https://claude.ai/install.sh | bash

On Windows, you can either use WSL and the command above, or run this in PowerShell:

irm https://claude.ai/install.ps1 | iex

On native Windows, Git for Windows is recommended so Claude Code can use the Bash tool. The native installer ships a self-contained binary that auto-updates and needs no Node.js. Homebrew and WinGet also work, but they don't use the built-in auto-update, so the package manager handles updates.

Open a new terminal window and check it worked:

claude --version
claude doctor

If the command isn't found, close and reopen the terminal first. That fixes it most of the time. If it still fails, read the installer's last lines for a PATH message and the official setup page for your system.

Step 2: Pick a plan

Claude Code needs a paid account. The free Claude.ai plan does not include Claude Code access. The usual options, as of October 2026:

  • Pro: $17 a month billed annually ($200 up front) or $20 monthly.
  • Max: $100 a month for 5x Pro's usage, or $200 for 20x.
  • API key: you pay per token instead of a flat fee. Skip this for now. It is harder to predict what you will spend.

Start on monthly Pro. Don't commit to a year before you know how you work. Upgrade to Max only when limits keep stopping you mid-task. Claude Code draws on the same session and weekly limits as the Claude apps, so a long chat in the app also uses up your allowance.

Prices and limits change often. Check the pricing page on claude.com before you pay.

Step 3: Create the project folder and start a session

Make a folder for your first app. The app itself comes later, so the folder can be nearly empty:

mkdir my-app && cd my-app
git init
claude

The first run asks you to log in. Follow the browser prompt and sign in with the account that has your plan. Claude Code will also ask whether you trust the folder. Say yes, since it's your own folder.

You are now in a session. Type a message, press Enter, and it works. Type /memory to see which memory files it found. That command lists your CLAUDE.md files and other memory locations, including ones that don't exist yet.

Step 4: Write your first CLAUDE.md

The project file lives at the root of the project. It can be stored in either ./CLAUDE.md or ./.claude/CLAUDE.md. Use ./CLAUDE.md. It's easier to find.

Claude Code has an /init command that writes a draft by scanning your code. With an empty folder it has nothing to scan, so we write the rules ourselves. They describe how we work, not what the code looks like.

Paste this into your session:

Prompt for Claude Code:

Create a file called CLAUDE.md in the project root. Keep it under 80 lines, in plain Markdown, with short bullet points. Use these sections and rules exactly, and don't add anything I didn't ask for:

# Project
- Name: MY_APP_NAME. One sentence: WHAT_IT_DOES_FOR_WHOM.
- Stack: Laravel 13, PHP 8.4, Blade views, MySQL. Database queue, cache and sessions. No Redis, no Docker.
- Login: magic links only, no passwords.

# How we work
- For any feature bigger than a small fix: write a plan first and wait for my approval before changing files.
- After approval, implement in small steps. Stop after each step and tell me what changed.
- I commit before each AI change and review every diff. Never commit or push unless I ask.
- Never run destructive commands (rm -rf, dropping tables, git reset --hard) without asking first.

# Secrets
- Secrets live only in .env. Never read, print or copy .env contents. Never hard-code keys.
- Keep .env.example up to date with variable names only, never values.

# Server and deploy
- One Ubuntu 24.04 VPS managed with CloudPanel. Each app has its own Linux user.
- Deploy = upload changed files over SSH, then: php artisan migrate --force and php artisan optimize.
- Back up the database before any deploy that includes a migration.

# Scheduled work
- Recurring work runs as scheduled Artisan commands via one cron line: php artisan schedule:run every minute.

# Style
- Plain, readable code over clever code. Follow Laravel conventions.
- Write a test for any new feature that touches money, login or data.
- When unsure, ask me. Don't guess.

Then show me the file.

Read what it wrote. Edit anything that is wrong or that you don't understand. If you can't explain a rule, take it out. Then commit it, as you will before every AI change from now on:

git add CLAUDE.md
git commit -m "Add CLAUDE.md"

Step 5: Check that it follows the rules

Close the session with /exit, start claude again, and ask something that tests a rule:

I want to add a contact form. How would you approach it?

It should offer a plan and wait for your approval, not start writing files. If it jumps straight into code, the rules didn't load. Run /memory and check that you started claude from inside the project folder.

Keep it short, and keep it alive

CLAUDE.md is loaded into every session, so a long file wastes space and gets followed less carefully. A common guideline is to keep each CLAUDE.md file under 200 lines so it stays focused. Ours is well below that.

When the AI makes the same mistake twice, add a rule. You can ask Claude directly ("add this to CLAUDE.md"), or edit the file yourself via /memory. Read the diff either way.

There is also a personal file at ~/.claude/CLAUDE.md that applies to every project. The docs list it as the place for personal preferences across all projects. Use it for things like "explain in plain English." Keep project rules in the project, so they travel with the code.

The memory docs cover the other file types, including auto memory, where Claude takes its own notes. You don't need them yet.

Common mistakes

  • Starting Claude Code from the wrong folder. It loads CLAUDE.md from your current working directory and every directory above it. Start it from a different folder and your rules won't load.
  • Writing a novel. Fifty clear rules beat five hundred vague ones. Cut anything that isn't a rule.
  • Putting secrets in CLAUDE.md. It gets committed to Git and sent to the AI. Write "keys live in .env" and never include the keys themselves.
  • Paying for Max on day one. You don't know your usage yet. Start on Pro and move up when limits actually get in the way.
  • Never reading the diffs. The rules help, but they don't replace you reading what changed.

Checklist

  • Claude Code installed, and claude --version prints a version
  • Logged in with a paid plan (Pro is enough to start)
  • Project folder created, with git init done
  • CLAUDE.md written, read line by line and committed
  • A fresh session asks for a plan before building something
  • No secrets anywhere in CLAUDE.md

Sign in to track your progress.