Agent skill

Go Swagger3 Docs

by parvez3019 in parvez3019/go-swagger3

Documents existing Go HTTP APIs with go-swagger3 godoc @ annotations and struct tags, then generates OpenAPI 3 specs.

MITAuto-check passedBackend & APIs

Install Go Swagger3 Docs

skills CLI
$ npx skills add parvez3019/go-swagger3 --skill go-swagger3-docs -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install parvez3019/go-swagger3 go-swagger3-docs --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/parvez3019/go-swagger3.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agent-skills/claude .claude/skills/go-swagger3-docs && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
go-swagger3-docs
GitHub stars
153
Token cost
~3.3k tokens
SKILL.md length
640 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Documents existing Go HTTP APIs with go-swagger3 godoc @ annotations and struct tags, then generates OpenAPI 3 specs.

  • Works in 6 steps: Confirm go.mod exists (Go modules only). → Put service annotations on the… → Annotate each HTTP handler’s godoc… → …
  • The user asks to document an API
  • SKILL.md covers Install, Workflow, Patterns and End-to-end example (minimal API), plus 2 more sections
  • Calls go and docker; reaches en.wikipedia.org

What it does

Go Swagger3 Docs is an agent skill from parvez3019/go-swagger3. Documents existing Go HTTP APIs with go-swagger3 godoc @ annotations and struct tags, then generates OpenAPI 3 specs. Use when the user asks to document an API, add Swagger/OpenAPI comments, generate oas.json/yml, or mentions go-swagger3.

Its SKILL.md is about 3.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering OpenAPI specifications. It works with OpenAPI. The repository describes itself as: Swagger 3.0 implementation for go. The licence is MIT.

When your agent uses it

  • The user asks to document an API
  • Add Swagger/OpenAPI comments
  • Generate oas.json/yml
  • Mentions go-swagger3

Example prompts

  • “Use the go-swagger3-docs skill to document existing Go HTTP APIs with go-swagger3 godoc @ annotations and struct tags, then generates OpenAPI 3 specs”
  • “/go-swagger3-docs”

Requirements

  • Docker

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Confirm go.mod exists (Go modules only).
  2. Put service annotations on the main/entry file (@Title and @Version required).
  3. Annotate each HTTP handler’s godoc (comments must sit directly above the func).
  4. Add json + OAS tags on request/response structs; add @Enum / @HeaderParameters types when needed.
  5. Generate (pick the matching layout)
  6. Open the output, fix gaps, re-run with --debug if needed. Use --strict when hardening.

What it can do on your machine

Read from SKILL.md and the folder at commit 3a7e7e7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • go
    • docker

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • en.wikipedia.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Go Swagger3 Docs loads about 3.3k tokens when it runs. Until then it costs about 64 tokens; SKILL.md has 640 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~64
When it runs · the whole SKILL.md, loaded when a task matches
~3.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from parvez3019/go-swagger3 at commit 3a7e7e7, republished under its MIT licence (© parvez3019). 640 words, ~3,261 tokens.

Download SKILL.mdSave it as .claude/skills/go-swagger3-docs/SKILL.md (or your agent's skills folder).
name
go-swagger3-docs
description
Documents existing Go HTTP APIs with go-swagger3 godoc @ annotations and struct tags, then generates OpenAPI 3 specs. Use when the user asks to document an API, add Swagger/OpenAPI comments, generate oas.json/yml, or mentions go-swagger3.

go-swagger3 — document existing Go APIs

Copy this file into a consumer project as .claude/skills/go-swagger3-docs/SKILL.md.

Annotate existing Go code with go-swagger3 godoc @ tags and struct tags, then run the CLI. Prefer editing comments and tags over rewriting handlers.

Install

bash
go install github.com/parvez3019/go-swagger3@latest
export PATH="$HOME/go/bin:$PATH"

# Docker alternative
docker run -t --rm -v $(pwd):/app -w /app parvez3019/go-swagger3:latest \
  --module-path . --main-file-path ./cmd/api/main.go --output oas.json --schema-without-pkg

Workflow

  1. Confirm go.mod exists (Go modules only).
  2. Put service annotations on the main/entry file (@Title and @Version required).
  3. Annotate each HTTP handler’s godoc (comments must sit directly above the func).
  4. Add json + OAS tags on request/response structs; add @Enum / @HeaderParameters types when needed.
  5. Generate (pick the matching layout):
    bash
    # main next to go.mod
    go-swagger3 --module-path . --output oas.json --schema-without-pkg
    
    # main elsewhere
    go-swagger3 --module-path . --main-file-path ./cmd/api/main.go --output oas.json --schema-without-pkg
    
    # only scan handlers under a path
    go-swagger3 --module-path . --main-file-path ./cmd/api/main.go --handler-path ./internal/handlers --output oas.json --schema-without-pkg
    
    # YAML
    go-swagger3 --module-path . --main-file-path ./cmd/api/main.go --output oas.json --schema-without-pkg --generate-yaml
  6. Open the output, fix gaps, re-run with --debug if needed. Use --strict when hardening.
CLI flags
FlagPurpose
--module-pathModule root to scan
--main-file-pathFile with service-level annotations
--handler-pathOptional: only scan handlers under this path
--outputOutput path (default oas.json)
--schema-without-pkgSchema names without package prefix
--generate-yamlEmit YAML (.json output becomes .yml)
--excludeComma-separated dirs to skip
--quietReduce log noise
--debugDebug logging
--strictTreat parse warnings as fatal

Also: go-swagger3 fmt -d ./ formats @ annotations.

Framework UI

Serve UI via github.com/parvez3019/go-swagger3/swagger (net/http) or adapters under swagger/gin, swagger/echo, swagger/chi, swagger/mux, swagger/fiber, swagger/hertz, swagger/buffalo, swagger/flamingo, swagger/atreugo. See docs/MIGRATION_FROM_SWAG.md and examples/.

Extra operation annotations
  • @Accept / @Produce (MIME aliases: json, xml, mpfd, …)
  • Per-handler @Security, @deprecated, @externalDocs.description / .url
  • @Param attributes: Enums(), default(), minimum(), Format(), style(), explode(), …
  • Generics: PaginatedResult[User]; composition: JSONResult{data=Order}

Patterns

Service (main file)
go
package main

// @Title User API
// @Version 1.0
// @Description User and restaurants API
// @ContactName API Support
// @ContactEmail support@example.com
// @TermsOfServiceUrl https://example.com/tos
// @Server localhost:8080 Server 1
// @Server localhost:8081 Server 2
// @Security AuthorizationHeader read write
// @SecurityScheme AuthorizationHeader http bearer Input your token
// @LicenseName MIT
// @LicenseURL https://en.wikipedia.org/wiki/MIT_License
func main() {}
Shared headers
go
// Headers shared request headers
// @HeaderParameters Headers
type Headers struct {
	Authorization string `json:"Authorization" example:"Bearer <token>" skip:"true"`
	Version       string `json:"Client-Version" description:"Client Version"`
	Language      string `json:"Client-Language" $ref:"LanguageEnum"`
	Platform      string `json:"Client-Platform" example:"android" description:"Available values : android, ios, web"`
}

// @Enum LanguageEnum
type LanguageEnum struct {
	LanguageEnum string `enum:"en-in,en-id,id,en-mx,es-mx" example:"en-in"`
}
Handler operations

Prefer @Router and {object} / {array}. Both @Route/@Router and object/{object} work. Case-insensitive. @Tag aliases @Resource.

@Param shape: @Param {name} {in} {goType} {required} "{desc}" ["{example}"]
in: path, query, form, header, cookie, body, file
required: true, false, required, optional
Descriptions and examples must be quoted.

POST body
go
// @Title Create User
// @Description Creates and returns a user
// @Header model.Headers
// @Param request body model.CreateUserRequest true "Create User Request"
// @Success 200 {object} model.CreateUserResponse
// @Failure 400 {object} model.ErrorResponse
// @OperationId CreateUser
// @Resource users
// @Router /user [post]
func CreateUser() {}
GET with query + nested filter
go
// @Title Get restaurants list
// @Description Returns restaurants by filter
// @Header model.Headers
// @Param count query int32 false "count of restaurants"
// @Param offset query int32 false "offset" "100"
// @Param order_by query model.OrderByEnum false "order list"
// @Param filter query model.Filter false "In json format"
// @Success 200 {object} model.GetRestaurantsResponse
// @Failure 500 {object} model.ErrorResponse
// @OperationId GetRestaurants
// @Router /restaurants [get]
func GetRestaurants() {}
Path params + array response
go
// @Title Get user list of a group
// @Description Get users related to a specific group
// @Param groupID path int true "Id of a specific group" "120"
// @Success 200 {array} model.User "Users JSON"
// @Failure 400 {object} model.ErrorResponse "Error JSON"
// @Resource users
// @Router /api/group/{groupID}/users [get]
func GetGroupUsers() {}
PUT / PATCH / DELETE
go
// @Title Update User
// @Param userID path string true "User id"
// @Param request body model.UpdateUserRequest true "Update payload"
// @Success 200 {object} model.User
// @Failure 404 {object} model.ErrorResponse
// @OperationId UpdateUser
// @Router /user/{userID} [put]
func UpdateUser() {}

// @Title Delete User
// @Param userID path string true "User id"
// @Success 204 "No Content"
// @Failure 404 {object} model.ErrorResponse
// @OperationId DeleteUser
// @Router /user/{userID} [delete]
func DeleteUser() {}
go
// @Title Upload avatar
// @Param userID path string true "User id"
// @Param file file ignored true "Avatar image"
// @Success 201 {object} model.UploadResponse
// @Router /user/{userID}/avatar [post]
func UploadAvatar() {}

// @Title Session info
// @Param session_id cookie string true "Session cookie"
// @Param X-Request-Id header string false "Client request id"
// @Success 200 {object} model.Session
// @Router /session [get]
func GetSession() {}
Status-only / string response / response headers
go
// @Success 200 "live endpoint"
// @Router /live [get]
func Live() {}

// @Success 201 {string} string "created id"
// @Router /updates [post]
func CreateUpdate() {}

// @Success 200 {object} model.TokenResponse "Login successful"
// @ResponseHeader 200 Set-Cookie string "Access token cookie" "accessToken=...; Path=/; HttpOnly"
// @ResponseHeader 200 X-Request-Id string "Unique request identifier"
// @Router /login [post]
func Login() {}
Models, enums, field tags
go
// @Enum OrderByEnum
type OrderByEnum struct {
	OrderByEnum string `enum:"nearest,popular,new,highest-rated" example:"popular"`
}

type CreateUserRequest struct {
	FirstName string   `json:"first_name" readOnly:"true"`
	LastName  string   `json:"last_name" example:"Hassan" description:"Last name"`
	Age       int      `json:"age" minimum:"18" exclusiveMinimum:"true" maximum:"256" exclusiveMaximum:"true"`
	EmailID   string   `json:"email_id" pattern:"[\\w.]+@[\\w.]"`
	UserName  string   `json:"user_name" title:"login"`
	Password  string   `json:"password" minLength:"6" maxLength:"200"`
	Roles     []string `json:"roles" writeOnly:"true" nullable:"true" uniqueItems:"true" minItems:"1" maxItems:"100"`
	Country   string   `json:"country" $ref:"CountriesEnum"`
	Version   string   `json:"version" override-example:"11.0.0"`
}

type CreateUserResponse struct {
	UserID string `json:"user_id" example:"u_123"`
}

type GetRestaurantsResponse struct {
	Restaurants []Restaurant `json:"restaurants" maxProperties:"100" minProperties:"2" additionalProperties:"true"`
}

type ErrorResponse struct {
	Code string `json:"code"`
	Msg  string `json:"msg" skip:"true"` // omitted from schema
	Secret string `json:"-"`             // hidden
}

// @Enum CountriesEnum
type CountriesEnum struct {
	CountriesEnum string `enum:"india,china,mexico,japan" example:"india"`
}

Useful tags: example, description, title, required, nullable, readOnly, writeOnly, minimum, maximum, exclusiveMinimum, exclusiveMaximum, minLength, maxLength, pattern, minItems, maxItems, uniqueItems, minProperties, maxProperties, additionalProperties, enum, $ref, override-example, skip:"true". Hide with json:"-" or go-swagger3:"-".

Security (global only)
go
// HTTP bearer / basic
// @SecurityScheme AuthorizationHeader http bearer Input your token
// @SecurityScheme BasicAuth http basic Login with admin credentials

// API key
// @SecurityScheme ApiKeyAuth apiKey header X-MyCustomHeader

// OpenID Connect
// @SecurityScheme OidcAuth openIdConnect https://example.com/.well-known/openid-configuration

// OAuth2 + scopes
// @SecurityScheme MyApiAuth oauth2AuthCode /oauth/authorize /oauth/token
// @SecurityScope MyApiAuth read_user Read a user
// @SecurityScope MyApiAuth write_user Write a user
// @Security MyApiAuth read_user write_user

Also: oauth2Implicit, oauth2ResourceOwnerCredentials, oauth2ClientCredentials. Security applies to the entire service — not per operation.

End-to-end example (minimal API)

go
// main.go
// @Title Demo API
// @Version 1.0
// @Server http://localhost:8080 Local
func main() {}

// handler
// @Title List items
// @Param limit query int false "page size" "20"
// @Success 200 {array} Item
// @Failure 500 {object} ErrorResponse
// @OperationId ListItems
// @Router /items [get]
func ListItems() {}

type Item struct {
	ID   string `json:"id" example:"1"`
	Name string `json:"name" example:"Widget"`
}
type ErrorResponse struct {
	Message string `json:"message"`
}
Show full SKILL.md (291 more words)Show less

Troubleshooting (for agents)

Work top-down. After each fix, re-run the CLI.

SymptomLikely causeWhat to do
command not found: go-swagger3Binary not on PATHexport PATH="$HOME/go/bin:$PATH" or use Docker
Empty / missing info.title or info.versionService comments not on --main-file-pathMove @Title/@Version to the main file; pass --main-file-path explicitly
No paths in outputHandlers lack @Router/@Route, or --handler-path excludes themAdd @Router /path [method]; widen or drop --handler-path
Handler present but operation missingComments not on the func godoc, or package outside modulePut // @... directly above func; keep handlers inside the module
Schema / type missing or wrongWrong package-qualified name, or type not imported/reachableUse pkg.Type as in Go; ensure the type is in-module or a scanned dependency
Schema names look like handler.UserPackage prefix includedPass --schema-without-pkg
operation ID 'X' is not uniqueDuplicate @OperationIdMake each @OperationId unique across the module
Parse warnings / --strict failsMalformed @Param/@Success (missing quotes, bad in, bad status)Match examples; quote descriptions; valid in values only
Field missing from schemaskip:"true", json:"-", or go-swagger3:"-"Remove skip/hide tags if the field should appear
Nested / anonymous field wrongAnonymous embedded structs unsupportedGive the field an explicit named type
Security missing on one routePer-operation security not supportedDefine @Security / @SecurityScheme on the service file only
Unknown tags ignored (e.g. @Accept)Not a go-swagger3 annotationUse only supported tags listed above
YAML not producedForgot flag or wrong extension expectationPass --generate-yaml (tool rewrites .json → .yml)
Still stuckNeed parser detailRe-run with --debug and fix the first real error

Rules

  • Do not invent unsupported annotations (@Accept, swag-only tags, etc.).
  • Do not claim per-operation security.
  • Anonymous struct fields are not supported.
  • Go modules only.
  • Prefer godoc/tag edits over handler rewrites unless asked.
  • Keep @OperationId values unique.

© parvez3019, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in agent-skills/claude of parvez3019/go-swagger3.

Open the folder on GitHubat commit 3a7e7e7

Compare with similar skills

Go Swagger3 Docs next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Go Swagger3 Docs compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Go Swagger3 Docs this skillparvez3019/go-swagger3153—~3.3kAutomated safety check: PassMIT
ToolJet Marketplace Plugin BuilderToolJet/ToolJet41k—~2.1kAutomated safety check: PassAGPL-3.0
Step Partsearthtojake/text-to-cad19k1 repos~1.5kAutomated safety check: PassMIT
OpenAPI to MCP Servermcp-use/mcp-use11k—~5.2kAutomated safety check: PassApache-2.0
Use Yaakmountain-loop/yaak19k—~1.9kAutomated safety check: PassMIT
API DesignerJeffallan/claude-skills12k1 repos~2kAutomated safety check: PassMIT

Similar skills

  • Turns an API description, such as an OpenAPI file or a Postman collection, into a connector plugin for ToolJet's marketplace and checks it with the repo's validator.

    41k GitHub stars~2.1k tokensUpdated today
    Backend & APIsAuto-check passed
  • Step Parts

    earthtojake/text-to-cad

    Find, evaluate, and download common purchasable CAD parts from step.parts, including named off-the-shelf actuators, servos, motors, electronics boards, connectors, screws, bolts, nuts, washers…

    19k GitHub starsUsed in 1 repo~1.5k tokens
    Backend & APIsAuto-check passed
  • OpenAPI to MCP Server

    mcp-use/mcp-use

    Turns an OpenAPI or Swagger spec into an MCP server with the mcp-use TypeScript SDK, mapping each operation to a tool, wiring auth, testing and deploying.

    11k GitHub stars~5.2k tokensUpdated today
    Backend & APIsAuto-check passed
  • Use Yaak

    mountain-loop/yaak

    A skill your agent uses when the user mentions Yaak, a Yaak workspace, or the yaak command, or asks to call, hit, or smoke test HTTP/REST endpoints, save or organize API requests for reuse or manual…

    19k GitHub stars~1.9k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • API Designer

    Jeffallan/claude-skills

    Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.

    12k GitHub starsUsed in 1 repo~2k tokens
    Backend & APIsAuto-check passed
  • CLI Creator

    huangruiteng/CS-Notes

    Build a composable CLI for Codex from API docs, an OpenAPI spec, existing curl examples, an SDK, a web app, an admin tool, or a local script.

    4k GitHub starsUsed in 2 repos~2.7k tokens
    Backend & APIsAuto-check passed

Works with

Categories

Questions about Go Swagger3 Docs

What does Go Swagger3 Docs do?

Documents existing Go HTTP APIs with go-swagger3 godoc @ annotations and struct tags, then generates OpenAPI 3 specs. Go Swagger3 Docs is an agent skill from parvez3019/go-swagger3. Documents existing Go HTTP APIs with go-swagger3 godoc @ annotations and struct tags, then generates OpenAPI 3 specs.

When should I use Go Swagger3 Docs?

Go Swagger3 Docs fits situations like: the user asks to document an API; add Swagger/OpenAPI comments; generate oas.json/yml; mentions go-swagger3.

How do I install Go Swagger3 Docs in Claude Code?

Run `npx skills add parvez3019/go-swagger3 --skill go-swagger3-docs -a claude-code`. Or copy the skill folder (agent-skills/claude in parvez3019/go-swagger3) into .claude/skills/go-swagger3-docs in your project. Claude Code loads it when a task matches its description.

How do I install Go Swagger3 Docs in Codex?

Run `npx skills add parvez3019/go-swagger3 --skill go-swagger3-docs -a codex`. Or copy the skill folder (agent-skills/claude in parvez3019/go-swagger3) into .agents/skills/go-swagger3-docs in your project. Codex loads it when a task matches its description.

Can I use Go Swagger3 Docs in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add parvez3019/go-swagger3 --skill go-swagger3-docs -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/go-swagger3-docs, .gemini/skills/go-swagger3-docs, .github/skills/go-swagger3-docs and .opencode/skills/go-swagger3-docs in your project.

What does Go Swagger3 Docs need to run?

Going by SKILL.md and its folder, Go Swagger3 Docs needs the command-line tools its instructions call (go and docker). Our summary lists: Docker.

Does Go Swagger3 Docs access the network?

SKILL.md names 1 domain. In commands or code: en.wikipedia.org; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Go Swagger3 Docs safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Go Swagger3 Docs use?

Go Swagger3 Docs is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Go Swagger3 Docs use?

About 3.3k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Go Swagger3 Docs?

Skills that share tags, products or a category with Go Swagger3 Docs: ToolJet Marketplace Plugin Builder (ToolJet/ToolJet, 41k stars), Step Parts (earthtojake/text-to-cad, 19k stars), OpenAPI to MCP Server (mcp-use/mcp-use, 11k stars) and Use Yaak (mountain-loop/yaak, 19k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Go Swagger3 Docs?

parvez3019 (a GitHub user) maintains it in parvez3019/go-swagger3, which has 153 GitHub stars. The repository was last updated on September 25, 2026.

Source: parvez3019/go-swagger3 on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.