Auto Doc Index for Openclaw

A zero-dependency automation tool to synchronize documentation index tables with file frontmatter to prevent metadata drift.

erergb
v1.2.0
Feb 28, 2026
0
1k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install auto-doc-index

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 auto-doc-index 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 Auto Doc Index?

The Auto Doc Index skill is designed to solve the critical problem of manual documentation maintenance. In real-world environments, hand-maintained index tables suffer from high error rates, including truncated titles, fabricated statuses, and invented dates. This tool replaces manual editing with an automated, idempotent workflow that derives index tables directly from the structured frontmatter of individual files.

By treating the index as a stateless pure function of the source documents, this skill ensures that your README remains a truthful reflection of your project's ADRs, RFCs, and design docs. It is an essential utility for teams leveraging Openclaw Skills to maintain high-quality documentation governance without the friction of manual updates or merge conflicts.

Auto Doc Index Use Cases

  • Establishing new documentation directories for Architecture Decision Records (ADRs) or RFCs.
  • Automatically updating a central README index when a new document is added by a contributor or AI agent.
  • Auditing and migrating legacy hand-maintained doc indexes to eliminate silent data drift.
  • Managing multi-contributor documentation workflows where shared mutable state in a README causes frequent merge conflicts.

How Auto Doc Index Works

  1. Scan the target directory for documentation files matching a specific naming pattern.
  2. Parse metadata (Title, Status, Date) from each file using regex-based frontmatter extraction.
  3. Sort the parsed entries by document ID or chronological order.
  4. Generate a GitHub Flavored Markdown table representing the current state of the directory.
  5. Inject the generated table into the README.md file strictly between the <!-- INDEX:START --> and <!-- INDEX:END --> markers, leaving all other content untouched.

Auto Doc Index Setup

1. Define Frontmatter

Ensure your documentation files (e.g., ADRs) use a consistent metadata format, such as Status: Decided or **Status:** resolved.

2. Prepare README.md

Add the following markers where you want the table to appear:

<!-- INDEX:START -->
<!-- INDEX:END -->

3. Initialize Script

Create a generator script using the provided TypeScript template. Ensure it requires no external parsing libraries to maintain a lightweight footprint.

4. Execute

Run the generator using the following command:

npx tsx scripts/generate-doc-index.ts all

Auto Doc Index Data Schema & Taxonomy

The skill organizes data based on a source-to-target mapping:

Component Description
Source Files Individual Markdown docs (e.g., 001-initial-auth.md) containing frontmatter.
Metadata Taxonomy Extracted fields typically include Title, Status, Date, and Category.
Injection Zone The specific region in README.md bounded by HTML comment markers.
Parser Regex-based logic that identifies Pattern A (Inline) or Pattern B (Bold-field) metadata.

Auto Doc Index Advanced Features

  • Support for multiple document patterns (ADR, RFC, Pitfalls) within a single project repository.
  • Zero-dependency architecture ensuring the skill runs in restricted environments without installing heavy YAML parsers.
  • Conflict-free multi-agent support by moving from shared state to independent file operations.
  • Easy integration into CI/CD pipelines or pre-commit hooks to enforce documentation truthfulness.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*