Agent Docs for Openclaw

A framework for creating documentation specifically optimized for LLM consumption, RAG retrieval, and token efficiency.

tylervovan
v1.0.0
Feb 1, 2026
4
4k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install agent-docs

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 agent-docs 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 Agent Docs?

Agent Docs provides a structured methodology for writing documentation that AI agents can consume with maximum efficiency and accuracy. By implementing the Hybrid Context Hierarchy, this approach ensures that agents have the right context at the right time—minimizing token waste while achieving significantly higher pass rates on complex tasks compared to standard documentation. It moves beyond human-centric writing to focus on machine-readability, primacy bias mitigation, and high signal-to-noise ratios.

This framework is essential for developers building with Openclaw Skills who need their agents to navigate large codebases without getting lost in the middle of long context windows. By following these standards, you can transform a project's documentation into a high-performance asset for any AI-driven development workflow.

Agent Docs Use Cases

  • Writing SKILL.md and README files that AI coding agents can parse instantly.
  • Structuring API documentation for efficient RAG retrieval within agentic workflows.
  • Developing AGENTS.md files to serve as an inline constitution for LLMs.
  • Optimizing project context for use within the Openclaw Skills ecosystem.
  • Reducing hallucinations by providing explicit negative constraints and compressed indexes.

How Agent Docs Works

  1. Establish a Layer 1 Constitution (AGENTS.md) containing critical governance, security rules, and architectural constraints to be kept always in context.
  2. Create a Layer 2 Reference Library of local Markdown files for framework-specific guides and detailed API schemas fetched on demand.
  3. Define Layer 3 External Research boundaries for edge cases and third-party documentation gated by allow-lists.
  4. Compress indexes and function signatures to maximize token efficiency, prioritizing file paths over full code blocks.
  5. Format content into self-contained chunks at header boundaries to ensure RAG systems retrieve complete, relevant information blocks.

Agent Docs Setup

To start using this framework with your Openclaw Skills, initialize the core documentation files in your project root:

# Create the primary context file for AI agents
touch AGENTS.md

# Initialize the machine-readable index for external tools
touch llms.txt

# Create a directory for secondary reference material
mkdir -p docs/reference

Agent Docs Data Schema & Taxonomy

The framework organizes documentation into three distinct tiers to manage the tradeoff between context depth and token cost:

Tier Filename Content Type Token Budget
Layer 1 AGENTS.md Security rules, build commands, and doc index 2,000 – 4,000
Layer 2 docs/**/*.md Implementation details and API reference 1,000 – 5,000 per chunk
Layer 3 External Edge cases and third-party documentation On-demand retrieval
Index llms.txt Compressed map of all available resources < 8 KB

Agent Docs Advanced Features

  • Implementation of the Hybrid Context Hierarchy for tiered context management.
  • Support for the llms.txt standard to facilitate machine-readable project indexing.
  • Primacy bias optimization by front-loading critical governance at the top of documents.
  • RAG-ready chunking strategies using descriptive H2 headers to improve search relevance.
  • Signal-to-Noise Ratio (SNR) enhancement by stripping marketing text and preambles.
  • Integration patterns for Openclaw Skills to automate context injection and retrieval.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*