with one click
generate-code
Generate Go client, server, or type code from an OpenAPI spec
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Generate Go client, server, or type code from an OpenAPI spec
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Prepare a release (phases 1-6). Usage: /prepare-release [version]. If version omitted, infers from conventional commits. Coordinates agents for review, runs prepare-release.sh, then enhances release notes with rich formatting.
Run corpus regression tests against real-world OpenAPI specs. Usage: /corpus-test [short]
Generate test scaffolding for a Go file following oastools conventions. Usage: /gen-test <file.go> [function names...]
Review unpushed commits before pushing for code quality, bugs, security issues, and error handling. Use when preparing to push commits, want pre-push code review, or need to validate changes before pushing. Runs comprehensive analysis using specialized review agents.
Publish a prepared release (phase 7). Usage: /publish-release <version>. Requires version argument. Wraps publish-release.sh for deterministic execution.
Run full validation suite (make check + gopls diagnostics) and report structured pass/fail. Usage: /quality-gate [package...]
Based on SOC occupation classification
| name | generate-code |
| description | Generate Go client, server, or type code from an OpenAPI spec |
Call parse to get an overview of the API:
{"spec": {"file": "<path>"}}
Report the API title, version, number of operations and schemas. This helps set expectations for what will be generated.
Ask the user what they need. The generate tool supports three output modes:
| Option | What it generates |
|---|---|
types | Go type definitions for all schemas |
client | HTTP client with methods for each operation (includes types) |
server | Server interface and handler stubs (includes types) |
Also determine:
output_dir (required) -- Where to write the generated filespackage_name (optional, default: api) -- Go package name for the generated codeCall the generate tool:
{
"spec": {"file": "<path>"},
"client": true,
"output_dir": "./generated",
"package_name": "petstore"
}
The tool returns a manifest of generated files with names and sizes. Review:
success is false, explain what went wrongRead the generated files and provide a summary of the key types and functions.
Based on what was generated, suggest next steps:
For types only:
interface{} fields)For client:
For server: