Actually Works · Episode 23

16 / 38

22 episodes in, one file keeps this from breaking.

Claude Code reads one file — CLAUDE.md — the moment it opens a project folder, and every new session starts already knowing the rules. This channel runs on one: a real rule for each of its costliest mistakes, including a metric that measured position on screen instead of the actual sound, and a check that ran before the fix it was supposed to protect. Neither was caught by a tool. Both are one line in the file now.

Watch on YouTube instead

The exact clicks

  1. Open your terminal — on Mac, search "Terminal" with Spotlight (the magnifying glass, top right); on Windows, search "PowerShell" in the Start menu. Both come built into the OS already, nothing to download for this step.
  2. Mac, Linux or WSL: paste curl -fsSL https://claude.ai/install.sh | bash and press Enter. Windows PowerShell: paste irm https://claude.ai/install.ps1 | iex instead and press Enter. This installs Claude Code itself — no separate Node.js install needed.
  3. When it finishes, type claude --version and press Enter. If it prints a version number back, the install worked — if it says "command not found," close and reopen the terminal window first before trying again.
  4. Move into the project you want Claude Code to work on: type cd followed by a space and the folder's path, then press Enter — for example cd Documents/my-project.
  5. Type claude and press Enter. This opens a Claude Code session inside that exact folder — the folder you're in when you type this is the one it will read rules from.
  6. In that same folder, create a new plain-text file named exactly CLAUDE.md (capital letters exactly as shown, no other extension) — any text editor works, including opening it with your editor of choice or running code CLAUDE.md if you use VS Code.
  7. Write one real rule per line, in plain English, for a mistake that has actually already happened in this project — not a wishlist of things that might. "Never delete the backup folder" is a real rule; "write clean code" is not specific enough to catch anything.
  8. Save the file, close the current Claude Code session, and start a fresh one with claude in the same folder — it reads CLAUDE.md automatically this time, before you type a single instruction.
  9. Optional, to confirm it actually worked: ask it directly, "what rules are in CLAUDE.md?" — a working setup quotes the rules back without you pasting the file into the chat.

What changes

  • Claude Code reads a file named exactly CLAUDE.md, sitting in a project's top folder, automatically on every session start — no flag, no pasted reminder, no re-explaining.
  • The current native install command (checked today): curl -fsSL https://claude.ai/install.sh | bash on Mac/Linux/WSL, or irm https://claude.ai/install.ps1 | iex on Windows PowerShell — no Node.js required either way.
  • This is not a hypothetical benefit — this exact channel's own CLAUDE.md carries a real rule for each of its three costliest production mistakes, written the same day each one was found.

What it will not do

  • The file only helps if it names real, specific mistakes — a vague wishlist ("write good code," "be careful") gives an agent nothing concrete to check itself against.
  • It's read once at session start, not enforced like a lint rule — nothing physically stops an agent from breaking a written rule anyway. What it removes is the excuse of not knowing the rule existed, not the possibility of a mistake.
  • The exact install command shown here can change as Claude Code updates — re-check code.claude.com/docs if this episode is more than a few months old.

Get the next one

One AI setup a week, straight to your inbox.

Also buildingAgently— the catalog for AI agents