gen-api-docs

Generate Markdown API documentation from Rails routes and controllers.

Updated Apr 20, 2026
One-click install
npx skills add https://github.com/erwaen/one-shot-test --skill gen-api-docs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gen-api-docs
Source: https://github.com/erwaen/one-shot-test/tree/main/.claude/skills/gen-api-docs
Command: npx skills add https://github.com/erwaen/one-shot-test --skill gen-api-docs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate API documentation from existing routes and controllers to provide an up-to-date reference for developers and integrators.

Core Features & Use Cases

  • Live-route extraction: reads Rails routes to enumerate all API endpoints under /api/v1.
  • Controller & serializer awareness: inspects app/controllers/api/v1/ and app/serializers/ to derive request/response shapes.
  • Markdown output: writes a structured docs/API.md with endpoints, params, examples, and common error cases.
  • Use case: After API development, quickly generate docs for onboarding and external clients.

Quick Start

Run the gen-api-docs skill after building your API to generate docs/API.md.

Frequently Asked Questions about gen-api-docs

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

FAQPage Schema
How do I auto-generate Markdown API docs from Rails routes and controllers?

Markdown API docs are auto-generated by extracting live Rails routes and inspecting API controllers and serializers. This skill scopes to versioned namespaces like /api/v1 and writes a structured docs/API.md file with endpoints and examples.

What information is included when generating API documentation from Rails serializers?

Generating API documentation from Rails serializers includes the HTTP method, path, required role, query params, request and response examples, and common error cases. It inspects app/controllers/api/v1/ and app/serializers/ to derive these response shapes.

Can I generate API reference docs for a specific versioned namespace like /api/v1 in Rails?

Yes, you can generate API reference docs for specific versioned namespaces like /api/v1 in Rails. The skill scopes exclusively to these API versioned namespaces to enumerate all endpoints and derive request and response shapes from the corresponding controllers.

What's the best way to document Rails API endpoints for external clients after development?

The best way to document Rails API endpoints for external clients is to auto-extract them from live routes and serializers. This ensures your API documentation stays up-to-date by reading actual controller logic and outputting a comprehensive Markdown file.

Do I need Rails environment access to extract API routes and generate Markdown documentation?

Yes, you need Rails environment access to extract API routes and generate Markdown documentation. The skill requires direct access to your Rails environment to read routes, inspect controllers, and parse serializers to derive accurate request and response shapes.