skills/openapi-specification/SKILL.md
OpenAPI 3.x specification design, schema patterns, and validation for REST API contracts. Use when creating or maintaining API specifications, generating documentation, or validating API contracts.
npx skillsauth add nickcrew/claude-cortex openapi-specificationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Design, validate, and maintain OpenAPI 3.x specifications for REST API contracts. Covers schema patterns, security schemes, versioning, and code generation integration.
| Resource | Purpose | Load when |
|----------|---------|-----------|
| references/spec-patterns.md | Schema patterns, security schemes, validation, versioning, reusable components | Designing or reviewing specs |
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
Start with a high-level design before writing the spec:
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: {}
Build data models using components/schemas for reuse:
$ref to reference shared schemas -- never duplicate definitionsallOf for composition, oneOf / anyOf for polymorphismexample values to every schema and propertyrequired arrays explicitly -- don't rely on implicit behaviortype: [string, "null"] (3.1) or nullable: true (3.0)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
| Issue | Fix |
|-------|-----|
| Missing operationId | Add unique operationId to every operation |
| Unused schema | Remove from components or add a $ref |
| Missing response description | Add description to every response code |
| Path parameter not in path | Match {param} in path with parameter definition |
| No 2xx response defined | Add at least one success response per operation |
Use the validated spec to generate downstream artifacts:
$ref to components/schemas for anything reused200 OK for create operations -- use 201 Created4xx and 5xx consistentlyadditionalProperties: true without clear justificationdevelopment
Product vision, roadmap development, and go-to-market execution with structured prioritization frameworks. Use when evaluating features, planning product direction, or assessing market fit.
development
Complete operational workflow for implementer agents (Codex, Gemini, etc.) making code changes and writing tests. Drives all work through atomic commits — each loop operates on the smallest complete, reviewable change. Defines the Code Change Loop, Test Writing Loop, Lint Gate, and Issue Filing process with circuit breakers, severity levels, and escalation rules. Requires `cortex git commit` for all commits. Includes bundled provider-aware review scripts that keep same-model shell-outs as the last resort, plus a fresh-context Codex fallback for code review and test audit. Use this skill when starting any implementation task.
development
Use this skill when writing product requirements documents, prioritizing features, creating user stories, defining acceptance criteria, or setting product metrics. Trigger phrases: 'write a PRD for', 'prioritize this feature backlog', 'write user stories for', 'help me define acceptance criteria', 'what metrics should we track for'. Not for writing code, designing UI mockups, or conducting user research interviews.
tools
Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.