CC - Instructions Files

CC - Instructions Files

What Is an Instructions File?

Skills are loaded on demand — when Claude decides they're relevant, or when you explicitly call them. Instruction files are different: they're loaded every single time you send Claude a message.

Think of it as a persistent briefing. Every request you send is automatically paired with the contents of this file. If you want Claude to always know something — your tech stack, your folder structure, your conventions — put it in the instructions file and it will never forget.

For Claude Code, this file is called CLAUDE.md and it lives at the root of your project. Claude is designed to find and read it automatically.

✏️ A Simple Demo

Before building the real file, here's a quick demo to make the concept concrete.

Open CLAUDE.md and add this line:

IMPORTANT: Start every response with the waving hand emoji 👋

Now run /reload-plugins in Claude (or reload the VS Code window with Cmd+Shift+PReload Window if Copilot isn't picking it up).

Say "hi" to Claude. It should respond with 👋 every time — because that instruction is now attached to every message you send.

Delete that line when you're done. It was just a demo.


What Goes in an Instructions File?

The instructions file defines the universe Claude operates in. When you're building it, think about what Claude would need to know to help you effectively on any request — without you having to explain your project every time.

Good candidates for the instructions file:

  • Tech stack and key packages — what language, framework, and libraries the project uses

  • Folder structure — where things live so Claude can navigate confidently

  • Common commands — how to run, test, and build the project

  • Coding conventions — naming patterns, formatting rules, architecture preferences

  • Data model overview — key entities, how the database is structured

  • Common pitfalls — things Claude might get wrong without a heads-up

Size guideline: Keep it under 5–10 KB, around 1,500 words or fewer. The more concise and focused, the better. This file gets loaded with every message, so bloating it will eat into your context window.


✏️ Exercise: Auto-Generate the Instructions File

Claude can generate this file for you. It'll scan the codebase, identify what's relevant, and write a concise instructions file based on what it finds.

Step 1: Enable auto-accept so Claude can write files without stopping to ask permission each time.

In Claude, press Shift+Tab to cycle through modes until you're in auto-accept mode.

Step 2: Run this prompt:

/init Create an instructions file in CLAUDE.md

Claude will explore the project — reading files, checking folder structure, identifying patterns — and write the file. This can take 5–10 minutes. Let it run.

Step 3: Review what was generated.

Open CLAUDE.md and read through it. You should see things like:

  • Package and dependency info

  • Key commands (npm run dev, npm test, etc.)

  • Architecture notes

  • Data model summary

  • Common pitfalls

This is now the core context document for your project. Every message you send to Claude will include this file automatically.

Going forward: As your project evolves, keep this file up to date. Add new conventions as they emerge. Remove things that are no longer true. Treat it like living documentation that the agent reads every day.


Next: CC - Context Engineering Theory