A free guide by Marino Merlini (@marinoautomates)
Founder of Meet Blaine
The CLAUDE.md Behavior Skills Setup Guide
Install the single GitHub markdown file that stops Claude Code CLI from over-engineering, skipping rules, and inventing fake APIs.
Running a business? We set this up for you. Book a 30-min call
Part 1: What the Behavior Skills CLAUDE.md File Actually Does
The CLAUDE.md file from the andrej-karpathy-skills repository is a short set of plain-text operating rules that Claude Code CLI reads automatically before touching your project. Under 70 lines of pure markdown instruction with $0 dependencies, per the CLAUDE.md Raw Source, it forces the AI to plan first and make the smallest possible change.
Where the rules come from
Open-source developers curated the andrej-karpathy-skills repository (originally created by forrestchang and hosted under multica-ai/andrej-karpathy-skills) based on Andrej Karpathy's public tweets about common language model coding mistakes. The repository crossed 170,000 stars in mid-2026 and surpassed 218,000 stars by late 2026 on its GitHub page.
Why the file name matters
Claude Code CLI, Anthropic's official terminal agent, automatically looks for a file named CLAUDE.md in your project root when it starts up. Because it loads these instructions into memory on startup, you never have to re-type your formatting rules or beg the agent not to break existing files.
https://github.com/multica-ai/andrej-karpathy-skills
Related guide: The Everything Claude Code (ECC) Setup Guide
Part 2: The 4 AI Coding Habits This File Eliminates
Adding CLAUDE.md to your root folder fixes 4 specific failure modes documented on the andrej-karpathy-skills GitHub page: over-engineering, ignoring user rules, premature done status, and hallucinated APIs.
1. Turning a 5-line fix into a massive rewrite
Without strict boundaries, an AI agent will often reformat an entire file or rebuild working functions just to fix one bug. On the andrej-karpathy-skills GitHub page, the surgical approach demonstrates a 5-line diff compared to an uncontrolled 412-line rewrite.
2. Skipping past your exact instructions
Long chat threads cause models to forget constraints you mentioned twenty minutes ago. Because CLAUDE.md sits at the system level, rules under its 'Think Before Coding' and 'Simplicity First' blocks stay active on every single prompt.
3. Claiming a task is done when half the code is missing
AI agents frequently leave placeholder comments or unverified logic and report that the job is complete. The 'Goal-Driven Execution' rules require the agent to verify its output against actual tests or checks before marking a task finished.
4. Inventing endpoints and APIs that do not exist
When an agent does not know how an external service works, it often guesses a plausible-sounding URL or method name. The behavior rules force the model to verify existing routes and ask questions instead of guessing.
Part 3: How to Install CLAUDE.md in 60 Seconds
You can install the Behavior Skills CLAUDE.md file by downloading it directly into the top-level folder of any code or automation project. It requires $0 dependencies and under 70 lines of pure markdown instruction, per the CLAUDE.md Raw Source.
Open your project root folder
Open your terminal and navigate to the main folder of the project you are working on. This should be the exact same directory where you launch Claude Code CLI.
Download the raw file directly
Run the terminal command below to pull the CLAUDE.md Raw Source straight from GitHub into your current folder. Alternatively, you can open the https://github.com/multica-ai/andrej-karpathy-skills page in your browser, copy the text of CLAUDE.md, and save it as a new file in your code editor.
Launch Claude Code CLI
Start Claude Code CLI in that same terminal window. The agent reads CLAUDE.md automatically on startup, per Anthropic's official terminal agent design, so your new behavior rules are active immediately.
curl -o CLAUDE.md https://raw.githubusercontent.com/forrestchang/andrej-karpathy-skills/main/CLAUDE.md
Related guide: The Claude Code Coordinator Playbook & Command Cheat Sheet
Part 4: How to Add Your Own Project Rules at the Bottom
Once the base behavior skills are in place, you should append 5 to 10 lines of project-specific context at the bottom of your CLAUDE.md file. Giving Claude Code CLI your exact test commands and tech stack stops it from guessing how your project runs.
Open CLAUDE.md in any text editor
Scroll past the default behavior blocks ('Think Before Coding', 'Simplicity First', and 'Goal-Driven Execution'). Leave all of the original rules intact so the core guardrails stay strong.
Paste a project context block at the very bottom
Add a short section listing your stack, the folders the AI is allowed to edit, and the exact terminal command it must run to verify its work. Copy the template below and swap the bracketed text for your real tools.
Test the setup with a single-task prompt
Ask Claude Code CLI to make one small change and tell it to state its plan before editing any files. You will see it list the exact files it plans to touch and ask for confirmation if anything is ambiguous.
## Project-Specific Rules - Tech Stack: [e.g., Next.js, TypeScript, Tailwind CSS, Supabase] - Protected Files: Never modify files inside [/config or /migrations] without explicit permission. - Verification Command: Always run [npm run test] and confirm zero errors before reporting a task as complete. - API Rule: Never invent new endpoints; only use routes documented in [src/api/routes.ts].
Related guide: The Claude Code AI Advisory Board Setup Guide & Skill Files
Mistakes to avoid
- Saving the file inside a subfolder instead of the project root directory where you launch Claude Code CLI.
- Naming the file claude.txt or skill.md instead of the exact CLAUDE.md filename that Claude Code CLI looks for on startup.
- Pasting thousands of lines of documentation into CLAUDE.md, which dilutes the short, strict behavior rules that make the file work.
- Skipping a real verification command in your project rules, which leaves the agent with no automated way to prove its code actually runs.
Questions people ask
Did Andrej Karpathy write the andrej-karpathy-skills repository himself?
No, Andrej Karpathy did not personally author the repository. Open-source developers curated the CLAUDE.md file (originally created by forrestchang and hosted at multica-ai/andrej-karpathy-skills) based on Karpathy's public tweets about common LLM coding pitfalls.
Does CLAUDE.md cost anything or require extra software packages?
No, the file is completely free and has $0 dependencies, per the CLAUDE.md Raw Source. It is under 70 lines of pure markdown instruction that sits directly in your folder.
Do I have to tell Claude Code CLI to read CLAUDE.md every time I start a chat?
No, Claude Code CLI automatically reads CLAUDE.md from the project root directory every time it starts up. As long as you launch the terminal agent from the folder containing the file, the rules apply automatically.
Can I use this CLAUDE.md file in tools other than Claude Code CLI?
Yes, because the file is plain markdown text, you can copy and paste its rules into the custom instructions or system prompt window of any AI coding editor or chat workspace.
Watch the video
Watch on Instagram
Want this built for you?
If you run a 7, 8, or 9-figure company and want custom AI employees and automations plugged straight into the software your team already uses, Meet Blaine handles the entire build and ongoing support. Book a quick call to see how we can implement it for your team.
- You walk us through your week. Where the hours go and what keeps falling through.
- We show you what to hand off first. Which jobs an AI employee can take over, and what stays with you.
- You leave with a clear next step. Whether or not we end up working together.
Calendar not loading? Open it in a new page
Book a 30-min call: api.leadconnectorhq.com