
Golang Swagger
Go API documentation toolkit for swaggo/swag covering annotations, code generation, and framework wiring.
- skills.sh installs
- 39K
- GitHub stars
- 3.9K
- last updated
- Aug 21, 2026
What it does
- Covers operation annotations, security definitions, struct tags, and
swag initsetup for Gin, Echo, Fiber, Chi, and net/http - Includes general API info placement,
@Paramand@Success/@Failureformats, and Bearer, API key, basic, and OAuth2 definitions - Enforces re-running
swag initafter annotation changes and requires a named struct for every@Param bodyto avoid generation failures - Designed for Go projects that import github.com/swaggo/swag and maintain Swagger or OpenAPI docs
Install
$ npx -y skills add samber/cc-skills-golang --skill golang-swagger -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Persona: You are a Go API documentation engineer. You treat docs as a contract — accurate, complete annotations prevent integration bugs and make the Swagger UI the source of truth for API consumers.
Modes:
- Build — adding Swagger to a new or existing Go project: set up the toolchain, annotate handlers, generate docs, wire the UI endpoint.
- Audit — reviewing existing swagger annotations for completeness, correctness, and security coverage.
Dependencies:
- swag:
go install github.com/swaggo/swag/cmd/swag@latest
Setup
Three steps to get Swagger UI running:
swag init # generates docs/ with docs.go, swagger.json, swagger.yaml
swag init -g cmd/api/main.go # if general info is not in main.go
swag fmt # format annotation comments (like go fmt)
Import the docs package to register the spec. Use a blank import when only wiring the UI; use a named import when you also need to override docs.SwaggerInfo at runtime:
import _ "yourmodule/docs" // blank: registers spec, no identifier
import docs "yourmodule/docs" // named: use when overriding SwaggerInfo
Details
- Repository
- github.com/samber/cc-skills-golang
- Categories
- Go, Technical Documentation
- First seen
- May 16, 2026
More from samber/cc-skills-golang
All 47- Golang Graphql38.8K
- Golang Google Wire38.7K
- Golang Spf13 Viper38.7K
- Golang Uber Fx38.4K
- Golang Uber Dig38.4K
- Golang How To38.3K
- Golang Linter26.5K
- Golang Pkg Go Dev13.7K
- Golang Refactoring13.3K
- Golang Gopls12.9K
- Golang Code Style46.6K
- Golang Testing45.9K
- Golang Error Handling45.9K
- Golang Security44.7K
- Golang Design Patterns44.3K
- Golang Performance44.1K
- Golang Concurrency44.1K
- Golang Context43.2K
- Golang Database43K
- Golang Naming43K
- Golang Safety42.7K
- Golang Project Layout42.5K
- Golang Documentation42.4K
- Golang Modernize42.4K
Similar to Golang Swagger
More Go
golang-http-frameworksSkillbobmatnyc/claude-mpm-skills460 installsGo HTTP API building covering net/http, Chi, Gin, Echo, and Fiber with framework selection guidance.
golang-samber-doSkillsamber/cc-skills-golang40.2K installsDependency injection toolkit for Go using samber/do, covering containers, scopes, lifecycle, and module organization.
golang-samber-oopsSkillsamber/cc-skills-golang40K installsStructured error handling in Go with samber/oops: builder chains, stack traces, error codes, and panic recovery.
api-docs-generatorPluginjmanhype/claude-code-plugin-marketplace29 starsOpenAPI/Swagger documentation generation and API documentation automation
go-documentationSkillcxuu/golang-skills1.3K installsStructured guide for writing Go doc comments, with a validation script for exported symbols and package comments.
openapi-specification-v2Skillhairyf/skills783 installsReference catalog for writing, validating, and interpreting OpenAPI 2.0 (Swagger) specifications for REST APIs.