$ skilldirectory
— zsh — registry.skilldirectory.dev
skill library blog

home / API & Integrations / Openapi Spec Generation Skill by @wshobson

Openapi Spec Generation Skill by @wshobson

FREE
github stars★ 42,243updatedSep 2026repo@wshobson
$git clone https://github.com/wshobson/agents

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.

Read the opening of the original SKILL.md
# 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.