golang-swagger

Generate Swagger/OpenAPI documentation from Go annotations and framework integrations.

Updated May 19, 2026
One-click install
npx skills add https://github.com/monforje/.opencode --skill golang-swagger-monforje
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-swagger
Source: https://github.com/monforje/.opencode/tree/main/skills/cc-skills-golang/skills/golang-swagger
Command: npx skills add https://github.com/monforje/.opencode --skill golang-swagger-monforje

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires go, swag, gin, echo, fiber, chi, net/http, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Manages the documentation of Golang API projects using swaggo/swag, making it easier to maintain and integrate API documentation.

Core Features & Use Cases

  • Generate Swagger/OpenAPI Docs: Automates the creation of documentation based on Go code with annotation comments.
  • Framework Integration: Supports Gin, Echo, Fiber, Chi, and net/http frameworks.
  • Security and Struct Tags: Handles security definitions like Bearer/JWT and struct tags for Swagger.

Quick Start

Initialize the Swagger documentation by running 'swag init' in your Go project directory.

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 project?

You can generate Swagger documentation for Golang by adding annotation comments to your code and running the 'swag init' command. This Skill automates parsing annotations, struct tags, and security definitions using swaggo/swag.

Can I use swag to generate OpenAPI docs for the Fiber or Echo framework?

Yes, this Swagger generation Skill integrates with Fiber, Echo, Gin, Chi, and net/http frameworks. It configures swaggo/swag to parse annotations and route definitions specific to your chosen framework.

How do I configure JWT and Bearer token security definitions in Swagger for Go?

Configuring JWT and Bearer token security definitions in Swagger requires adding specific annotation comments to your Go API endpoints. This Skill automates parsing these security annotations and struct tags to generate accurate OpenAPI security schemes.

What is the best way to maintain OpenAPI documentation in a Go project?

The best way to maintain OpenAPI documentation in Go is automating generation from code annotations via swaggo/swag. This Skill manages framework integrations and struct tags, ensuring documentation stays synchronized with API changes.

Do I need to install the swag library to document my Go API?

Yes, you need the go environment, the swag library, and your specific framework library like Gin or Echo installed. These dependencies are required to execute the Swagger annotation parsing and documentation generation process.