<< All versions

Skill v1.1.1

currentAutomated scan100/100
scaledockhq/scaledock-skills/openapi

+13 new

──Details
PublishedOctober 30, 2026 at 01:57 PM
Content Hashsha256:dc0f4291d6491ba6...
Git SHA507baa61ffba
Bump Typepatch
Compare with v1.0.0
──Files
Files (1 file, 13.2 KB)
SKILL.md13.2 KBactive
SKILL.md · 117 lines · 13.2 KB

name: openapi description: "OpenAPI 3.0 to 3.2: write, validate and upgrade API descriptions (OpenAPI Specification 3.2.1 current, 3.1 and 3.0 supported, Swagger 2.0 upgraded from, 3.3 preview tracked). Use when creating or reviewing an openapi.yaml or openapi.json, picking the openapi version, upgrading from Swagger 2.0, OpenAPI 3.0 or 3.1 to 3.2, describing security (securitySchemes, OAuth 2.0 flows including the device authorization flow, oauth2MetadataUrl, security requirements), adding nested tags, the QUERY method, additionalOperations, querystring parameters, server-sent events and other streaming media types with itemSchema, or $self, naming x- extensions from the OAI Extension and Namespace registries, validating against the official OAS JSON Schemas, or tracking the OpenAPI 3.3 development line and the Security Profiles proposal. Triggers: OpenAPI, OAS, Swagger, openapi: 3.2.0, swagger: 2.0, operationId, securitySchemes, x-oai-, spec.openapis.org." license: MIT metadata: author: ScaleDockHQ version: "1.1.1" kind: standard


OpenAPI Specification

The OpenAPI Specification (OAS), published by the OpenAPI Initiative (OAI), defines a language-agnostic description of HTTP APIs (§ 2). With this skill the agent writes, reviews, upgrades and validates OpenAPI Descriptions (OADs) for 3.2, keeps them readable by 3.1 or 3.0 tooling when needed, upgrades Swagger 2.0 documents, and names extensions without colliding with anyone else.

Follow the workflow below step by step. Every rule here comes from a source in Sources, with the section it cites. Section numbers are those of OAS 3.2.1 unless a rule says otherwise; on another target, cite that version's sections, which `references/versions.md` maps. When a rule and the pinned source disagree, the source wins; when the source has a newer revision than the pin, follow the refresh steps.

Inputs (fill in, or ask before starting)

  • Role: author (writes or generates the OAD), consumer (reads it: client generator, gateway, docs, agent), or reviewer.
  • Target version: OpenAPI 3.2 (current, default). OpenAPI 3.1 and OpenAPI 3.0 are supported: use them only for a named consumer that cannot read the newer line. Swagger 2.0 is legacy: read it and upgrade from it, never author it. OpenAPI 3.3 is a preview (posture: track): never emit it. See `references/versions.md`.
  • Revision: the pinned revision in Sources, unless the user names another.
  • Sources: when refreshing this skill or when a rule looks out of date, re-read every URL in Sources first, check spec.openapis.org/oas for a newer version or schema iteration, check the v3.3-dev branch and the Security Profiles discussion for movement, and update the pins.

Invariants

These cite OAS 3.2.1. Most hold in 3.1 and 3.0 under other section numbers; the exceptions (for example paths is REQUIRED in 3.0, and querystring and $self are 3.2 only) are in `references/versions.md`.

  1. `openapi` names the specification version. It is REQUIRED and tooling interprets the document by it (§ 4.1.1). Tooling SHOULD NOT distinguish patch versions, so 3.2.0 and 3.2.1 mean the same feature set (§ 2.1).
  2. A document has `info` and at least one of `paths`, `webhooks` or `components` (§ 4.1.1).
  3. `operationId` is unique among all operations in the API and case-sensitive (§ 4.10.1).
  4. Every path template expression has a matching path parameter, defined on the Path Item or on each of its operations (§ 4.8.2), and templated paths that differ only in parameter names MUST NOT both exist (§ 4.8.1).
  5. A parameter has either `schema` or `content`, never both (§ 4.12.2), is unique by name plus in (§ 4.10.1), and an in: querystring parameter never sits next to in: query parameters (§ 4.12.1).
  6. Component keys match `^[a-zA-Z0-9\.\-_]+$` (§ 4.7.1).
  7. Security requirements mean OR across the array and AND within one object. Each name is a declared scheme or a scheme URI; {} allows anonymous access; an operation's security: [] removes the top-level requirement (§ 4.30, § 4.10.1).
  8. Extensions start with `x-`, and `x-oai-` and `x-oas-` are reserved for the OAI (§ 5).
  9. A Reference Object carries only `$ref`, `summary` and `description`; other properties are ignored (§ 4.23.1).
  10. When a document sets `$self`, references to it use that URI (§ 4.1.1).

Workflow

  1. Pick the version and schema. Default to 3.2 at the latest patch; drop to 3.1 or 3.0 only for a named consumer that cannot read the newer line. A swagger: "2.0" input goes to step 5.

-> `references/versions.md` ✓ openapi is set to a current or supported line, and you know which official schema validates the document.

  1. Lay out the document. Write info, servers, paths with one Operation Object per method, components for reuse, and tags. Give every operation an operationId, because Arazzo steps and Overlay targets join on it.

-> `references/objects.md` ✓ Invariants 2 to 6 and 9 hold.

  1. Describe security. Declare schemes under components.securitySchemes, set the root security default, and override per operation. Use the 3.2 fields for device authorization, server metadata and deprecation; on a 3.1 target use the registered x-oai-* fallbacks.

-> `references/security.md` ✓ Every requirement name resolves, every OAuth scope used is declared on its flow, and public operations say so explicitly.

  1. Name extensions. Reuse a registered extension when one fits its documented purpose; otherwise use your own registered or registrable namespace prefix.

-> `references/registries.md` ✓ No invented x-oai- or x-oas- names, and no writes into another party's namespace.

  1. Upgrade an existing description (only when asked, or for a Swagger 2.0 input). Follow the upgrade section for each step from the source line to the target (2.0 to 3.0, 3.0 to 3.1, 3.1 to 3.2), validating after each.

-> `references/versions.md` ✓ The upgraded document validates against the target schema and still describes the same API.

  1. Validate. Run the document through the official JSON Schema for its minor version, and fix what it reports. Then check the rules a schema cannot see (invariants 3, 4 and 7).

-> `references/validation.md` ✓ Schema validation passes with the latest iteration for the minor version.

  1. Track 3.3, do not emit it. Read what the v3.3-dev branch and the Security Profiles proposal contain today; record anything you plan around.

-> `references/drafts.md` ✓ No openapi: 3.3.x document, type: profile scheme or Path Item security field is produced.

Verify before done

  • [ ] The document validates against the official schema for its minor version, latest iteration (`references/validation.md`); use schema-base when Schema Objects must be checked too.
  • [ ] Every operationId is unique (§ 4.10.1) and every path template has its parameter (§ 4.8.2).
  • [ ] Every Security Requirement name resolves to a declared scheme or a scheme URI (§ 4.30), and the OAuth scopes listed are among the available scopes of that scheme's flows (§ 4.29.1, § 4.30.1).
  • [ ] Operations that need no authentication say so with security: [] or an {} entry, rather than by omission (§ 4.10.1).
  • [ ] Every extension is registered for the object it sits on, or lives under your own namespace (§ 5, Extension Registry).
  • [ ] A 3.1 target uses no 3.2-only field; the x-oai-* fallback is used where the registry defines one (`references/security.md`). A 3.0 target uses no 3.1 or 3.2 field and keeps 3.0 Schema Objects (nullable, boolean exclusiveMinimum).
  • [ ] No Swagger 2.0 document is written.
  • [ ] Nothing from the 3.3 development line is emitted.

Reference index

  • `references/versions.md`: every version line from Swagger 2.0 to the 3.3 preview with its status, which one to use, what changed in each, the 2.0 to 3.0, 3.0 to 3.1 and 3.1 to 3.2 upgrades, and the registered fallbacks for 3.2 fields. Load for steps 1 and 5.
  • `references/objects.md`: document structure, paths, operations, parameters, tags, references and schema dialects, with a minimal 3.2 example. Load for step 2.
  • `references/security.md`: Security Scheme, OAuth Flows, OAuth Flow and Security Requirement Objects, 3.1 fallbacks, and the security considerations. Load for step 3.
  • `references/registries.md`: the OAI Extension and Namespace registries, the reserved prefixes, and how to register. Load for step 4.
  • `references/validation.md`: the official JSON Schemas, schema versus schema-base, iteration rules, and what a schema cannot check. Load for step 6.
  • `references/drafts.md`: the 3.3 development line and the Security Profiles proposal, with draft posture. Load for step 7.

Related skills

  • openapi-overlay to change an OAD repeatably without editing it: npx skills add ScaleDockHQ/scaledock-skills --skill openapi-overlay.
  • openapi-arazzo to describe multi-step workflows over OpenAPI operations: npx skills add ScaleDockHQ/scaledock-skills --skill openapi-arazzo.
  • typespec to design an API in TypeSpec and emit the OAD from it: npx skills add ScaleDockHQ/scaledock-skills --skill typespec.
  • asyncapi for event-driven and message-based APIs: npx skills add ScaleDockHQ/scaledock-skills --skill asyncapi.
  • json-schema for writing and reviewing the JSON Schema dialects that Schema Objects use: npx skills add ScaleDockHQ/scaledock-skills --skill json-schema.
  • http-semantics for the methods, status codes, conditional requests and caching behind each operation: npx skills add ScaleDockHQ/scaledock-skills --skill http-semantics.

Sources

Status uses the publishing body's own maturity term. Checked is the date the source was last read.

← v1.0.0All versions