ai-md
Convert human-written CLAUDE.md into AI-native structured-label format. Battle-tested across 4 models. Same rules, fewer tokens, higher compliance.
npx skills add majiayu000/claude-skill-registry --skill ai-md --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# AI.MD v4 — The Complete AI-Native Conversion System ## When to Use This Skill - Use when your CLAUDE.md is long but AI still ignores your rules - Use when token usage is too high from verbose system instructions - Use when you want to optimize any LLM system prompt for compliance - Use when migrating rules between AI tools (Claude, Codex, Gemini, Grok) ## What Is AI.MD? AI.MD is a methodology for converting human-written `CLAUDE.md` (or any LLM system instructions) into a structured-label format that AI models follow more reliably, using fewer tokens. **The paradox we proved:** Adding more rules in natural language DECREASES compliance. Converting the same rules to structured format RESTORES and EXCEEDS it. ``` Human prose (6 rules, 1 line) → AI follows 4 of them Structured labels (6 rules, 6 lines) → AI follows all 6 Same content. Different format. Different results. ``` --- ## Why It Works: How LLMs Actually Process Instructions LLMs don't "read" — they **attend**. Understanding this changes everything. ### Mechanism 1: Attention Splitting When multiple rules share one line, the model's attention distributes across all tokens equally. Each rule gets a fraction of the attention
- When to Use This Skill
- What Is AI.MD?
- Why It Works: How LLMs Actually Process Instructions
- Mechanism 1: Attention Splitting
- Mechanism 2: Zero-Inference Labels
- Mechanism 3: Semantic Anchoring
- The Conversion Process: What Happens When You Give Me a CLAUDE.md
- Phase 1: UNDERSTAND — Read Like a Compiler, Not a Human
- Phase 2: DECOMPOSE — Break Every | and () Into Atomic Rules
- Phase 3: LABEL — Assign Function Labels
- Phase 4: STRUCTURE — Build the Architecture
- Phase 5: RESOLVE — Handle Conflicts and Edge Cases
- Phase 6: TEST — Multi-Model Validation (Non-Negotiable)
- Special Techniques Discovered During Battle-Testing
echo "=== Current Token Burn ===" echo "CLAUDE.md: $claude_md bytes" echo "rules/*.md: $rules bytes" echo "Total: $total bytes ≈ $tokens tokens/turn" echo "50-turn session: ≈ $((tokens * 50)) tokens on instructions alone"
What does the ai-md skill do?
Convert human-written CLAUDE.md into AI-native structured-label format. Battle-tested across 4 models. Same rules, fewer tokens, higher compliance.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill ai-md --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
