openapi-expert
Qué hace
Esta skill guía la escritura de especificaciones OpenAPI que describen las rutas, los esquemas, la seguridad y las respuestas de una API. Está pensada para diseñadores de APIs de backend que quieren un contrato claro para otros desarrolladores.
Cuándo usarla
- ✓Cuando diseñas una API nueva y quieres un contrato claro antes de programar.
- ✓Cuando necesitas documentar una API existente en formato OpenAPI.
- ✓Cuando quieres comprobar en CI una especificación en busca de errores o cambios que rompan la compatibilidad.
Link de la skill
https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/openapi-expert/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Escribe una especificación OpenAPI para nuestra API de pedidos con rutas versionadas, esquemas reutilizables y descripciones claras.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La skill recomienda escribir primero la especificación, reutilizar esquemas mediante referencias, versionar la API y validar la especificación con herramientas de análisis estático.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
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
Preguntas frecuentes
¿Por qué escribir la especificación antes del código?
La especificación funciona como contrato entre el frontend, el backend y otros consumidores, así que todos acuerdan primero la forma.
¿Cómo debo versionar una API?
La skill sugiere versiones explícitas en la ruta de la URL o en una cabecera, para que los cambios no rompan a los clientes existentes.
¿Qué necesita la especificación además de los endpoints?
Descripciones para cada ruta, parámetro, propiedad y respuesta, para que la especificación funcione como documentación legible.
Detalles
Descripción original del autor
OpenAPI/Swagger expert for API specification design, validation, and code generation
repo: RightNow-AI/openfang
Popularidad
- Estrellas en GitHub
- 18 mil
- Posición en el ranking
- #10696
- Licencia
- Apache-2.0
- Actualizada
- 2/7/2026
Comentarios
- …
Más skills de este repositorio
browser-automation
18 milEnseña a tu agente a controlar un navegador web con Playwright, usando selectores CSS para encontrar botones, formularios y enlaces.
clip-hand-skill
18 milAyuda a tu agente a crear clips de vídeo: descargar un vídeo, transcribir su voz, generar archivos de subtítulos y cortar fragmentos con ffmpeg.
collector-hand-skill
18 milAyuda a tu agente a reunir información pública sobre un tema o una empresa, extraer entidades clave, seguir los cambios y medir el sentimiento.
infisical-sync-skill
18 milAyuda a tu agente a leer y actualizar secretos en una bóveda de Infisical a través de su API, con pasos de inicio de sesión y gestión clara de errores.
Skills parecidas
api-connector-builder
280 milHace que tu agente cree nuevas conexiones de API siguiendo el patrón existente. Úsalo para añadir una integración más sin inventar otra forma de hacer las cosas.
api-design
280 milAyuda a tu agente a diseñar APIs REST según las buenas prácticas. Es útil para definir cómo se comunican las APIs, cómo se muestran los errores y cómo organizar los datos.
backend-patterns
280 milAyuda a tu agente con patrones de arquitectura del lado del servidor y optimización de bases de datos. Es útil para crear o revisar código que se ejecuta en el servidor.