wshobson avatar

Openapi Spec Generation

This generates complete OpenAPI 3.1 specs from scratch or existing code, handling the tedious parts like parameter definitions, response schemas, and component references. You'd use it when documenting APIs, setting up contract-first development, or generating client SDKs. It covers the full spec structure including authentication schemes, error responses, and validation rules. The templates are comprehensive enough that you can copy-paste and modify rather than writing boilerplate YAML from memory. It's solid for both greenfield API design and retrofitting documentation onto existing endpoints.

skills.sh installs
17K
GitHub stars
42.4K
last updated
Aug 21, 2026

Install

$ npx -y skills add wshobson/agents --skill openapi-spec-generation --agent claude-code

Installs into .claude/skills of the current project.

Files

OpenAPI Spec Generation

Comprehensive patterns for creating, maintaining, and validating OpenAPI 3.1 specifications for RESTful APIs.

When to Use This Skill

  • Creating API documentation from scratch
  • Generating OpenAPI specs from existing code
  • Designing API contracts (design-first approach)
  • Validating API implementations against specs
  • Generating client SDKs from specs
  • Setting up API documentation portals

Core Concepts

1. OpenAPI 3.1 Structure

openapi: 3.1.0
info:
  title: API Title
  version: 1.0.0
servers:
  - url: https://api.example.com/v1
paths:
  /resources:
    get: ...
components:
  schemas: ...
  securitySchemes: ...

2. Design Approaches

ApproachDescriptionBest For
Design-FirstWrite spec before codeNew APIs, contracts
Code-FirstGenerate spec from codeExisting APIs
HybridAnnotate code, generate specEvolving APIs

Templates and detailed worked examples

Sponsors

Details

Repository
github.com/wshobson/agents
Categories
Backend & APIs, Documentation, Design & UI/UX

More from wshobson/agents

All 174
1gargantuax avatargpt-image-2gargantuax/openskillsFull OpenAI-compatible GPT Image 2 coverage across images/generations, images/edits, and responses with the image_generation tool. Use when the one-shot image h16.8Kskills.sh installs
2okx avatarokx-agent-payments-protocolokx/onchainos-skillsUse when an agent hits HTTP 402 / payment-required, or the user mentions x402, x402Version, X-PAYMENT, PAYMENT-REQUIRED, PAYMENT-SIGNATURE, WWW-Authenticate: Pa15.9Kskills.sh installs
3clerk avatarclerk-swiftclerk/skillsImplement Clerk authentication for native Swift and iOS apps using ClerkKit and ClerkKitUI source-guided patterns. Use for prebuilt AuthView or custom native fl15Kskills.sh installs
4clerk avatarclerk-expoclerk/skillsAdd Clerk authentication to Expo and React Native apps using @clerk/expo. Use for Expo setup, prebuilt native components (AuthView, UserButton), custom sign-in/14.8Kskills.sh installs
5base44 avatarbase44-sdkbase44/skillsThe base44 SDK is the library to communicate with base44 services. In projects, you use it to communicate with remote resources (entities, backend functions, ai13.3Kskills.sh installs
6base44 avatarbase44-clibase44/skillsThe base44 CLI is used for EVERYTHING related to base44 projects: resource configuration (entities, backend functions, ai agents), initialization and actions (r13.2Kskills.sh installs