1
0
Fork 0
claude-code-claude-md/README.md
2026-03-30 10:38:01 +02:00

2.6 KiB

CLAUDE.md: Give Claude Code Standing Instructions

Every time you open Claude Code, it starts fresh. It does not remember your last session, your preferences, or your project's conventions. CLAUDE.md fixes this. It is a plain text file Claude reads automatically before doing anything, every single session.

Companion repo for the article CLAUDE.md: Give Claude Code Standing Instructions on From AI to Chitta.


What You Will Learn

By working through the exercises in this repo, you will be able to:

  • Write an effective CLAUDE.md that gives Claude useful context about your project
  • Use the global, project, and subdirectory hierarchy to scope instructions precisely
  • Audit an existing CLAUDE.md and improve it so Claude actually follows it

These are not theoretical outcomes. Complete the exercises and you will have a CLAUDE.md in your own project that saves you time every session.

Prerequisites

  • Claude Code installed (claude --version prints a version)
  • A project of your own you can practice on (any directory with a few files)
  • Basic comfort with the terminal (cd, ls, opening files)

No npm install, no Docker, no build step.

Exercises

# Exercise What It Covers
01 Write Your First CLAUDE.md Create a CLAUDE.md from scratch for a real project
02 Hierarchy in Action Global, project, and subdirectory CLAUDE.md files working together
03 Audit and Improve Diagnose a bad CLAUDE.md and rewrite it

Start at exercises/01-write-your-first.md. Each exercise links to the next.

How to Use This Repo

"Show me what it does": Browse exercises/ and read through the prompts. Understand the pattern before you run anything.

"Let me actually do it": Open Claude Code in this directory and follow the exercises in order. Each one has an expected output section so you know when you have succeeded.

git clone https://git.fromaitochitta.com/fromaitochitta/claude-code-claude-md.git
cd claude-code-claude-md
claude

Then open exercises/01-write-your-first.md and paste the prompt into Claude Code.

Domain

Claude Code Memory and Instructions - This repo is part of the Claude Code Foundation series on From AI to Chitta. See the full series for related concepts.

About

Built by Kjell Tore Guttormsen as part of the From AI to Chitta project, exploring the intersection of AI tools and inner development.

MIT License.