api-doc-gen

Generate and validate OpenAPI specifications for Go HTTP handlers.

5|2|Updated Mar 20, 2026
One-click install
npx skills add https://github.com/srnichols/plan-forge --skill api-doc-gen-srnichols
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-doc-gen
Source: https://github.com/srnichols/plan-forge/tree/main/presets/go/.github/skills/api-doc-gen
Command: npx skills add https://github.com/srnichols/plan-forge --skill api-doc-gen-srnichols

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the process of generating and validating OpenAPI specifications for Go HTTP services, ensuring consistency between code and documentation.

Core Features & Use Cases

  • API Documentation Generation: Automatically create or update OpenAPI specs from Go HTTP handler registrations.
  • Consistency Validation: Checks spec-to-code consistency to avoid documentation drift.
  • Use Case: For developers of Go services who want to maintain up-to-date API documentation alongside their codebase.

Quick Start

Generate API docs for your service using the api-doc-gen skill.

Frequently Asked Questions about api-doc-gen

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

FAQPage Schema
How do I generate OpenAPI documentation from Go HTTP handlers?

You can generate OpenAPI documentation from Go HTTP handlers automatically by using a tool that parses handler registrations to create or update API specifications, ensuring your docs reflect your codebase.

What is the best way to prevent API documentation drift in Go services?

Preventing API documentation drift in Go services requires consistency validation that checks spec-to-code alignment, ensuring your OpenAPI specifications remain up-to-date and accurate alongside your codebase.

Can I automate OpenAPI spec validation for my existing Go HTTP services?

Yes, you can automate OpenAPI spec validation for existing Go HTTP services by checking spec-to-code consistency programmatically, which avoids manual documentation checks and prevents drift.

Does automated API documentation generation work with standard Go HTTP handler registrations?

Automated API documentation generation works with Go HTTP handler registrations by extracting route and handler information to automatically create or update OpenAPI specifications for your services.

Why does my OpenAPI spec not match my Go service codebase?

Your OpenAPI spec might not match your Go service codebase due to documentation drift, which happens when manual specs are not updated; consistency validation checks spec-to-code alignment to fix this.

When do I need to validate spec-code consistency for my API documentation?

You need to validate spec-code consistency for API documentation whenever you modify Go HTTP handlers, ensuring your OpenAPI specifications stay accurate and preventing drift between your code and docs.