write-the-claude-md

write-the-claude-md is a skill for Claude Code from impactbrussels/AINativeOS. It costs 168 tokens per session (1,428 once invoked), scanned A, original, Apache-2.0.

A method for writing one short master document that explains a codebase’s purpose, structure, rules, and working habits to an AI coding agent. Files such as CLAUDE.md, AGENTS.md, or Cursor rules provide this standing context at the start of a session.

In plain words
What is it for?
Documenting system structure, development rules, verification steps, and durable project context, then keeping that guidance aligned across coding-agent tools.
Why use it?
It stops the agent from repeatedly guessing how the repository works after its conversation context is gone, reducing inconsistent implementations and regressions.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

Part of the ai-native-os plugin — 25 skills, 6 agents shipped together

Good fit Documenting system structure, development rules, verification steps, and durable project context, then keeping that guidance aligned across coding-agent tools.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/impactbrussels/ainativeos/write-the-claude-md
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add impactbrussels/AINativeOS --skill write-the-claude-md
Clone the repo
git clone --depth 1 https://github.com/impactbrussels/AINativeOS

Made for: Claude Code.

Or install ai-native-os, the plugin that ships this one along with the rest of its 25 skills, 6 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for write-the-claude-md

README.md
[![agentmods](https://agentmods.dev/badge/skills/impactbrussels/ainativeos/write-the-claude-md/github.svg)](https://agentmods.dev/skills/impactbrussels/ainativeos/write-the-claude-md)
Your own site
<a href="https://agentmods.dev/skills/impactbrussels/ainativeos/write-the-claude-md"><img src="https://agentmods.dev/badge/skills/impactbrussels/ainativeos/write-the-claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for write-the-claude-md

Your own site · 80×15
<a href="https://agentmods.dev/skills/impactbrussels/ainativeos/write-the-claude-md"><img src="https://agentmods.dev/badge/skills/impactbrussels/ainativeos/write-the-claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 168 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,428 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00168 $0.01428
Opus 5 $0.00084 $0.00714
Sonnet 5 $0.00034 $0.00286
Haiku 4.5 $0.00017 $0.00143

Measured 9d ago against content hash ea55d6cdda94, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

write-the-claude-md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/write-the-claude-md/SKILL.md · 104 lines

How it starts

The opening of the file, as written. The whole thing — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Write the CLAUDE.md

A clever prompt dies the instant the context window clears. The agent forgets, reconstructs a theory of your system from whatever it can see, and builds against that improvised theory, slightly differently every session, until one repository houses three half-systems that almost agree. The master file is the cure. It is the memory the model does not have: the one document read at the top of every session so the work starts where you left it, not from a guess. Write it before the first feature, not after the first regression.

The method

Author one master file, mirror it to every platform, and keep it alive with a session-end ritual. Full anatomy, worked before-and-after, and anti-patterns: references/master-file-anatomy.md.

Step 1: Write the seven sections, and nothing else

The file earns its keep by being short and current. Include the standing context an agent would otherwise guess; exclude anything that lives better in code or goes stale by Friday.

Section What it holds Keep out
What this is One paragraph: the product and its one closed loop. Marketing copy.
System inventory The four pillars named: Brain, Memory, Planning, Tools. API keys, secrets.
Principles The non-negotiable rules of this codebase. Generic best practice the model already knows.
Constraints The limits a newcomer would break by accident. Anything enforced by a linter or test.
Decisions Dated trade-offs made and why, newest first. Decisions already reversed; prune them.
Glossary pointers Links to the domain terms, not the definitions. Full definitions that drift from source.
Update ritual The one-line rule for keeping this file alive. A changelog of every commit.

Step 2: Mirror it across every platform you use

The same source serves four runtimes. A rule in only one file is a rule the other three agents break.

Platform File it reads
Claude Code CLAUDE.md
Codex AGENTS.md
Cursor .cursor/rules/<name>.mdc
Gemini CLI GEMINI.md

Read the full file on GitHub · 104 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 104 lines · 168 tokens per session scan A ea55d6cdda94

Subscribe to this mod's changes

write-the-claude-md is a skill published in the GitHub repository impactbrussels/AINativeOS (1 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 168 tokens to every session and 1,428 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.