skills sourced live from GitHub · all skills listed are free · each skill is provided under its author's license.
home / API & Integrations / Openapi Spec Generation Skill by @wshobson
The skill is the plugins/documentation-generation/skills/openapi-spec-generation folder inside that repository. Copy it into the folder your agent loads skills from; check your agent's documentation for where that is.
Generate and maintain OpenAPI 3.1 specifications from code, design-first specs, and validation patterns.
Generates and maintains OpenAPI 3.1 specifications from code or design-first specs, with validation patterns for contract compliance and SDK generation.
The original SKILL.md is organised into these sections:
Written and maintained by @wshobson. It is published under the MIT license, which allows reuse with attribution. See the author profile. SkillDirectory does not claim authorship: this page adds our own review and links back to the original, and the skill's text belongs to its author.
# 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
```yaml
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
| Approach | Description | Best For |
| ---------------- | ---------------------------- | ------------------- |
| **Design-First** | Write spec before code | New APIs, contracts |
| **Code-First** | Generate spec from code | Existing APIs |
…
Excerpt only, quoted from the author's repository. Open the repository for the complete file.