golang-swagger

Generate Swagger/OpenAPI documentation from Go code annotations.

Updated May 30, 2026
One-click install
npx skills add https://github.com/ozan-fn/mqtt-capture --skill golang-swagger-ozan-fn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-swagger
Source: https://github.com/ozan-fn/mqtt-capture/tree/main/.agents/skills/golang-swagger
Command: npx skills add https://github.com/ozan-fn/mqtt-capture --skill golang-swagger-ozan-fn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires go, swag, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill automates the generation and management of Swagger/OpenAPI documentation for Golang projects, simplifying the process of creating and maintaining API documentation.

Core Features & Use Cases

  • Automatic Documentation Generation: Generates Swagger/OpenAPI documentation from Go code using annotations.
  • Framework Integration: Supports various Go web frameworks like Gin, Echo, Fiber, Chi, and net/http.
  • Customization: Allows customization of documentation with various annotations for detailed control.
  • Use Case: Ideal for Go API developers looking to automate the generation of Swagger UI for their API documentation, saving time and reducing manual errors.

Quick Start

Generate Swagger documentation for your Go project by running 'swag init' in the root directory of your project.

Frequently Asked Questions about golang-swagger

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

FAQPage Schema
How do I generate Swagger documentation for my Golang API?

Generate Swagger documentation for your Golang API by running 'swag init' in the project root. This parses Go code annotations and automatically outputs OpenAPI specification files using the swaggo/swag library.

How does swaggo/swag parse Go code to create OpenAPI specifications?

Swaggo/swag parses Go code annotations to create OpenAPI specifications by reading specific comment formats above your API handler functions, automatically extracting metadata to produce the documentation.

Can I generate Swagger docs for Go web frameworks like Gin, Echo, or Fiber?

Yes, you can generate Swagger docs for Go web frameworks like Gin, Echo, Fiber, Chi, and net/http. The generated OpenAPI documentation integrates directly with these frameworks to serve the Swagger UI.

Do I need to install the swag CLI to automate OpenAPI documentation generation?

Yes, you need both the go environment and the swag CLI installed to automate OpenAPI documentation generation. These dependencies are required to parse annotations and generate the API documentation files.

How do I customize OpenAPI documentation annotations in a Go project?

Customize OpenAPI documentation annotations in a Go project by modifying the comment blocks above your handlers. Swaggo/swag supports various annotation formats, allowing detailed control over API endpoint metadata.