openapi-spec
Write, generate, or review an OpenAPI 3.1 specification for an HTTP API so that it is accurate to the implementation, complete for consumers (schemas…
Skill by KhaledSaeed18
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/khaledsaeed18-openapi-spec
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, design, backend, testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/openapi-spec
What's inside
- Skill name
openapi-spec- Description
- Write, generate, or review an OpenAPI 3.1 specification for an HTTP API so that it is accurate to the implementation, complete for consumers (schemas, examples, errors, auth, pagination), and usable by tooling (validation, client generation, mock servers). Covers design-first and code-first workflows, linting with Spectral, and keeping the spec in sync in CI. Use when documenting an API, when a client generator or contract test needs a spec, or when the existing spec no longer matches the routes.
- License
- MIT
- Instructions
- 66 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
An OpenAPI document is a contract. It is worth having only if it is true, so the first question is always how it stays in sync with the code: generated from annotations or types (code-first), or validated against the implementation in CI (design-first). Pick one and make the check mechanical.
## Workflow
**Code-first** (existing API, typed framework): generate from the source of truth. NestJS (`@nestjs/swagger` decorators), FastAPI (automatic from Pydantic models), Spring (springdoc), Go (`swag`, or `huma`/`oapi-codegen` design-first), Express or Hono with zod (`zod-openapi`, `@asteasolutions/zod-to-openapi`). Commit the generated file and diff it in CI so an undocumented route change fails the build.
**Design-first** (new API, multiple implementers): write `openapi.yaml` by hand, generate server stubs and clients from it, and add a contract test (Prism mock or Dredd/Schemathesis against the running server) so the implementation cannot drift.
Either way: `spectral lint openapi.yaml` in CI with the `spectral:oas` ruleset plus house rules.
## What a complete spec has
- `info` with a real description, version (semver, bumped with breaking changes), contact.
- `servers` for each environment, with variables for the base URL.
- `securitySchemes` (bearer JWT, API key header, OAuth2 flows) and a top-level `security` default, overridden per operation where public.
- Every operation: `operationId` (unique, verbNoun, used as the client method name), `summary` (one line), `description` (when behaviour needs it), `tags` (one per resource), parameters with types, formats, constraints, and examples, request body with schema and example, every response the server can send (200/201/204, 400, 401, 403, 404, 409, 422, 429, 500) with a schema.
- One error schema used everywhere (RFC 9457 problem details: `type`, `title`, `status`, `detail`, `instance`, plus `errors[]` for validation).
- Pagination described once (cursor or page/limit) as reusable parameters and a response envelope schema.
- Schemas in `components/schemas` with `required`, `nullable` (3.1: `type: [string, "null"]`), `enum`, `format` (`date-time`, `uuid`, `email`, `uri`), `minimum`/`maxLength`, `readOnly` for server-set fields, `example` or `examples` on each.
- `deprecated: true` with a `description` saying the replacement and the removal date.
## Design rules that show up in the spec
- Resource nouns, plural, kebab-case paths: `/api/v1/order-items/{orderItemId}`.
- Ids as opaque strings (`format: uuid` when true); never expose sequential integers unless they are the public key.
- Filtering, sorting, and field selection as query parameters with documented syntax.
- Idempotency: `PUT` and `DELETE` idempotent by definition; `POST` creates take an `Idempotency-Key` header when retries are expected.
- Versioning in the path or an `Accept` header, one scheme, stated in `info.description`.
- Timestamps ISO 8601 UTC; money as integer minor units plus a currency code, never floats.
## Reviewing an existing spec
1. List the routes the code actually serves (framework route table, `grep` for the router) and diff against `paths`. Undocumented and phantom routes are the first findings.
2. For each operation, call it (or read the handler) and compare the real response shape and status codes with the spec.
3. Run `spectral lint`; fix errors, evaluate warnings.
4. Check examples validate against their schemas (`openapi-examples-validator` or Spectral's `oas3-valid-media-example`).
5. Generate a client (`openapi-generator-cli`, `openapi-typescript`) and read the output; awkward names reveal missing `operationId`s and inline schemas that should be components.
## Minimal skeleton
```yaml
openapi: 3.1.0
info: { title: Orders API, version: 1.2.0, description: ... }
servers: [{ url: https://api.example.com/v1 }]
security: [{ bearerAuth: [] }]
tags: [{ name: orders }]
paths:
/orders:
get:
operationId: listOrders
summary: List orders
tags: [orders]
parameters: [{ $ref: '#/components/parameters/Cursor' }, { $ref: '#/components/parameters/Limit' }]
responses:
'200': { description: A page of orders, content: { application/json: { schema: { $ref: '#/components/schemas/OrderPage' } } } }
'401': { $ref: '#/components/responses/Unauthorized' }
components:
securitySchemes: { bearerAuth: { type: http, scheme: bearer, bearerFormat: JWT } }
parameters: ...
responses: ...
schemas: ...
```
Keep the file split with `$ref` to `components/` files once it passes a thousand lines, and bundle for publishing (`redocly bundle`).From KhaledSaeed18/dotclaude, MIT.
More from KhaledSaeed18/dotclaude
- 0.619score
ghcr-coolify-pipeline
KhaledSaeed18
Write the single GitHub Actions workflow that takes a repository from pull request to production through GHCR and Coolify.
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
coolify-image-app
KhaledSaeed18
Create and configure a Coolify application that runs a prebuilt image from a registry.
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
coolify-vps-baseline
KhaledSaeed18
Prepare a Linux VPS to run production containers under Coolify.
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
deploy-verification
KhaledSaeed18
Prove a deployment from the server side.
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
express-prisma-coolify-image
KhaledSaeed18
Package an Express and Prisma API as a runtime-only image that migrates its Postgres database at start.
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
live-domain-cutover
KhaledSaeed18
Move a live domain from one host to another without downtime or lost sessions, with a rehearsal, a timed DNS switch, a soak and the old host removed.
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
nextjs-coolify-image
KhaledSaeed18
Package a Next.js app as a runtime-only container image with a health probe and a fast shutdown.
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
proxy-client-address
KhaledSaeed18
Forward the real client address from a server-side proxy to a backend without trusting forgeable headers.
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
vps-ops-toolkit
KhaledSaeed18
Install host operations on a VPS, with a cron health check that alerts on change, restore-verified encrypted database backups, and an installer.
SkillAFreshness: A★ 5Claude Code +9 - 0.579score
dockerfile-best-practices
KhaledSaeed18
Write or review a Dockerfile and compose setup for a production service: multi-stage builds that ship only the runtime, pinned base images, layer order for…
SkillBFreshness: B★ 5Claude Code +9 - 0.579score
api-design-review
KhaledSaeed18
Review an API contract (REST or GraphQL) before or while it is implemented, checking resource naming, HTTP semantics, status codes, error shape, pagination…
SkillBFreshness: B★ 5Claude Code +9 - 0.579score
code-review-response
KhaledSaeed18
Process code-review feedback with technical rigour.
SkillBFreshness: B★ 5Claude Code +9
Signals
- Stars
- 5
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Sep 21, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/KhaledSaeed18/dotclaude
- Website
- dotclaude.khaledsaeed.tech/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from KhaledSaeed18
- 0.619score
ghcr-coolify-pipeline
KhaledSaeed18
Write the single GitHub Actions workflow that takes a repository from pull request to production through GHCR and Coolify.
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
express-prisma-coolify-image
KhaledSaeed18
Package an Express and Prisma API as a runtime-only image that migrates its Postgres database at start.
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
coolify-image-app
KhaledSaeed18
Create and configure a Coolify application that runs a prebuilt image from a registry.
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
coolify-vps-baseline
KhaledSaeed18
Prepare a Linux VPS to run production containers under Coolify.
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
deploy-verification
KhaledSaeed18
Prove a deployment from the server side.
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
live-domain-cutover
KhaledSaeed18
Move a live domain from one host to another without downtime or lost sessions, with a rehearsal, a timed DNS switch, a soak and the old host removed.
SkillAFreshness: A★ 5Claude Code +9
Cite this page
openapi-spec skill. Agent Mart. https://agentmart.dev/skills/khaledsaeed18-openapi-spec (last updated 2026-10-24)