askill
openapi-spec-generation

openapi-spec-generationSafety 100Repository

This skill should be used when the user asks to "generate an OpenAPI spec", "create API documentation", "generate an SDK from a spec", "validate an API spec", "lint an OpenAPI file", "design an API contract", or when building, maintaining, or validating RESTful API specifications using OpenAPI 3.1.

0 stars
1.2k downloads
Updated 2/26/2026

Package Files

Loading files...
SKILL.md

OpenAPI Spec Generation

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

When to Activate

  • 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

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: ...

Design Approaches

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

Templates

Available in references/:

Best Practices

Do's

  • Use $ref — Reuse schemas, parameters, responses
  • Add examples — Real-world values help consumers
  • Document errors — All possible error codes
  • Version the API — In URL or header
  • Use semantic versioning — For spec changes

Don'ts

  • Don't use generic descriptions — Be specific
  • Don't skip security — Define all schemes
  • Don't forget nullable — Be explicit about null
  • Don't mix styles — Consistent naming throughout
  • Don't hardcode URLs — Use server variables

Resources

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

72/100Analyzed 3/1/2026

Well-structured reference skill for OpenAPI 3.1 specification practices. Includes clear activation triggers, conceptual explanations, design approach comparison table, and template references. Loses score on actionability due to lack of concrete commands/steps to generate specs. The skill provides good conceptual framework but users would need to consult external references for actual implementation. Good safety and clarity, moderate completeness."

100
85
80
60
45

Metadata

Licenseunknown
Version0.1.0
Updated2/26/2026
Publishergrailautomation

Tags

apisecurity