api-documentation-generator

Generate OpenAPI specs from TypeScript Express, Next.js, and Fastify source code.

Updated Jan 15, 2026
One-click install
npx skills add https://github.com/zero-rehq/opencode-kit --skill api-documentation-generator-zero-rehq
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: api-documentation-generator
Source: https://github.com/zero-rehq/opencode-kit/tree/main/.opencode/skill/api-documentation-generator
Command: npx skills add https://github.com/zero-rehq/opencode-kit --skill api-documentation-generator-zero-rehq

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill automatically generates OpenAPI/Swagger documentation directly from source code (TypeScript, Express, Next.js). It keeps API specs in sync with the implementation, surfaces undocumented endpoints, validates cross-repo contracts (DTOs and request/response shapes), and can generate typed API clients from the OpenAPI spec.

Core Features & Use Cases

  • Auto-generation: parses code and generates an OpenAPI spec
  • Validation: ensures all endpoints are documented
  • Type safety: produces TypeScript types for DTOs
  • Client generation: creates typed API clients
  • Drift detection: reports discrepancies between docs and code
  • Framework integration: works with Express, Next.js, Fastify, NestJS, and tRPC

Quick Start

pnpm api-docs:generate pnpm api-docs:validate pnpm api-docs:drift pnpm api-docs:client

Frequently Asked Questions about api-documentation-generator

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

FAQPage Schema
How do I auto-generate OpenAPI documentation from TypeScript Express source code?▼

This Skill parses your TypeScript Express source code to automatically generate OpenAPI documentation, keeping your API specs in sync with the implementation and detecting undocumented endpoints.

Can I generate typed API clients and DTOs from an OpenAPI spec in Next.js?▼

Yes, you can generate typed API clients and TypeScript DTOs from an OpenAPI spec in Next.js projects, producing type-safe clients directly from your validated API documentation.

Does this approach work with Fastify and NestJS frameworks for API validation?▼

Yes, this approach works with Fastify and NestJS frameworks for API validation, parsing their source code to validate endpoint coverage and ensure all routes are fully documented.

How do I detect drift between my API documentation and code implementation?▼

You detect drift between your API documentation and code implementation by running a validation command that reports discrepancies, ensuring your OpenAPI specs always match your actual implementation.

What is the best way to keep OpenAPI specs in sync across multiple repositories?▼

The best way to keep OpenAPI specs in sync across multiple repositories is to validate cross-repo contracts, detecting drift and ensuring DTOs and request/response shapes match across different codebases.