documenting-apis

Generate Markdown API specs and OpenAPI/Swagger files from codebase analysis.

11|1|Updated Aug 6, 2025
One-click install
npx skills add https://github.com/thkt/claude-config --skill documenting-apis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: documenting-apis
Source: https://github.com/thkt/claude-config/tree/main/skills/documenting-apis
Command: npx skills add https://github.com/thkt/claude-config --skill documenting-apis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tree-sitter-analyzer, jq, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Automates generation of API specifications by analyzing code for REST endpoints, type definitions, and schemas, producing consistent docs.

Core Features & Use Cases

  • Endpoints discovery with method, path, handler
  • Type definitions and OpenAPI/Swagger generation
  • Output-ready Markdown API docs for teams and docs sites

Quick Start

Run the docs:api command to generate docs. The output is a Markdown document in the docs structure and can be consumed by /docs:api.

Frequently Asked Questions about documenting-apis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate API documentation from my codebase automatically?

Generate API documentation by analyzing your codebase for REST endpoints, function signatures, and type definitions. This Skill detects endpoints across Node.js frameworks (Express, Fastify, Hono), Next.js routes, Flask, FastAPI, and Django REST, then outputs Markdown specs and OpenAPI/Swagger files ready for documentation sites.

Can I extract OpenAPI and Swagger specifications from my code?

Yes. The Skill analyzes your codebase to extract endpoints, schemas, and type definitions, then generates OpenAPI/Swagger YAML or JSON artifacts automatically. These artifacts capture method, path, handler, and type information for standards-compliant API documentation.

What frameworks and platforms does codebase API analysis support?

Supported frameworks include Express, Fastify, Hono, Flask, FastAPI, and Django REST. For Next.js, both app/api and pages/api routes are detected. Python type definitions are also extracted to build complete type schemas for your API specification.

How do I document endpoints without maintaining specs manually?

Run the docs:api command to scan your codebase and generate endpoint documentation automatically. The Skill produces a Markdown API spec template with Overview, Endpoints, and Type Definitions sections, eliminating manual spec maintenance as your code evolves.

What output formats does API documentation generation produce?

Output includes a Markdown-based API spec template with structured sections, plus OpenAPI/Swagger YAML and JSON files. The Markdown output is validated for formatting and ready to consume by documentation tools and sites.

Do I need to write endpoint schemas separately from my code?

No. The Skill detects type definitions and schemas directly from your codebase—no separate schema files required. It extracts signatures and type information from your frameworks and Python type hints to build complete, accurate API specifications.