ai-md

ai-md is a skill for Claude Code, Codex from LeoYeAI/openclaw-master-skills. It costs 173 tokens per session (5,121 once invoked), scanned B, a copy of ai-md, MIT.

A method for rewriting human-written AI instructions into a structured format that language models can follow more reliably. It focuses on making each rule clear and separate.

In plain words
What is it for?
Use it to convert CLAUDE.md files or other AI instructions into clearer guidance for coding agents.
Why use it?
Long prose instructions can cause an AI system to overlook some rules. Structured instructions make important constraints easier for the model to process.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Codex.

Good fit Use it to convert CLAUDE.md files or other AI instructions into clearer guidance for coding agents.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/leoyeai/openclaw-master-skills/ai-md
About the project

OpenClaw Master Skills is a curated, regularly updated collection of skills that extends an AI personal assistant platform with capabilities such as research, browser automation, presentation creation, and prompt work. It is intended for people using OpenClaw or MyClaw.ai to give their agents additional tasks and workflows. The catalogue contains many skills and agents from this collection.

LeoYeAI/openclaw-master-skills · 2,139 stars · on GitHub · myclaw.ai

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 LeoYeAI/openclaw-master-skills --skill ai-md
Clone the repo
git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills

Made for: Claude Code, Codex.

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/leoyeai/openclaw-master-skills/ai-md/github.svg)](https://agentmods.dev/skills/leoyeai/openclaw-master-skills/ai-md)
Your own site
<a href="https://agentmods.dev/skills/leoyeai/openclaw-master-skills/ai-md"><img src="https://agentmods.dev/badge/skills/leoyeai/openclaw-master-skills/ai-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 ai-md

Your own site · 80×15
<a href="https://agentmods.dev/skills/leoyeai/openclaw-master-skills/ai-md"><img src="https://agentmods.dev/badge/skills/leoyeai/openclaw-master-skills/ai-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 173 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,121 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 88% 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.00173 $0.05121
Opus 5 $0.00086 $0.02560
Sonnet 5 $0.00035 $0.01024
Haiku 4.5 $0.00017 $0.00512

Measured 7d ago against content hash 162ebcc5018a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, 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 7d 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

88% identical to ai-md — 529 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 · 525 lines

How it starts

The opening of the file, as written. The whole thing — 525 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

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.

# AI must infer: what does (防搞混) modify? what does 例外 apply to?
GATE-1: 收到任務→先用一句話複述(防搞混)(長對話中每個新任務都重新觸發) | 例外: signals命中「處理一下」=直接執行

# AI reads labels directly: trigger→action→exception. Zero ambiguity.
GATE-1 複述:
  trigger: new-task
  action: first-sentence="你要我做的是___"
  persist: 長對話中每個新任務都重新觸發
  exception: signal=處理一下 → skip
  yields-to: GATE-3

Read the full file on GitHub · 525 lines

Files

What ships with it

6 files 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. 7d ago First seen · 525 lines · 173 tokens per session scan B 162ebcc5018a

Subscribe to this mod's changes

ai-md is a skill published in the GitHub repository LeoYeAI/openclaw-master-skills (2,139 stars, last pushed 1mo ago), licensed MIT. It adds 173 tokens to every session and 5,121 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it B with 2 findings (reads agent configuration directories, makes network calls). It is 88% identical to ai-md, differing in 529 lines, and is treated as a copy.

Related

Other skills, from other repositories

ai-md

AI.MD — Convert any human-written CLAUDE.md into AI-native structured format. Your CLAUDE.md is read by AI every single turn, not by you — so write it in AI's language. Battle-tested: 5 rounds, 4 models (GPT-5.3, Gemini 2.5 Pro, Grok-4, Claude Opus 4.6). Structured-label format raised Codex compliance from 6/8 → 8/8…

sstklen/ai-md · 173 tokens

skill-authoring

Author SKILL.md skills: frontmatter, validator limits, structure.

mateaix/mateclaw · 18 tokens

prompt-optimization

Use this skill when the user wants to optimize, modify, or improve the system prompt of an AI agent. This includes requests like 'optimize the prompt', 'make the AI more focused on X', 'change the system prompt', 'improve the agent behavior', or 'modify how the AI responds'.

wecode-ai/Wegent · 62 tokens

comfyui-skill-openclaw

Run registered ComfyUI workflows through the fast comfyui-skill CLI, and use the official local Comfy MCP for live template, node, model, validation, and orchestration capabilities. Use this Skill when: (1) The user requests to "generate an image", "draw a picture", or "execute a ComfyUI workflow". (2) The user has…

HuangYuChuh/ComfyUI_Skills_OpenClaw · 125 tokens

skill-authoring

Creates and structures SKILL.md files for AI coding agents, including YAML frontmatter, trigger phrases, directive instructions, decision trees, code examples, and verification checklists. Use when the user asks to write a new skill, create a skill file, author agent capabilities, generate skill documentation, or…

rohitg00/skillkit · 72 tokens

find-skills

Discovers, searches, and installs skills from multiple AI agent skill marketplaces (400K+ skills) using the SkillKit CLI. Supports browsing official partner collections (Anthropic, Vercel, Supabase, Stripe, and more) and community repositories, searching by domain or technology, and installing specific skills from…

rohitg00/skillkit · 162 tokens