The Complete CLAUDE.md Guide — Winning an AI Coding Contest Without a Line of Code (Copy-Paste Template)

The complete CLAUDE.md guide — how a lawyer won an AI coding contest without a line of code (copy-paste template)

HOW TO ACTUALLY USE AI · CLAUDE.md

How to Win an AI Coding Contest Without a Line of Code

The winner wasn’t a developer — it was a lawyer. The secret wasn’t coding but a single ‘instruction sheet’ handed to the AI. That is exactly CLAUDE.md.

“I can’t believe I won this contest — and I didn’t write a single line of code.”

The person who took first place in the 2026 official AI coding contest run by Anthropic (Built with Opus 4.6) was not a developer but Mike Brown, a personal-injury lawyer. He still can’t read code. The secret was not coding skill but a file that precisely ‘explained’ his field to the AI.

That ‘instruction sheet’ is CLAUDE.md. This article covers it all: (1) what CLAUDE.md is, (2) why it should be short, (3) a copy-paste template a beginner can use right away, and (4) the legendary original that earned 170,000 stars on GitHub.

What Is CLAUDE.md?

When you launch Claude Code, it automatically reads the CLAUDE.md file in your working folder at startup. Write your “project rules, context, and don’ts” there, and the AI works while honoring those rules every time. The AI is smart, but it doesn’t know ‘your work’ — so this instruction sheet determines the quality of the result.

⚠️ It Must Not Be Long (the most common mistake)

CLAUDE.md is read in full at the start of a session (it isn’t truncated). But the longer it is, the more context it eats, and the less it follows your instructions. Anthropic’s official recommendation is 200 lines or fewer. Short, just the essentials — that works best.

📋 Copy-Paste Starter Template

Copy the below and save it as CLAUDE.md in your project folder. I kept it short for beginners (about 25 lines).

# CLAUDE.md

> Put this file at the top of your project folder and Claude Code reads it automatically at startup.
> Keep it short. If it's long, it gets followed less (recommended: 200 lines or fewer).

## Core principles
- Think first: Don't guess. If it's ambiguous, stop and ask. If there are multiple interpretations, list them.
- Keep it simple: Only what was asked, with minimal code. Don't add features or abstractions that weren't requested.
- Minimal edits: Change only what relates to the request. Don't touch unrelated code, comments, or formatting.
- Success criteria first: Turn "fix it" into a verifiable goal, like "write a reproduction test and make it pass."

## How to respond
- Always answer in English.
- Before editing a file, say what you're changing and why in one line first.
- If you don't know, say you don't know. Don't make things up.

## This project (fill in for yourself)
- What: (e.g., a folder of collected blog posts)
- Tech: (e.g., text files / Python / none)
- Don't: (e.g., never delete original files)

🚀 A 3-Step Setup for Beginners

  1. Type /init — type /init inside Claude Code, and Claude sweeps your folder and generates a draft CLAUDE.md automatically.
  2. Paste in the principles above — add the ‘Core principles’ from the template above to the draft.
  3. Keep it short — don’t go over 200 lines. If the AI doesn’t follow a rule, sharpen that rule with one clearer line.

The 4 Core Principles (What the Legendary File Emphasized)

01
Think First
No guessing. If it’s ambiguous, ask; if there are multiple interpretations, list them.
02
Keep It Simple
Only what was asked, minimal code. No unrequested features or abstractions.
03
Minimal Edits
Only where it relates to the request. Don’t touch code that’s working fine.
04
Success Criteria First
Turn “fix it” into “write a reproduction test and pass it.”

🔗 Original & Sources

These four principles come from developer Forrest Chang distilling into a CLAUDE.md the ‘LLM coding pitfalls’ pointed out by Andrej Karpathy (formerly of OpenAI and Tesla AI); the repo earned 170,000+ stars on GitHub. (It isn’t a file Karpathy wrote himself, but a distillation of his insights.)

How to use AI easily, one post at a time 🙌

From install to setup, explained for beginners.

Follow → @naberal.ai