API Docs Generator for Openclaw

An AI-powered command-line tool that transforms route files into comprehensive Markdown documentation or OpenAPI specifications instantly.

lxgicstudios
v1.0.2
Jan 29, 2026
0
0
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install ai-api-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 ai-api-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 API Docs Generator?

The API Docs Generator is a streamlined utility designed to bridge the gap between code and documentation. By analyzing source files, this Openclaw Skills entry eliminates the manual labor of writing endpoint descriptions, request/response schemas, and API structures. It leverages intelligent parsing to ensure your documentation stays in sync with your codebase without requiring complex configuration.

Whether you are preparing for a handoff or setting up a Swagger UI, this tool simplifies the developer workflow by extracting technical details directly from your route logic. As a core component within the Openclaw Skills collection, it provides a developer-first approach to maintaining high-quality technical assets with zero manual overhead.

API Docs Generator Use Cases

  • Converting undocumented legacy codebases into readable API documentation for better maintenance.
  • Generating OpenAPI 3.0 specs for Swagger UI integration on MVP projects where speed is critical.
  • Onboarding new developers by providing an instant, accurate overview of all available endpoints.
  • Automating documentation updates within a CI/CD pipeline to prevent documentation rot as the codebase evolves.

How API Docs Generator Works

  1. The tool scans the specified directories to identify route files and identify handler logic.
  2. It parses HTTP methods, URI paths, and underlying handler code to extract raw technical metadata.
  3. The engine utilizes GPT-4o-mini to infer request/response shapes and generate human-readable descriptions.
  4. The final output is formatted into either clean Markdown for documentation sites or a structured OpenAPI YAML/JSON file for tooling.

API Docs Generator Setup

Ensure you have Node.js 18 or higher installed on your system. To use this feature from the Openclaw Skills toolkit, set your OpenAI API Key as an environment variable:

export OPENAI_API_KEY='your_api_key_here'

Run the generator using npx without any prior global installation:

npx ai-api-docs ./src/routes/

API Docs Generator Data Schema & Taxonomy

Output Type Description
Markdown Generates an API_DOCS.md file containing human-friendly endpoint summaries.
OpenAPI Spec Generates a spec.yaml or spec.json compatible with OpenAPI 3.0 standards.
Metadata Extraction Automatically identifies paths, methods, headers, and payload structures.

API Docs Generator Advanced Features

  • Support for multi-directory scanning to aggregate routes from various internal modules.
  • Customizable output paths and filenames for seamless integration into existing documentation folders.
  • Enhanced TypeScript integration which uses type definitions to improve description accuracy.
  • Flexible formatting options to switch between human-centric Markdown and machine-readable OpenAPI specs.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*