> [!khiip-x] X · Article
> <span class="khiip-mark"><svg viewBox="-1 -1 50 50" width="15" height="15" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-label="Khiip"><g stroke="currentColor" stroke-width="3.8"><path d="M14 16 L1.27 28.73"/><path d="M17.33 19.05 L7.48 37.6"/><path d="M20.67 20.89 L16.09 42.4"/><path d="M24 21.5 L24 44.5"/><path d="M27.33 20.89 L31.91 42.4"/><path d="M30.67 19.05 L40.52 37.6"/><path d="M34 16 L46.73 28.73"/></g><path d="M14 16 Q24 27 34 16" stroke="currentColor" stroke-width="4.8"/><g fill="currentColor"><circle cx="8.27" cy="21.73" r="2.3"/><circle cx="4.83" cy="25.17" r="2.3"/><circle cx="12.90" cy="27.40" r="2.3"/><circle cx="10.24" cy="32.41" r="2.3"/><circle cx="18.61" cy="30.57" r="2.3"/><circle cx="17.37" cy="36.38" r="2.3"/><circle cx="24" cy="31.85" r="2.3"/><circle cx="24" cy="38.06" r="2.3"/><circle cx="29.39" cy="30.57" r="2.3"/><circle cx="30.63" cy="36.38" r="2.3"/><circle cx="35.10" cy="27.40" r="2.3"/><circle cx="37.76" cy="32.41" r="2.3"/><circle cx="39.73" cy="21.73" r="2.3"/><circle cx="43.17" cy="25.17" r="2.3"/></g></svg></span>
> <div class="khiip-author"><img class="khiip-pfp" src="https://pbs.twimg.com/profile_images/1943938176420024320/sDXXnmjM_200x200.jpg" alt=""><span class="khiip-author-id"><span class="khiip-name">Dep<svg class="khiip-verified khiip-verified-individual" viewBox="0 0 24 24" width="16" height="16" fill="#1d9bf0" style="vertical-align:-3px;margin-left:3px"><path d="M20.396 11c-.018-.646-.215-1.275-.57-1.816-.354-.54-.852-.972-1.438-1.246.223-.607.27-1.264.14-1.897-.131-.634-.456-1.213-.937-1.67-.477-.482-1.07-.81-1.713-.94-.642-.13-1.31-.057-1.91.21-.323-.598-.792-1.07-1.353-1.4-.56-.33-1.187-.5-1.83-.5-.642 0-1.27.17-1.83.5-.56.33-1.03.802-1.353 1.4-.6-.267-1.268-.34-1.91-.21-.642.13-1.236.458-1.713.94-.48.457-.806 1.036-.936 1.67-.13.633-.083 1.29.14 1.897-.587.274-1.084.705-1.44 1.246-.354.54-.55 1.17-.567 1.816.017.646.213 1.276.567 1.817.356.54.853.972 1.44 1.246-.223.607-.27 1.264-.14 1.897.13.634.455 1.213.936 1.67.477.482 1.07.81 1.713.94.642.13 1.31.057 1.91-.21.323.598.792 1.07 1.353 1.4.56.33 1.188.5 1.83.5.643 0 1.27-.17 1.83-.5.561-.33 1.03-.802 1.354-1.4.6.267 1.268.34 1.91.21.642-.13 1.236-.458 1.713-.94.48-.457.806-1.036.937-1.67.13-.633.083-1.29-.14-1.897.586-.274 1.084-.705 1.438-1.246.355-.54.552-1.17.57-1.817zM9.662 14.85l-3.429-3.428 1.293-1.302 2.072 2.072 4.4-4.794 1.347 1.246z"/></svg></span><span class="khiip-handle">@0xDepressionn</span><span class="khiip-handle">46.4K followers · 1.7K following</span></span></div>
>
> ![cover](https://pbs.twimg.com/media/HIhgNsZXkAAAj2E.jpg)
>
> # Karpathy's CLAUDE.md hit #1 on GitHub with 82,000 stars. Most devs still haven't read it.
>
> <div class="khiip-xfoot"><div class="khiip-xfoot-meta">1:09 PM · May 17, 2026 · <strong>4.5M</strong> Views</div><div class="khiip-xfoot-stats"><span><svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" style="vertical-align:-3px"><path d="M1.751 10c0-4.42 3.584-8 8.005-8h4.366c4.49 0 8.129 3.64 8.129 8.13 0 2.96-1.607 5.68-4.196 7.11l-8.054 4.46v-2.69h-.067c-4.49.1-8.183-3.51-8.183-8.01zm8.005-6c-3.317 0-6.005 2.69-6.005 6 0 3.37 2.77 6.08 6.138 6.01l.351-.01h1.761v1.3l5.087-2.81c1.951-1.08 3.163-3.13 3.163-5.36 0-3.39-2.744-6.13-6.129-6.13H9.756z"/></svg>50</span><span><svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" style="vertical-align:-3px"><path d="M4.5 3.88l4.432 4.14-1.364 1.46L5.5 7.55V16c0 1.1.896 2 2 2H13v2H7.5c-2.209 0-4-1.79-4-4V7.55L1.432 9.48.068 8.02 4.5 3.88zM16.5 6H11V4h5.5c2.209 0 4 1.79 4 4v8.45l2.068-1.93 1.364 1.46-4.432 4.14-4.432-4.14 1.364-1.46 2.068 1.93V8c0-1.1-.896-2-2-2z"/></svg>284</span><span><svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" style="vertical-align:-3px"><path d="M16.697 5.5c-1.222-.06-2.679.51-3.89 2.16l-.805 1.09-.806-1.09C9.984 6.01 8.526 5.44 7.304 5.5c-1.243.07-2.349.78-2.91 1.91-.552 1.12-.633 2.78.479 4.82 1.074 1.97 3.257 4.27 7.129 6.61 3.87-2.34 6.052-4.64 7.126-6.61 1.111-2.04 1.030-3.7.477-4.82-.561-1.13-1.667-1.84-2.91-1.91h.002zm4.187 7.69c-1.351 2.48-4.001 5.12-8.379 7.67l-.503.3-.504-.3c-4.379-2.55-7.029-5.19-8.382-7.67-1.36-2.5-1.41-4.86-.514-6.67.887-1.79 2.647-2.91 4.601-3.01 1.651-.09 3.368.56 4.798 2.01 1.429-1.45 3.146-2.1 4.796-2.01 1.954.1 3.714 1.22 4.601 3.01.896 1.81.846 4.17-.514 6.67z"/></svg>2.5K</span><span><svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" style="vertical-align:-3px"><path d="M4 4.5C4 3.12 5.119 2 6.5 2h11C18.881 2 20 3.12 20 4.5v18.44l-8-5.71-8 5.71V4.5zM6.5 4c-.276 0-.5.22-.5.5v14.56l6-4.29 6 4.29V4.5c0-.28-.224-.5-.5-.5h-11z"/></svg>13.7K</span></div></div>
>
> ---
>
> ### A file named CLAUDE.md hit #1 on GitHub Trending.
>
> 82,000 stars. 7,800 forks.
>
> It started with Andrej Karpathy. Former Director of AI at Tesla. Founding member of OpenAI. He identified 4 behaviors that make Claude Code fail and wrote them down in a single file.
>
> A developer took those 4 rules, expanded them, published the file. It went viral..
>
> The reason: coding accuracy went from 65% to 94%.
>
> Most developers using Claude Code daily have never set this up. They're starting from zero every session. Re-explaining the same context. Cleaning up unwanted scope changes. Reverting refactors nobody asked for.
>
> This is the full file.
>
> ---
>
> ![image](https://pbs.twimg.com/media/HIhagMyXsAE6AFE.jpg)
>
> ---
>
> ### The setup most devs missed
>
> Every time you open Claude Code, it starts with nothing.
>
> It doesn't know your stack. Your standards. Your project context. What you've already tried. What you explicitly decided not to do three sessions ago.
>
> So it guesses. And when it guesses, it refactors code you didn't ask it to touch. It suggests frameworks that break your existing architecture. It deletes files without asking. It contradicts decisions you already made.
>
> CLAUDE.md is a plain text file you place in your project root. Claude Code reads it automatically at the start of every session.
>
> One setup. Zero repeated explanations. Three categories of expensive mistakes fixed.
>
> ---
>
> ### 1 / 3 | DEFAULTS: $375/week you're spending to repeat yourself
>
> The average developer spends 30 minutes per day re-explaining context to Claude.
>
> Stack. Coding standards. Project background. What's already been tried. None of it persists between sessions unless you write it down once and let Claude read it every time.
>
> 30 minutes per day at $150/hour developer rate: $375/week. Per developer.
>
> For a team of 5: $1,875/week gone.
>
> ---
>
> ![image](https://pbs.twimg.com/media/HIhavJgXEAAV5o1.jpg)
>
> ---
>
> These 7 rules go at the top of your CLAUDE.md file.
>
> **→ Kill the filler:**
>
> ```
> Never open responses with filler phrases like "Great question!", "Of course!", "Certainly!", or similar warmups. Start every response with the actual answer. No preamble, no acknowledgment of the question.
> ```
>
> **→ Match length to the task:**
>
> ```
> Match response length to task complexity. Simple questions get direct, short answers. Complex tasks get full, detailed responses. Never pad responses with restatements of the question or closing sentences that repeat what you just said.
> ```
>
> **→ Show options before acting:**
>
> ```
> Before any significant task, show me 2-3 ways you could approach this work. Wait for me to choose before proceeding.
> ```
>
> **→ Admit uncertainty before it costs me:**
>
> ```
> If you are uncertain about any fact, statistic, date, or piece of technical information: say so explicitly before including it. Never fill gaps in your knowledge with plausible-sounding information. When in doubt, say so.
> ```
>
> **→ Who I am and what I know:**
>
> ```
> About me: [Name] / Role: [your role] / Background in: [areas]. Strong in: [what you know well]. Still learning: [gaps]. Adjust the depth of every response to match this. Never over-explain what I already know. Never skip context I need.
> ```
>
> **→ Current project context:**
>
> ```
> What I'm working on: [project name] / Goal: [specific outcome] / Audience: [who uses this] / Stack context: [any relevant constraints] / What to avoid: [list]. Apply this context to every task. When something doesn't fit, flag it before proceeding.
> ```
>
> **→ Lock your voice:**
>
> ```
> My writing style — always match this: [describe your voice] / Sentence length: [preference] / Words I use: [examples] / Words I never use: [examples] / Format: [prose or structured]. When writing anything on my behalf, match this exactly. Do not default to your own patterns.
> ```
>
> > Time spent re-explaining context per day: 30 min At $150/hour developer rate: $75/day Per week: $375/week per developer Team of 5: $1,875/week CLAUDE.md setup for this section: 45 minutes total
>
> **mistake to avoid:** don't write your CLAUDE.md from scratch. Use this prompt first, then edit the output:
>
> ```
> Based on what I've told you about myself, my project, and how I want to work: write me a complete CLAUDE.md file. Include: who I am, my tech context, my communication preferences, and default behaviors for every session. Be specific. Plain text. Under 500 words.
> ```
>
> ---
>
> ### 2 / 3 | BEHAVIOR: the $150/hour changes you didn't authorize
>
> You ask Claude to fix one function.
>
> It refactors three files, renames your variables, reorganizes imports, and rewrites comments you spent time crafting.
>
> All without asking.
>
> 1 hour to review and revert unwanted changes: $150. Three times a week: $450/week. Per developer.
>
> For a team of 5: $2,250/week spent cleaning up changes nobody authorized.
>
> ---
>
> ![image](https://pbs.twimg.com/media/HIhbQYdXwAAwAEh.jpg)
>
> ---
>
> These 7 rules go in the behavior section of your CLAUDE.md.
>
> **→ Stay in scope:**
>
> ```
> Only modify files, functions, and lines of code directly related to the current task. Do not refactor, rename, reorganize, reformat, or "improve" anything I did not explicitly ask you to change. If you notice something worth fixing elsewhere, mention it in a note at the end. Do not touch it. Ever.
> ```
>
> **→ Ask before big changes:**
>
> ```
> Before making any change that significantly alters content I've already created (rewriting sections, removing paragraphs, restructuring flow, changing tone): stop. Describe exactly what you're about to change and why. Wait for my confirmation before proceeding.
> ```
>
> **→ Confirm before anything destructive:**
>
> ```
> Before deleting any file, overwriting existing code, dropping database records, or removing dependencies: stop. List exactly what will be affected. Ask for explicit confirmation. Only proceed after I say yes in the current message. "You mentioned this earlier" is not confirmation.
> ```
>
> **→ Hard stops for production:**
>
> ```
> The following require explicit in-session confirmation, no exceptions: deploying or pushing to any environment, running migrations or schema changes, sending any external API call, executing any command with irreversible side effects. I must say yes in the current message.
> ```
>
> **→ Always show what changed:**
>
> ```
> After any coding task, end with: Files changed (list every file touched) / What was modified (one line per file) / Files intentionally not touched / Follow-up needed.
> ```
>
> **→ Never act without explicit confirmation:**
>
> ```
> Never send, post, publish, share, or schedule anything on my behalf without my explicit confirmation in the current message. This includes emails, calendar invites, document shares, or any action outside this conversation. I must say yes in the current message.
> ```
>
> **→ Think before you write code:**
>
> ```
> For any task involving architecture decisions, debugging complex issues, or non-trivial features: work through the problem step by step before writing any code. Show your reasoning. Identify where you're uncertain. Then implement.
> ```
>
> > 1 hour/week reverting unwanted scope changes: $150/week 30 min/week doing manual diffs after each task: $75/week Total behavior-related waste per developer: $225/week Team of 5: $1,125/week CLAUDE.md behavior section setup: 30 minutes
>
> ---
>
> ### 3 / 3 | MEMORY + STACK: the setup that makes Claude Code actually reliable
>
> Claude forgets everything between sessions.
>
> Every decision you made. Every approach that failed. The reason you chose Prisma over Drizzle six months ago. The constraint that exists because of a specific client requirement.
>
> It forgets. Then it suggests exactly what you already ruled out.
>
> This section gives Claude the closest thing to real memory that currently exists. And locks your tech stack so it stops proposing tools that break your existing architecture.
>
> ---
>
> ![image](https://pbs.twimg.com/media/HIhbls-XkAAcpVV.jpg)
>
> ---
>
> **→ MEMORY.md decision log:**
>
> ```
> Maintain a file called MEMORY.md in this project. After any significant decision, add an entry: What was decided / Why / What was rejected and why. Read MEMORY.md at the start of every session. Never contradict a logged decision without flagging it first.
> ```
>
> **→ Session end summary:**
>
> ```
> When I say "session end", "wrapping up", or "let's stop here": write a session summary to MEMORY.md. Include: Worked on / Completed / In progress / Decisions made / Next session priorities.
> ```
>
> **→ ERRORS.md failure log:**
>
> ```
> Maintain a file called ERRORS.md. When an approach takes more than 2 attempts to work, log it: What didn't work / What worked instead / Note for next time. Check ERRORS.md before suggesting approaches to similar tasks.
> ```
>
> **→ Permanent facts list:**
>
> ```
> These facts are always true for this project. Apply them to every session without exception: [your permanent constraints, architectural decisions, and rules]. If any task conflicts with one of these, flag it before proceeding.
> ```
>
> **→ Lock your tech stack:**
>
> ```
> Tech stack for this project. Always use these. Never suggest alternatives unless I ask:
> Language: [e.g. TypeScript]
> Framework: [e.g. Next.js 14]
> Package manager: [e.g. pnpm]
> Database: [e.g. PostgreSQL with Prisma]
> Testing: [e.g. Vitest]
> Styling: [e.g. Tailwind CSS]
> If something seems like the wrong tool, flag it. But use the defined stack unless I explicitly say otherwise.
> ```
>
> **→ Extended Thinking for hard decisions:**
>
> ```
> For questions involving system architecture, performance tradeoffs, database design, or long-term technical decisions: use extended thinking mode. Work through the problem step by step. Surface tradeoffs I haven't considered. Flag assumptions that might not hold at scale. Then give your recommendation.
> ```
>
> **→ The 4 rules that went viral:**
>
> Karpathy identified 4 behaviors that make Claude Code fail. A developer distilled them into these 4 lines. Coding accuracy went from 65% to 94%.
>
> ```
> 1. Ask, don't assume. If something is unclear, ask before writing a single line. Never make silent assumptions about intent, architecture, or requirements.
>
> 2. Simplest solution first. Always implement the simplest thing that could work. Do not add abstractions or flexibility that weren't explicitly requested.
>
> 3. Don't touch unrelated code. If a file or function is not directly part of the current task, do not modify it, even if you think it could be improved.
>
> 4. Flag uncertainty explicitly. If you are not confident about an approach or technical detail, say so before proceeding. Confidence without certainty causes more damage than admitting a gap.
> ```
>
> > 2 hours/week recovering from forgotten decisions and wrong suggestions: $300/week per dev Wrong stack recommendations and incompatible tools: $75/week Total memory-related waste per developer: $375/week Team of 5: $1,875/week MEMORY.md + ERRORS.md + stack setup: 20 minutes
>
> ---
>
> ### CONCLUSION
>
> Here's the full math.
>
> > $375/week re-explaining context every session $225/week reverting unauthorized changes $375/week recovering from forgotten decisions **Total waste per developer: $975/week**
>
> > **Team of 5 developers: $4,875/week** **Per year: $253,500**
>
> > CLAUDE.md setup: 2 hours total Karpathy's 4 rules alone: 65% to 94% coding accuracy
>
> One plain text file. 21 rules. Two hours of work.
>
> The developers who set this up are working with a version of Claude that remembers decisions, stays in scope, confirms before destroying anything, never suggests a framework that breaks your architecture.
>
> The ones who haven't are spending $975/week to repeat themselves.
>
> ---
>
> p.s. start with Karpathy's 4 rules. just those 4. paste them into a new file called CLAUDE.md in your project root right now. it takes 2 minutes. add the rest one week at a time as you notice what's missing.
>
> Bookmark this before it gets buried. If this was useful, share it with one person who needs it.
>
> <div class="khiip-xfoot"><div class="khiip-xfoot-meta">1:09 PM · May 17, 2026 · <strong>4.5M</strong> Views</div><div class="khiip-xfoot-stats"><span><svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" style="vertical-align:-3px"><path d="M1.751 10c0-4.42 3.584-8 8.005-8h4.366c4.49 0 8.129 3.64 8.129 8.13 0 2.96-1.607 5.68-4.196 7.11l-8.054 4.46v-2.69h-.067c-4.49.1-8.183-3.51-8.183-8.01zm8.005-6c-3.317 0-6.005 2.69-6.005 6 0 3.37 2.77 6.08 6.138 6.01l.351-.01h1.761v1.3l5.087-2.81c1.951-1.08 3.163-3.13 3.163-5.36 0-3.39-2.744-6.13-6.129-6.13H9.756z"/></svg>50</span><span><svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" style="vertical-align:-3px"><path d="M4.5 3.88l4.432 4.14-1.364 1.46L5.5 7.55V16c0 1.1.896 2 2 2H13v2H7.5c-2.209 0-4-1.79-4-4V7.55L1.432 9.48.068 8.02 4.5 3.88zM16.5 6H11V4h5.5c2.209 0 4 1.79 4 4v8.45l2.068-1.93 1.364 1.46-4.432 4.14-4.432-4.14 1.364-1.46 2.068 1.93V8c0-1.1-.896-2-2-2z"/></svg>284</span><span><svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" style="vertical-align:-3px"><path d="M16.697 5.5c-1.222-.06-2.679.51-3.89 2.16l-.805 1.09-.806-1.09C9.984 6.01 8.526 5.44 7.304 5.5c-1.243.07-2.349.78-2.91 1.91-.552 1.12-.633 2.78.479 4.82 1.074 1.97 3.257 4.27 7.129 6.61 3.87-2.34 6.052-4.64 7.126-6.61 1.111-2.04 1.030-3.7.477-4.82-.561-1.13-1.667-1.84-2.91-1.91h.002zm4.187 7.69c-1.351 2.48-4.001 5.12-8.379 7.67l-.503.3-.504-.3c-4.379-2.55-7.029-5.19-8.382-7.67-1.36-2.5-1.41-4.86-.514-6.67.887-1.79 2.647-2.91 4.601-3.01 1.651-.09 3.368.56 4.798 2.01 1.429-1.45 3.146-2.1 4.796-2.01 1.954.1 3.714 1.22 4.601 3.01.896 1.81.846 4.17-.514 6.67z"/></svg>2.5K</span><span><svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" style="vertical-align:-3px"><path d="M4 4.5C4 3.12 5.119 2 6.5 2h11C18.881 2 20 3.12 20 4.5v18.44l-8-5.71-8 5.71V4.5zM6.5 4c-.276 0-.5.22-.5.5v14.56l6-4.29 6 4.29V4.5c0-.28-.224-.5-.5-.5h-11z"/></svg>13.7K</span></div></div>