Skip to content
cccskills
FreePublished on GitHub

openapi-expert

Design consistent API specifications with OpenAPI 3.0 and 3.1. Define requests, responses, authentication, and reusable data structures, then guide specification checks, documentation, and generation of client libraries or starter server code.

OriginalShow the original description

OpenAPI/Swagger expert for API specification design, validation, and code generation

See how to install

Good for

  • Define an API contract before implementation
  • Standardize authentication and error responses
  • Check API specifications in CI
  • Generate client libraries and server stubs

Files included (1)

  • SKILL.md4.0 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

OpenAPI Expert

An API design architect with deep expertise in the OpenAPI Specification, RESTful API conventions, and the tooling ecosystem for validation, documentation, and code generation. This skill provides guidance for designing clear, consistent, and evolvable API contracts using OpenAPI 3.0 and 3.1, covering schema composition, security definitions, versioning strategies, and developer experience optimization.

Key Principles

  • Design the API specification before writing implementation code; the spec serves as the contract between frontend, backend, mobile, and third-party consumers
  • Use $ref extensively to define reusable schemas, parameters, and responses in the components section; duplication across paths leads to inconsistency and maintenance burden
  • Version your API explicitly through URL path prefixes (/v1/, /v2/) or custom headers; never break existing consumers by changing response shapes without a version boundary
  • Write meaningful descriptions for every path, parameter, schema property, and response; the spec doubles as your API documentation and should be understandable without reading source code
  • Validate the spec in CI using linting tools to catch breaking changes, missing descriptions, inconsistent naming, and schema errors before they reach production

Techniques

  • Structure the OpenAPI document with info (title, version, contact), servers (base URLs per environment), paths (endpoints), and components (schemas, securitySchemes, parameters, responses)
  • Compose schemas using allOf for inheritance (base object + extension), oneOf for polymorphism (exactly one match), and anyOf for flexible unions (at least one match)
  • Provide request and response examples at both the schema level and the media type level; tools like Swagger UI and Redoc render these prominently for developer reference
  • Define security schemes (Bearer JWT, API key, OAuth2 flows) in components/securitySchemes and apply them globally or per-operation with the security field
  • Distinguish path parameters (/users/{id}), query parameters (?page=2&limit=20), and header parameters for different use cases; path parameters identify resources, query parameters filter or paginate
  • Implement consistent pagination with limit/offset or cursor-based patterns, documenting the pagination metadata schema (total, next_cursor, has_more) in a reusable component
  • Generate server stubs and client SDKs using openapi-generator with language-specific templates; customize templates for your coding conventions

Common Patterns

  • Error Response Schema: Define a reusable error object with code (machine-readable string), message (human-readable), and details (array of field-level errors) applied consistently across all error responses
  • Polymorphic Responses: Use discriminator with oneOf to model responses that can be different types (e.g., a notification that is either an EmailNotification or PushNotification) with a type field
  • Pagination Envelope: Wrap list responses in a standard envelope with data (array of items), pagination (cursor or offset metadata), and optional meta (total count, timing)
  • Webhook Definitions: Use the webhooks section (OpenAPI 3.1) to document callback payloads your API sends to consumers, specifying the event schema and expected acknowledgment

Pitfalls to Avoid

  • Do not use additionalProperties: true by default; it makes schemas permissive and hides unexpected fields that may cause client parsing issues
  • Do not define inline schemas for every request and response body; extract them to components/schemas with descriptive names for reuse and clarity
  • Do not mix naming conventions (camelCase and snake_case) within the same API; pick one convention and enforce it with a linter rule
  • Do not skip providing enum descriptions; raw enum values like "PENDING", "ACTIVE", "SUSPENDED" need documentation explaining what each state means and what transitions are valid

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

ansible

FreeSummary

Create Ansible automation for configuring and updating servers. Organizes reusable tasks and host settings, protects secrets with Ansible Vault, and plans staged updates with checks so repeated runs keep systems in the intended state.

  • Automating configuration across multiple servers
  • Organizing reusable tasks and environment settings
  • Encrypting credentials with Ansible Vault
RightNow-AI/openfang18.2KUpdated Jul 2, 2026

api-tester

FreeSummary

Test and debug REST and GraphQL APIs using curl, httpie, Postman collections, or scripted tests. Check authentication, invalid inputs, pagination, and response details to identify failures that a successful status code alone may miss.

  • Checking authentication and access permissions
  • Testing invalid inputs and boundary conditions
  • Debugging failed HTTP requests
RightNow-AI/openfang18.2KUpdated Jul 2, 2026

aws

FreeSummary

Plan, deploy, and manage AWS infrastructure across computing, storage, networking, and serverless services. Get guidance on access permissions, backups, auditing, and cost management using AWS CLI and tools that define infrastructure in code.

  • Plan configurations for EC2, S3, and Lambda
  • Review IAM permissions and network access
  • Identify unused resources and review costs
RightNow-AI/openfang18.2KUpdated Jul 2, 2026

azure

FreeSummary

Helps design and provision Microsoft Azure infrastructure using az CLI and Bicep configuration files. Covers choosing application hosting services, managing identities and secrets, designing networks, setting up monitoring, and organizing resources for cost management.

  • Define repeatable infrastructure with Bicep
  • Choose hosting services for web apps and containers
  • Design identity permissions and secret storage
RightNow-AI/openfang18.2KUpdated Jul 2, 2026

Automate website searches, logins, form entry, and price comparisons using Playwright, a browser automation tool. Provides workflows for locating page elements, checking results, and recovering from navigation errors or missing elements.

  • Comparing product prices across online stores
  • Filling and submitting web forms
  • Logging in and checking the result
RightNow-AI/openfang18.2KUpdated Jul 2, 2026

ci-cd

FreeSummary

Design automated build, test, and deployment workflows for GitHub Actions, GitLab CI/CD, and Jenkins. Covers job ordering, dependency caching, secret handling, and gradual releases that use health checks before expanding deployment.

  • Automating builds, tests, and deployments
  • Reducing pipeline time with caching and parallel jobs
  • Planning gradual releases and rollbacks
RightNow-AI/openfang18.2KUpdated Jul 2, 2026

See all skills by RightNow-AI

Report a problem with this skill