openapi-spec-generation

Generate and validate OpenAPI 3.1 specifications from design or code sources.

1|Updated Dec 23, 2025
One-click install
npx skills add https://github.com/ccf/claude-code-ccf-marketplace --skill openapi-spec-generation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openapi-spec-generation
Source: https://github.com/ccf/claude-code-ccf-marketplace/tree/main/plugins/documentation/skills/openapi-spec-generation
Command: npx skills add https://github.com/ccf/claude-code-ccf-marketplace --skill openapi-spec-generation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates the creation, validation, and maintenance of OpenAPI 3.1 specifications, bridging design-first concepts with code-first reality to ensure consistent API contracts.

Core Features & Use Cases

  • Design-first to generate specs from API design
  • Code-first to derive specs from existing codebases and validate against standards
  • Validate specs with tools like spectral and openapi-generator
  • Generate SDKs for multiple languages from a single spec
  • Use-case: teams iterating API design, documentation, and client integration

Quick Start

Run openapi-spec-generation with your API project to produce an initial OpenAPI 3.1 spec and a validation plan. For example, map your codebase to a YAML spec, then run validations and generator commands to produce client SDKs.

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 OpenAPI 3.1 specifications from an existing codebase?

To generate OpenAPI 3.1 specifications from a code-first source, this skill maps your existing codebase structures to a YAML spec and validates them against API standards using spectral.

How does design-first API validation work with OpenAPI specs?

Design-first API validation takes your initial API design, produces an OpenAPI 3.1 specification, and runs validations using spectral and openapi-generator to ensure consistent API contracts.

What is the best way to generate client SDKs across multiple languages from an OpenAPI spec?

The best way to generate client SDKs is to use openapi-generator commands on your validated OpenAPI 3.1 spec, producing client libraries suitable for multiple programming languages.

Do I need openapi-generator and spectral installed to validate OpenAPI specs?

Yes, you need openapi-generator and spectral installed in a compatible development environment, as these tools are required to run the validation and generation commands for your OpenAPI specs.

Can I derive OpenAPI specs from both design-first and code-first sources?

Yes, you can derive OpenAPI specs from both approaches, bridging design-first concepts with code-first reality to automate creation, validation, and maintenance of consistent API contracts.

Why does my OpenAPI spec validation fail during code-first generation?

OpenAPI spec validation may fail if the derived spec does not meet OpenAPI 3.1 standards, requiring you to run spectral validations to identify and fix contract inconsistencies before generating SDKs.