Click any tag below to further narrow down your results
Links
This GitHub repo by Andrej Karpathy outlines four simple rules in 65 lines that boost AI coding accuracy from 65% to 94%. It covers thinking before coding, keeping implementations minimal, making surgical changes, and defining clear success criteria.
- A 65-line CLAUDE.md file allegedly boosted AI coding accuracy from 65% to 94%
- The guide is attributed to Andrej Karpathy and reportedly hit 220,000+ stars on GitHub
- It boils down to four rules: think before coding, keep implementations minimal, make surgical/targeted changes, and define clear testable success criteria upfront
An Anthropic team member shared the internal Claude.md prompt template that Andrej Karpathy uses. Applying this file made Claude stop resisting and deliver exactly the responses the author needed.
- A tweet claims an Anthropic team member shared an internal "Claude.md" prompt template attributed to Andrej Karpathy that reportedly makes Claude follow instructions more reliably.
- Karpathy reportedly joined Anthropic five weeks before this post.
- The file allegedly includes formatting rules, tone settings, and error-handling steps meant to reduce vague or evasive Claude responses.
- The claims come from secondhand reports (a "friend") rather than verified sourcing or a linked deep-dive.
This project packages four principles—Think Before Coding, Simplicity First, Surgical Changes, and Goal-Driven Execution—into a Claude Code plugin or CLAUDE.md file to curb LLM code pitfalls like overengineering and hidden assumptions. It enforces explicit reasoning, minimal edits, and test-driven success criteria to produce cleaner, more accurate AI-generated code.
- A single CLAUDE.md file encodes four Karpathy-derived rules—think before coding, simplicity first, surgical changes, goal-driven execution—to fix common LLM coding failures.
- It explicitly bans unrequested abstractions, error handling, or flexibility, and restricts edits to only what was asked, leaving style and unrelated code untouched.
- It pushes test-first, criteria-based execution so the model loops until defined success conditions pass rather than coding aimlessly.
- Installable as a Claude Code plugin/marketplace package or via curl into CLAUDE.md, with a Cursor rule file and support for project-specific rule additions.
This tweet notes that while CLAUDE.md solves the instruction-handling side, you still need to track your model’s context budget. It links to Headroom, a simple one-line-install status bar that shows your current context usage percentage in your editor’s status line.
- Structuring prompts in a defined markdown file (CLAUDE.md) with sections for goals, context, constraints, and examples reduces ambiguity and improves model reliability
- Headroom is a one-line-install status bar tool that displays real-time context window usage percentage directly in the editor's statusline
- Combining CLAUDE.md and headroom addresses two separate problems: instruction clarity and token budget tracking, preventing unexpected conversation truncation
This article breaks down the key sections and best practices for your CLAUDE.md file, the project context guide that Claude Code reads before writing or editing code. It covers what to include—from project overview and tech stack to safety rules and commands—so the AI stays aligned with your repo’s structure and standards.
- CLAUDE.md is read by Claude Code before every code write/edit, so it functions as persistent project context rather than a one-time config file
- Specificity beats generality: naming exact versions/libraries ("Next.js App Router + TypeScript + Tailwind + shadcn/ui + Supabase") works far better than vague stack descriptions
- Concrete coding rules like "use named exports except in route files" or "avoid any; prefer explicit interfaces" produce better-fitting code than generic guidance like "clean code"
- The file should act as a living reference to guide suggestions, not a rigid enforcement mechanism that blocks workflow