ai-md

ai-md is a skill for Claude Code from satnamrsm/https-github.com-sickn33-antigravity-awesome-skills. It costs 33 tokens per session (4,927 once invoked), scanned B, a copy of ai-md, MIT.

A method for rewriting CLAUDE.md, a file that gives instructions to an AI coding assistant, into short structured labels. It keeps the same rules while organizing them in a format intended to be easier for models to follow.

In plain words
What is it for?
Use it to restructure CLAUDE.md or other AI instructions, reduce prompt length, improve rule visibility, or adapt instructions for different AI coding tools.
Why use it?
Long, natural-language instruction files can use many tokens and still be partly ignored. The conversion makes important rules more explicit and reduces unnecessary wording.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Codex.

Part of the antigravity-awesome-skills plugin — 198 skills shipped together

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.

agentmods
npx agentmods add skills/satnamrsm/https-github.com-sickn33-antigravity-awesome-skills/ai-md
Any agent
npx skills add satnamrsm/https-github.com-sickn33-antigravity-awesome-skills --skill ai-md
Clone the repo
git clone --depth 1 https://github.com/satnamrsm/https-github.com-sickn33-antigravity-awesome-skills

Made for: Claude Code.

Or install antigravity-awesome-skills, the plugin that ships this one along with the rest of its 198 skills.

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 ai-md

README.md
[![agentmods](https://agentmods.dev/badge/skills/satnamrsm/https-github.com-sickn33-antigravity-awesome-skills/ai-md.svg)](https://agentmods.dev/skills/satnamrsm/https-github.com-sickn33-antigravity-awesome-skills/ai-md)
Your own site
<a href="https://agentmods.dev/skills/satnamrsm/https-github.com-sickn33-antigravity-awesome-skills/ai-md"><img src="https://agentmods.dev/badge/skills/satnamrsm/https-github.com-sickn33-antigravity-awesome-skills/ai-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,927 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. Scan, not verified.
Origin 97% copy Near-identical to another mod 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.00033 $0.04927
Opus 5 $0.00016 $0.02464
Sonnet 5 $0.00007 $0.00985
Haiku 4.5 $0.00003 $0.00493

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

Security

Grade B, and why

ai-md scanned grade B with 2 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 6d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

rules=$(cat ~/.claude/rules/*.md 2>/dev/null | wc -c || echo 0)

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

EVIDENCE: no-fabricate no-guess | 禁用詞:應該是/可能是 → 先拿數據 | Read/Grep→行號 curl→數據 | "好像"/"覺得"→自己先跑test | guess=shame-wall
Origin

This is a copy

97% identical to ai-md — 5 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/ai-md/SKILL.md · 519 lines

How it starts

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

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 weight. Some rules get lost.

When each rule has its own line, the model processes it as a distinct unit. Full attention weight on each rule.

# ONE LINE = attention splits 5 ways (some rules drop to near-zero weight)
EVIDENCE: no-fabricate no-guess | 禁用詞:應該是/可能是 → 先拿數據 | Read/Grep→行號 curl→數據 | "好像"/"覺得"→自己先跑test | guess=shame-wall

# FIVE LINES = each rule gets full attention
EVIDENCE:
  core: no-fabricate | no-guess | unsure=say-so
  banned: 應該是/可能是/感覺是/推測 → 先拿數據
  proof: all-claims-need(data/line#/source) | Read/Grep→行號 | curl→數據
  hear-doubt: "好像"/"覺得" → self-test(curl/benchmark) → 禁反問user
  violation: guess → shame-wall

Mechanism 2: Zero-Inference Labels

Natural language forces the model to INFER meaning from context. Labels DECLARE meaning explicitly. No inference needed = no misinterpretation.

Read the full file on GitHub · 519 lines

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. 6d ago First seen · 519 lines · 33 tokens per session scan B 8ece61e4b20f

Subscribe to this mod's changes

ai-md is a skill published in the GitHub repository satnamrsm/https-github.com-sickn33-antigravity-awesome-skills (5 stars, last pushed yesterday), licensed MIT. It adds 33 tokens to every session and 4,927 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 2 findings (reads agent configuration directories, makes network calls). It is 97% identical to ai-md, differing in 5 lines, and is treated as a copy.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens