Skip to content
Back to skills

Openapi

ASecurity

Write or update an OpenAPI spec so it matches the actual API behavior

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 3, 2026
ai-agentsgoapisecurity

Works with

  • cli
  • api

Security analysis

A100/100

Scanned September 3, 2026

npx -y skills add black141312/ada --skill openapi --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Openapi?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Openapi
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/black141312-openapi/badge)](https://www.skillsdirectory.com/skills/black141312-openapi)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: openapi
description: Write or update an OpenAPI spec so it matches the actual API behavior
category: api
---

# Openapi

Reach for this when documenting an API in OpenAPI/Swagger, or keeping an existing spec in sync after an endpoint changes.

1. Locate the existing spec (`openapi.yaml`/`.json`) and confirm the version (3.0 vs 3.1) before editing — syntax differs.
2. Define or update the `paths` entry: method, parameters, `requestBody`, and every response status the handler can return.
3. Factor request/response shapes into `components/schemas` and reference with `$ref` instead of inlining duplicates.
4. Document auth via `securitySchemes` and apply `security` at the operation or root level to match real enforcement.
5. Add realistic `examples` and mark required fields and formats (`date-time`, `uuid`, `email`) so consumers and mocks behave.
6. Validate the spec with a linter (e.g. `spectral lint`/`swagger-cli validate`) and, if codegen is used, regenerate clients/types.

## Rules
- The spec must describe what the code does, not what you wish it did — verify against the handler.
- Document error responses (4xx/5xx), not just the 200 — consumers need the failure shapes.
- Reuse `$ref` schemas; duplicated inline objects drift apart over time.
- Match the OpenAPI version already in the file; 3.1 uses JSON Schema `type` arrays for nullable, 3.0 uses `nullable: true`.
- Lint before committing; an invalid spec breaks downstream codegen and mock servers.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.