The goblin rule: why one-line rules exist, and five to add to your CLAUDE.md
The short version
Every AI chat tool reads a system prompt before it answers you: hidden instructions, written by the company that makes the tool, that set its tone, its limits and its habits. A public GitHub folder, system_prompts_leaks by Ásgeir Thor Johnson (Iceland, per his GitHub profile), collects what it says are leaked copies of those rulebooks from Claude, ChatGPT and more. It has 70,000+ stars. One line in its copy of the rules for Codex, OpenAI's coding agent that comes with ChatGPT plans, made the news:
Never talk about goblins, gremlins, raccoons, trolls, ogres, pigeons, or other animals or creatures unless it is absolutely and unambiguously relevant to the user's query.
Treat that copy as leaked and unconfirmed. The repo's files weren't published by the companies. We quote this one line only because OpenAI went on to explain it in public. OpenAI's own explanation (its post "Where the goblins came from", 29 April 2026): while training ChatGPT's "Nerdy" personality, a reward signal ended up favouring creature words like "goblin" and "gremlin", and the habit spread to its models more widely. OpenAI removed the cause in training, but GPT-5.5 had started training before the fix, so it added an instruction to Codex telling it to stop. Press covered it the same week (Engadget, GIGAZINE; links in Sources). That's the whole lesson: an oddly specific rule exists because the model once kept doing that thing. Your Claude Code has its own goblins: files you never asked for, rewrites of code that worked, long recaps. The fix is the same one OpenAI used. One specific line. Source: OpenAI's post and press coverage, Anthropic's Claude Code docs (https://code.claude.com/docs/en/memory) and the repo on GitHub, checked 23 Oct 2026.
| What | The number |
|---|---|
| Stars on the repo | 70,047 (checked 23 Oct 2026) |
| Leaked lines quoted here | 1, the goblin line, explained by OpenAI itself |
| Lines you add per habit | 1 |
| One-line fixes in this guide | 5, in our own words |
| Leaked text to copy | 0 |
Where CLAUDE.md lives
CLAUDE.md is a plain text file of notes that Claude Code reads at the start of every session. Anthropic's docs list the places it looks. The two you need in week one:
- Your project:
CLAUDE.mdin the project's top folder (or.claude/CLAUDE.md). Rules for this project only. - Just you, every project:
~/.claude/CLAUDE.md(the.claudefolder in your home folder). Your habits, used everywhere.
Both load when a session starts and are combined. No file yet? Type /init in Claude Code and it writes a first one from
your code, or just create the file and add one line. Type /memory to see and open the files Claude loaded.
The method: one habit, one line
- Name the habit. Be exact: "it creates notes.md and summary files", not "it's messy".
- Open your CLAUDE.md (project root, or
~/.claude/CLAUDE.mdif it happens in every project). - Add one blunt line that names the thing. No "try to", no "where possible". Short, specific, one job.
A good line passes one test: could you look at Claude's answer and say yes or no, it followed it? Anthropic's docs say the same: write instructions "concrete enough to verify".
Five one-line fixes for common week-one goblins
Written by us, in our own words. Pick the ones that match what Claude actually does to you; don't paste all five "just in case". Number 1 is the fix from the reel.
- Surprise files.
Ask me before creating any new file. Don't add notes, summary or README files I didn't ask for. - Rewriting code that worked.
Change only the lines the task needs. Don't rewrite or reformat working code. - Long replies.
Keep replies to five lines or fewer unless I ask for detail. - "Done" when it isn't.
Run the tests before you say a task is done, and tell me if any fail. - Changes you can't follow.
After each change, explain what you changed and why in one or two plain-English sentences.
What that looks like in the file:
# How to work with me
- Ask me before creating any new file. Don't add notes, summary or README files I didn't ask for.
- Change only the lines the task needs. Don't rewrite or reformat working code.
- Keep replies to five lines or fewer unless I ask for detail.
Before: surprise files. After: it asks first. One habit, one line.
Check it worked
- It loaded: start a new session (CLAUDE.md is read at the start), type
/contextand look for your file under Memory files (/memorylists it too). - It sticks: give Claude the same kind of task that set off the habit. For the files rule, ask for a small fix and watch for "Create notes.md?" instead of a new file appearing.
- It didn't stick: make the line more specific (name the file, the command, the number), check no other line contradicts it, and keep the whole file short. Anthropic's docs say Claude treats CLAUDE.md "as context, not enforced configuration", so specific lines win.
The catch
- The repo's files are leaked and unconfirmed. The companies didn't publish them, and the copies may be old or wrong. The goblin line is the only one we quote, because OpenAI explained the behaviour behind it itself.
- Pulling them out can break the apps' terms. Some terms of service forbid trying to extract a product's hidden instructions. Never try to extract a prompt yourself.
- Don't copy their text into your CLAUDE.md. Their wording belongs to someone else, and their rules fix their model's habits, not yours. Write your own lines for your own goblins.
- The clean place to study: Anthropic publishes the system prompts of its Claude apps officially: https://platform.claude.com/docs/en/release-notes/system-prompts
For builders
- Rules for part of the code only can go in
.claude/rules/with apathsline, so they load when Claude touches matching files (docs, "Path-specific rules"). - Once a week, read your CLAUDE.md and cut lines for habits Claude no longer has. OpenAI's goblin line is a patch for one model; yours should be too.
Sources
- OpenAI, Where the goblins came from (29 April 2026): https://openai.com/index/where-the-goblins-came-from/ (openai.com blocks automated fetches; content confirmed via the coverage below)
- Engadget, ChatGPT developed a goblin obsession after OpenAI tried to make it nerdy (30 April 2026): https://engadget.com/2161234/chatgpt-developed-a-goblin-obsession-after-openai-tried-to-make-it-nerdy
- GIGAZINE, OpenAI explains why ChatGPT and Codex started repeatedly using the word "goblin" (1 May 2026): https://www.gigazine.net/gsc_news/en/20260501-chatgpt-codex-goblin
- Anthropic, How Claude remembers your project (CLAUDE.md locations,
/init,/memory, writing tips): https://code.claude.com/docs/en/memory (checked 23 Oct 2026) - Anthropic, System prompts (official, per model): https://platform.claude.com/docs/en/release-notes/system-prompts (checked 23 Oct 2026)
- The repo: https://github.com/asgeirtj/system_prompts_leaks (checked 23 Oct 2026; 70,047 stars; the quoted line is in
OpenAI/Codex/gpt-5.5.md; contents leaked and unconfirmed by the companies) - Maker's GitHub profile: https://github.com/asgeirtj