bootstrap-go-openapi

Generate typed Go OpenAPI clients and models from OpenAPI 3.0 specs.

1|Updated May 7, 2026
One-click install
npx skills add https://github.com/agoodway/GoodSkills --skill bootstrap-go-openapi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bootstrap-go-openapi
Source: https://github.com/agoodway/GoodSkills/tree/main/skills/bootstrap-go-openapi
Command: npx skills add https://github.com/agoodway/GoodSkills --skill bootstrap-go-openapi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It solves the problem of manually writing and maintaining fragile REST client code when consuming an OpenAPI-described API.

Core Features & Use Cases

  • Generate typed clients and models: Uses oapi-codegen to produce strongly-typed Go client code and corresponding models from an OpenAPI 3.0 spec.
  • Environment-based credential configuration: Adds an internal Viper-powered apiconfig layer to manage base URLs and API keys per environment (set/show/use).
  • Repeatable regeneration workflow: Creates go:generate wiring and suggests justfile recipes so you can regenerate safely after spec changes.

Quick Start

Tell the skill to bootstrap an OpenAPI client by having it generate a Go client and models for your OpenAPI 3.0 spec and wire it to an environment-aware configure command.

Frequently Asked Questions about bootstrap-go-openapi

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

FAQPage Schema
How do I generate a typed Go client from an OpenAPI 3.0 spec?

To generate a typed Go client from an OpenAPI 3.0 spec, use oapi-codegen to produce strongly-typed client code and models, eliminating manual REST boilerplate. It creates generate.yaml and generate.go files using a relative spec path within your Go module.

What is the best way to manage API credentials across environments in a Go client?

Managing API credentials across environments in a Go client is handled by adding a Viper-backed internal apiconfig layer. This provides environment-aware configuration commands to set, show, and use base URLs and API keys safely within your project.

Do I need a go.mod file to bootstrap an OpenAPI client in my Go project?

Yes, you need a go.mod file to bootstrap an OpenAPI client in your Go project. The generation process requires a go.mod-based Go module to correctly wire the typed client, models, and configuration into your existing project structure.

Can I regenerate my Go API models after updating an OpenAPI specification?

Yes, you can regenerate your Go API models after updating an OpenAPI specification. The bootstrap process creates go:generate wiring and suggests justfile recipes, enabling a repeatable regeneration workflow to safely update clients after spec changes.

Why should I use oapi-codegen instead of manually writing REST client code in Go?

Using oapi-codegen instead of manually writing REST client code in Go solves the problem of maintaining fragile HTTP request logic. It automatically produces strongly-typed API models and client code from an OpenAPI 3.0 spec, ensuring type safety and reducing manual errors.