api-swagger-support

Generate and serve Swagger/OpenAPI documentation for Go APIs.

1|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/pdylanross/barnacle --skill api-swagger-support
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-swagger-support
Source: https://github.com/pdylanross/barnacle/tree/main/.claude/skills/api-swagger-support
Command: npx skills add https://github.com/pdylanross/barnacle --skill api-swagger-support

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of documenting Go APIs by automatically generating Swagger/OpenAPI specifications from code annotations and serving an interactive UI.

Core Features & Use Cases

  • Automated Documentation Generation: Uses swag to create swagger.json and swagger.yaml from Go code annotations.
  • Interactive API UI: Leverages gin-swagger to serve the Swagger UI directly within a Gin web server.
  • Use Case: When developing a new API endpoint in Go, you can add annotations to your handler function and DTOs, then run swag init to generate the documentation, and finally configure your Gin server to serve the interactive API documentation at /swagger/index.html.

Quick Start

Use the api-swagger-support skill to generate Swagger documentation from your Go project by running 'swag init'.

Frequently Asked Questions about api-swagger-support

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

FAQPage Schema
How do I generate Swagger documentation from Go code annotations?

Generate Swagger documentation from Go code annotations by running the swag CLI to parse handler functions and DTOs, outputting machine-readable swagger.json and swagger.yaml specification files.

How do I serve Swagger UI in a Gin web server?

Serve Swagger UI in a Gin web server by integrating gin-swagger middleware, which mounts the interactive API documentation interface directly at a route like /swagger/index.html.

What do I need to use swag and gin-swagger for API documentation?

Using swag and gin-swagger requires the Go toolchain, the swag CLI installed for annotation processing, and your project dependencies available to successfully generate and serve OpenAPI specifications.

How does annotating Go API handlers improve developer experience?

Annotating Go API handlers improves developer experience by translating code comments into interactive OpenAPI UIs, facilitating API discoverability and ensuring your documentation stays synchronized with implementation logic.

Can I automate OpenAPI spec generation for my Gin API?

Automate OpenAPI spec generation for your Gin API by running swag init, which scans your Go code annotations to automatically produce swagger.json and swagger.yaml files without manual specification writing.