reliant-labs/forge/api-openapi
Claude Code and agent skill by reliant-labs/forge
- community
Checking that the SKILL.md file is still in the repository.
Emit OpenAPI 3 specs from your proto services as a buf pipeline step — opt-in via `api.openapi: true` in forge.yaml. The spec is a projection of proto, so the proto file stays the single source of truth.
Install
npx vskill@latest install reliant-labs/forge/api-openapiSKILL.md
OpenAPI Specs from Proto
Forge can emit one OpenAPI 3 yaml per service alongside its Connect RPC handlers. The spec is generated by `protoc-gen-connect-openapi` during forge generate, scoped to each proto/services/<svc>/ so each service gets its own self-contained file under openapi/.
This is a projection of proto — every shape in the yaml is derived from the proto file. Hand-editing the yaml is never the right answer; edit the proto and regenerate.
Enable it
Two steps:
- Install the plugin (once per machine):
``bash go install github.com/sudorandom/protoc-gen-connect-openapi@latest ``
forge generate errors with this exact command in the message if the binary isn't on PATH when api.openapi: true.
- Flip the flag in
forge.yaml:
``yaml api: openapi: true ``
Then run forge generate. One spec per service lands under openapi/<service>.yaml at the project root.
The flag is off by default so existing projects regenerate byte-identically until they opt in.
Where the spec lands
The output filename matches the proto file's base name. For the canonical layout proto/services/users/v1/users.proto you get openapi/users.yaml.
Commit the openapi/ directory if you want CI to fail when the spec drifts from the proto. Add it to .gitignore if you treat it as a build artifact.
Feeding it to consumers
The yaml is a standard OpenAPI 3 document, so anything that speaks OpenAPI 3 works. Some common destinations:
openapi-generator for client SDKs
Postman / Insomnia import
Drag openapi/<svc>.yaml into Postman's "Import" dialog (File → Import → Upload Files). Postman auto-generates a collection with one request per RPC, named after the proto methods.
ChatGPT function-calling / agent toolchains
Both OpenAI's GPTs and Anthropic's tool-use accept OpenAPI 3 specs directly. Paste the contents of openapi/<svc>.yaml into the GPT "Actions" config, or load it as an Anthropic tools definition (the OpenAPI parser is built into most agent frameworks: LangChain OpenAPIToolkit, LlamaIndex OpenAPIToolspec, etc.).
Documentation portals
- ReadMe.io / Stoplight / Redocly: upload
openapi/<svc>.yaml
as the API definition. The portal renders try-it consoles, code samples per language, and a search index from the spec.
- swagger-ui (self-hosted): point
url:at the yaml. Works as a
static asset behind any web server.
Server stubs in other languages
openapi-generator also emits server skeletons for Spring, FastAPI, Express, etc. — useful when a non-Go team needs to mock the same API shape for contract testing.
How it interacts with your buf.gen.yaml
Forge runs the OpenAPI plugin via a synthesized buf.gen.openapi.yaml written and removed per forge generate run. Your hand-edited buf.gen.yaml is the source of truth for Go stubs and isn't touched by the OpenAPI step.
This means you can freely customize buf.gen.yaml (add other plugins, switch between local: and remote:, etc.) without affecting OpenAPI generation. The flag in forge.yaml controls whether the step runs at all.
CI integration
Two common shapes:
- Spec-as-artifact: commit
openapi/and let theverify-generated
job in .github/workflows/ci.yml catch drift — it already runs forge generate and fails on an uncommitted diff.
- Spec-as-build-output: don't commit
openapi/; have a publish
job run forge generate and upload to a documentation portal (ReadMe.io webhook, S3 bucket behind Redocly, etc.).
For shape 1, the proto-breaking gate (.github/workflows/proto-breaking.yml) already catches breaking proto changes before they're merged — the OpenAPI diff is mostly a sanity check that the spec actually rebuilt.
Common gotchas
- `protoc-gen-connect-openapi not found on PATH` — install it
with go install github.com/sudorandom/protoc-gen-connect-openapi@latest, then make sure $(go env GOBIN) (default $HOME/go/bin) is on your PATH.
- Spec doesn't update after a proto edit —
forge generate
must succeed. If buf fails earlier (e.g. invalid proto syntax), the OpenAPI step never runs.
- Different filename than expected — the plugin uses the proto
file's base name, not the service name. Rename the proto if you want a different yaml filename, or post-process under your own build step.
- `api.openapi: true` but no spec emitted — check that
the project is a service (codegen derives from that). The OpenAPI step is codegen-gated since it shares proto inputs with the Go-stub buf step.
- Need REST/JSON transcoding, not just docs — that's a separate
feature (api.rest:) owned by a different forge surface. The OpenAPI flag only emits documentation; it does not change the runtime transport.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinginternal/templates/project/skills/forge/api-openapi/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/reliant-labs/forge/api-openapi)