Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
nickcrew avatar

Openapi Specification

  • 37 installs
  • 28 repo stars
  • Updated June 29, 2026
  • nickcrew/claude-ctx-plugin

Helps with backend & apis tasks.

About

openapi-specification is a Claude Code skill for backend & apis. It helps solo builders move faster with AI-assisted development.

  • openapi-specification
  • Backend & APIs
  • AI-coding skill

Openapi Specification by the numbers

  • 37 all-time installs (skills.sh)
  • Ranked #3,294 of 4,348 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/nickcrew/claude-ctx-plugin --skill openapi-specification

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs37
repo stars28
Last updatedJune 29, 2026
Repositorynickcrew/claude-ctx-plugin

What it does

Helps with backend & apis tasks.

Files

SKILL.mdMarkdownGitHub ↗

OpenAPI Specification

Design, validate, and maintain OpenAPI 3.x specifications for REST API contracts. Covers schema patterns, security schemes, versioning, and code generation integration.

When to Use This Skill

  • Creating a new OpenAPI specification from scratch
  • Adding endpoints or schemas to an existing spec
  • Reviewing or validating an API contract for correctness
  • Setting up code generation from OpenAPI definitions
  • Designing reusable schema components for large APIs
  • Implementing security schemes in API specifications
  • Managing API versioning and deprecation

Quick Reference

ResourcePurposeLoad when
references/spec-patterns.mdSchema patterns, security schemes, validation, versioning, reusable componentsDesigning or reviewing specs

---

Workflow

Phase 1: Design       → Define API overview, resources, and operations
Phase 2: Schema       → Build data models with reusable components
Phase 3: Validate     → Lint and verify the spec for correctness
Phase 4: Integrate    → Generate docs, SDKs, and contract tests

---

Phase 1: API Design

Start with a high-level design before writing the spec:

1. Identify resources -- what nouns does this API expose? 2. Map operations -- what CRUD and custom actions apply to each resource? 3. Define relationships -- how do resources reference each other? 4. Plan authentication -- what security schemes are needed? 5. Set conventions -- naming style, pagination, error format

Spec Skeleton

openapi: 3.1.0
info:
  title: [API Name]
  version: 1.0.0
  description: [What this API does]
paths:
  /resources:
    get:
      summary: List resources
      operationId: listResources
    post:
      summary: Create a resource
      operationId: createResource
  /resources/{id}:
    get:
      summary: Get a resource
      operationId: getResource
components:
  schemas: {}
  securitySchemes: {}

---

Phase 2: Schema Design

Build data models using components/schemas for reuse:

  • Use $ref to reference shared schemas -- never duplicate definitions
  • Apply allOf for composition, oneOf / anyOf for polymorphism
  • Add example values to every schema and property
  • Use required arrays explicitly -- don't rely on implicit behavior
  • Document nullable fields with type: [string, "null"] (3.1) or nullable: true (3.0)

---

Phase 3: Validate

Run validation before committing any spec changes:

# Spectral (recommended)
spectral lint openapi.yaml

# Redocly
redocly lint openapi.yaml

# swagger-cli
swagger-cli validate openapi.yaml

Common Validation Issues

IssueFix
Missing operationIdAdd unique operationId to every operation
Unused schemaRemove from components or add a $ref
Missing response descriptionAdd description to every response code
Path parameter not in pathMatch {param} in path with parameter definition
No 2xx response definedAdd at least one success response per operation

---

Phase 4: Integrate

Use the validated spec to generate downstream artifacts:

  • Documentation: Redoc, Swagger UI, Stoplight
  • Client SDKs: openapi-generator, autorest, orval
  • Server stubs: openapi-generator with server templates
  • Contract tests: Schemathesis, Dredd, Prism

---

Quality Checklist

  • [ ] All paths have operationIds
  • [ ] HTTP methods match resource actions (GET reads, POST creates, etc.)
  • [ ] Every response has a description and schema
  • [ ] Security requirements defined at operation or global level
  • [ ] Examples provided for request and response bodies
  • [ ] Consistent naming conventions (camelCase, snake_case -- pick one)
  • [ ] Deprecation fields set on sunset endpoints
  • [ ] Spec passes linter with zero errors

---

Anti-Patterns

  • Do not inline schemas -- use $ref to components/schemas for anything reused
  • Do not mix API versions in a single spec file
  • Do not use 200 OK for create operations -- use 201 Created
  • Do not omit error response schemas -- document 4xx and 5xx consistently
  • Do not use additionalProperties: true without clear justification

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.