openapi-spec-generation

Generates and maintains OpenAPI 3.1 specifications for RESTful APIs.

38.6k|4.1k|Updated Jul 24, 2025
One-click install
npx skills add https://github.com/wshobson/agents --skill openapi-spec-generation-wshobson
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openapi-spec-generation
Source: https://github.com/wshobson/agents/tree/main/plugins/documentation-generation/skills/openapi-spec-generation
Command: npx skills add https://github.com/wshobson/agents --skill openapi-spec-generation-wshobson

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the creation, maintenance, and validation of OpenAPI 3.1 specifications, ensuring API documentation accuracy and contract compliance.

Core Features & Use Cases

  • API Specification Generation: Create OpenAPI specs from scratch or from existing codebases (code-first approach).
  • Contract Compliance: Validate API implementations against defined OpenAPI specifications.
  • SDK Generation: Automate the generation of client SDKs in various languages from your OpenAPI specs.
  • Use Case: You are developing a new REST API and need to generate a comprehensive OpenAPI 3.1 specification to document its endpoints, request/response schemas, and security schemes for your development team and consumers.

Quick Start

Use the openapi-spec-generation skill to create a complete OpenAPI 3.1 specification for a user management API.

Frequently Asked Questions about openapi-spec-generation

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

FAQPage Schema
How do I generate an OpenAPI 3.1 specification from an existing codebase?

You can generate an OpenAPI 3.1 specification from an existing codebase using a code-first approach. This skill analyzes your REST API code to document endpoints, request/response schemas, and security schemes automatically for your development team and consumers.

What is the best way to validate API contract compliance against an OpenAPI spec?

Validating API contract compliance involves checking your API implementations against defined OpenAPI specifications. This skill integrates with validation tools like Spectral and Redocly to lint specs and ensure your implementation matches the documented contract.

Can I create a design-first OpenAPI specification for a new REST API?

Yes, you can create a design-first OpenAPI 3.1 specification for a new REST API from scratch. This approach allows you to define endpoints, schemas, and security schemes before writing any implementation code, streamlining subsequent SDK generation.

How does OpenAPI Generator work with this skill for client SDK creation?

OpenAPI Generator automates client SDK creation from your OpenAPI specifications. This skill leverages it to produce SDKs in various programming languages, ensuring your consumers have accurate, up-to-date client libraries matching your API documentation.

Do I need any external dependencies to use this skill for API documentation?

No external dependencies are required to use this skill for API documentation. It operates independently to generate and maintain OpenAPI 3.1 specifications, though integrating with tools like Spectral, Redocly, or OpenAPI Generator is supported for advanced workflows.

Does this skill support both design-first and code-first API specification approaches?

Yes, this skill supports both design-first and code-first API specification approaches. You can either generate a complete OpenAPI 3.1 spec from scratch before development or extract documentation directly from an existing RESTful codebase.