claude-md-writer
Installation
SKILL.md
CLAUDE.md Writer
Write CLAUDE.md files that Claude Code actually follows. Every line must earn its place — CLAUDE.md loads every conversation turn, consuming context window tokens each time.
How CC Loads CLAUDE.md
CLAUDE.md is delivered as a user message after the system prompt — advisory context, not enforced configuration. Adherence degrades with file length and conflicting rules.
Loading order (lowest → highest priority):
- Managed policy (
/Library/Application Support/ClaudeCode/CLAUDE.md) — org-wide, cannot exclude - User global (
~/.claude/CLAUDE.md+~/.claude/rules/) - Project walkup — from working dir upward:
./CLAUDE.md+./.claude/CLAUDE.md+./.claude/rules/at each level - Local (
./CLAUDE.local.md) — personal, not git-tracked - Additional dirs (via
CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MDenv var)
Subdirectory CLAUDE.md files lazy-load when Claude touches files in that directory.
Compaction: CLAUDE.md survives /compact — re-read from disk and re-injected. Conversation-only instructions are lost.