AI.MD: AI-Native Structured Instructions for Openclaw

AI.MD is a methodology and conversion tool that transforms human-readable system instructions into high-precision, structured labels optimized for LLM attention and token efficiency.

sstklen
v4.0.0
Mar 11, 2026
0
940
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install ai-md

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install ai-md using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is AI.MD: AI-Native Structured Instructions?

AI.MD is a specialized skill within the Openclaw Skills ecosystem designed to solve the paradox of decreasing AI compliance: as human-written instructions grow longer and more descriptive, AI performance often degrades. This skill applies a battle-tested conversion system that rewrites natural language prose into a structured-label format (e.g., triggers, actions, and exceptions).

By leveraging the way Large Language Models (LLMs) actually process information—through attention mechanisms rather than human-style reading—AI.MD ensures that every rule receives full attention weight. This approach has been proven across multiple models, including GPT-5.3 and Claude Opus 4.6, to increase Codex compliance from 6/8 to a perfect 8/8 while significantly reducing the token footprint of system prompts.

AI.MD: AI-Native Structured Instructions Use Cases

  • Reducing high token consumption in long-running AI coding sessions.
  • Fixing 'instruction drift' where the AI ignores specific rules in a large CLAUDE.md file.
  • Standardizing system instructions across different LLM models (GPT, Gemini, Claude, Grok).
  • Optimizing complex workflows involving multiple triggers, safety gates, and cross-references.

How AI.MD: AI-Native Structured Instructions Works

  1. The skill analyzes existing instructions as a state machine rather than a document, identifying atomic Triggers, Actions, and Constraints.
  2. It decomposes compound rules into single-concept lines to prevent 'Attention Splitting'.
  3. It assigns Zero-Inference Labels (like trigger:, persist:, or yields-to:) to declare meaning explicitly without requiring model inference.
  4. Rules are organized into a hierarchical structure using XML section tags like <gates>, <rules>, and <rhythm> to create semantic boundaries.
  5. The system handles hidden conflicts using a Priority Matrix to ensure safety gates always fire before courtesy actions.
  6. Finally, the converted output is validated against a multi-model exam protocol to ensure cross-platform reliability.

AI.MD: AI-Native Structured Instructions Setup

To integrate AI.MD into your Openclaw Skills library, follow these steps:

# Navigate to your project directory
cd your-project

# Run the distill command to analyze your current CLAUDE.md
openclaw run ai-md distill

# Or use the specific trigger phrases within your AI agent interface
# "distill my CLAUDE.md" or "rewrite my MD for AI"

AI.MD: AI-Native Structured Instructions Data Schema & Taxonomy

AI.MD organizes system instructions into an AI-native hierarchy for optimal parsing:

Section Function Content Type
<user> Persona & Identity Key-Value pairs (e.g., tone: technical)
<gates> Hard Constraints Trigger-Action-Exception sequences
<rules> Behavioral Guidelines Atomic behavioral rules with function labels
<rhythm> Workflow Patterns Temporal constraints and recurring patterns
<conn> Static Facts Uncompressed credentials, URLs, or file paths
<learn> System Evolution Instructions for how the agent should adapt

This schema ensures that Openclaw Skills maintain a 'Single Source of Truth' while using cross-references instead of rule duplication.

AI.MD: AI-Native Structured Instructions Advanced Features

  • Bilingual Label Strategy: Uses English labels for universal LLM understanding while maintaining native-language output for users.
  • State Machine Architecture: Treats instruction sets as logic gates with explicit yields-to priority management.
  • Semantic Anchoring: Creates matchable tags that act like hash table lookups for faster, more accurate intent matching.
  • Conflict Detection Matrix: Automatically identifies and resolves logical overlaps between different instruction sets.
  • Token Burn Preview: Provides a real-time calculation of byte-to-token savings before and after conversion.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*