Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/eduardo-sl/go-agent-skillsnpx agentmods add skills/eduardo-sl/go-agent-skills/go-openapiWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/eduardo-sl/go-agent-skills/go-openapi)<a href="https://agentmods.dev/skills/eduardo-sl/go-agent-skills/go-openapi"><img src="https://agentmods.dev/badge/skills/eduardo-sl/go-agent-skills/go-openapi/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/eduardo-sl/go-agent-skills/go-openapi"><img src="https://agentmods.dev/badge/skills/eduardo-sl/go-agent-skills/go-openapi.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00149 | $0.02019 |
| Opus 5 | $0.00075 | $0.01009 |
| Sonnet 5 | $0.00030 | $0.00404 |
| Haiku 4.5 | $0.00015 | $0.00202 |
Grade A, and why
go-openapi scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 226 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Go OpenAPI
The spec is the source of truth. Types, routes, and clients are generated from it — never hand-written alongside it, because two hand-maintained copies of a contract diverge within one sprint.
Operating Modes
- Adopt — the project has hand-written handlers and no spec, or a spec nobody generates from. Introduce generation without a rewrite.
- Extend — the pipeline exists. Change the spec, regenerate, implement.
- Review — check that handlers, spec, and published client agree, and that the change is not silently breaking.
1. Choose the Generator Once
| Tool | Use it when |
|---|---|
oapi-codegen |
Default. Types + server interface + client, works with net/http, chi, echo, gin |
ogen |
You want a fully generated, strictly validating server and can accept its opinions |
swaggo/swag |
Only for a legacy code-first project you are not converting — annotations generate the spec, so the spec cannot be reviewed before the code exists |
Do not mix. A project with both annotations and a checked-in spec has two sources of truth again.
2. Wire Generation Into the Build
Pin the generator as a module tool (Go 1.24+), so every developer and CI run uses the same version:
go get -tool github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen
# oapi-codegen.yaml
package: api
output: internal/api/openapi.gen.go
generate:
models: true
std-http-server: true # Go 1.22+ ServeMux; use chi-server / echo-server if that is the router
strict-server: true # typed request/response structs instead of raw http.ResponseWriter
embedded-spec: true # lets the service serve its own spec
output-options:
skip-prune: false
//go:generate go tool oapi-codegen -config oapi-codegen.yaml ../../api/openapi.yaml
Commit generated files. Reviewers need to see the diff of a contract change, and a build must not depend on a generator being installed.
CI must fail when they are stale:
go generate ./... && git diff --exit-code
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 226 lines · 149 tokens per session scan A 399a4e7304ba
go-openapi is a skill published in the GitHub repository eduardo-sl/go-agent-skills (71 stars, last pushed 22d ago), licensed MIT. It adds 149 tokens to every session and 2,019 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
golang-graphql
Implements GraphQL APIs in Golang using gqlgen or graphql-go. Apply when building GraphQL servers, designing schemas, writing resolvers, handling subscriptions, or integrating GraphQL with existing Go HTTP services. Also apply when the codebase imports github.com/99designs/gqlgen or github.com/graph-gophers/graphql-go.
golang-grpc
Provides gRPC usage guidelines, protobuf organization, and production-ready patterns for Golang microservices. Use when implementing, reviewing, or debugging gRPC servers/clients, writing proto files, setting up interceptors, handling gRPC errors with status codes, configuring TLS/mTLS, testing with bufconn, or…
golang-pro
Implements concurrent Go patterns using goroutines and channels, designs and builds microservices with gRPC or REST, optimizes Go application performance with pprof, and enforces idiomatic Go with generics, interfaces, and robust error handling. Use when building Go applications requiring concurrent programming…
golang-swagger
Golang OpenAPI/Swagger documentation with swaggo/swag — annotation comments (@Summary, @Param, @Success, @Router, @Security), swag init code generation, framework integrations (gin, echo, fiber, chi, net/http), security definitions (Bearer/JWT, OAuth2, API key), and struct tags (swaggertype, enums, example…
layered-architecture-types
Enforce primitive-at-edges / strong-types-in-Business layering and the toBus/fromBusResponse/toDB converter pattern. Use when writing, editing, or auditing Go files under app/, business/domain/, or .../stores/db.
printing-press
Set up a new integration, connector, or CLI binding for any API. Wrap or generate a ship-ready Go CLI from an OpenAPI, HAR, or Postman spec via the lean research -> generate -> build -> shipcheck loop. Use when the user says build a CLI, wrap this API, set up a new integration, add a connector, integrate with a…