openapi-spec

openapi-spec is a skill for Claude Code from KhaledSaeed18/dotclaude. It costs 109 tokens per session (1,280 once invoked), scanned A, original, MIT.

An OpenAPI 3.1 specification guide for describing an HTTP API. OpenAPI is a standard document format that can support validation, generated client code, mock servers, and documentation.

In plain words
What is it for?
It helps design or generate API specifications with routes, schemas, examples, errors, authentication, pagination, versioning, linting, and contract tests.
Why use it?
It helps keep API documentation, implementation, and consumer expectations from drifting apart, especially when routes, data formats, errors, or authentication change.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the docs plugin — 4 skills shipped together

Good fit It helps design or generate API specifications with routes, schemas, examples, errors, authentication, pagination, versioning, linting, and contract tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/khaledsaeed18/dotclaude/openapi-spec
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add KhaledSaeed18/dotclaude --skill openapi-spec
Clone the repo
git clone --depth 1 https://github.com/KhaledSaeed18/dotclaude

Made for: Claude Code.

Or install docs, the plugin that ships this one along with the rest of its 4 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for openapi-spec

README.md
[![agentmods](https://agentmods.dev/badge/skills/khaledsaeed18/dotclaude/openapi-spec/github.svg)](https://agentmods.dev/skills/khaledsaeed18/dotclaude/openapi-spec)
Your own site
<a href="https://agentmods.dev/skills/khaledsaeed18/dotclaude/openapi-spec"><img src="https://agentmods.dev/badge/skills/khaledsaeed18/dotclaude/openapi-spec/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for openapi-spec

Your own site · 80×15
<a href="https://agentmods.dev/skills/khaledsaeed18/dotclaude/openapi-spec"><img src="https://agentmods.dev/badge/skills/khaledsaeed18/dotclaude/openapi-spec.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 109 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,280 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00109 $0.01280
Opus 5.5 $0.00044 $0.00512
Sonnet 5.5 $0.00022 $0.00256
Haiku 4.5 $0.00011 $0.00128

Measured 25d ago against content hash 0a2b2b1f8a69, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

openapi-spec scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 25d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude-plugin/plugins/docs/skills/openapi-spec/SKILL.md · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Read the full file on GitHub · 71 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 25d ago First seen · 71 lines · 109 tokens per session scan A 0a2b2b1f8a69

Subscribe to this mod's changes

openapi-spec is a skill published in the GitHub repository KhaledSaeed18/dotclaude (5 stars, last pushed 2d ago), licensed MIT. It adds 109 tokens to every session and 1,280 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-22.

Related

Other skills, from other repositories

form-strategy

Design forms that convert, validate well, resist spam, and integrate cleanly with downstream systems. Use this skill when designing or auditing any form (contact, signup, checkout, multi-step, embedded), planning validation logic, fighting spam, choosing form tooling, or improving form conversion. Triggers on form…

rampstackco/claude-skills · 107 tokens

netlify-development

Best practices for building and deploying Netlify sites, covering serverless and edge functions, Netlify Blobs storage, the Image CDN, and build configuration. Use when writing Netlify Functions or Edge Functions, configuring netlify.toml or redirects/headers, managing environment variables across deploy contexts…

Mindrally/skills · 78 tokens

nextauth-authentication

Guidelines for implementing NextAuth.js (Auth.js v5) authentication in Next.js applications with session management and security best practices.

Mindrally/skills · 30 tokens

api-security-best-practices

Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities.

lingxling/awesome-skills-cn · 29 tokens

apollo-graphql

Guidelines for developing GraphQL APIs and React applications using Apollo Client for state management, data fetching, and caching.

Mindrally/skills · 26 tokens

beautifulsoup-parsing

Expert guidance for HTML/XML parsing using BeautifulSoup in Python with best practices for DOM navigation, data extraction, and efficient scraping workflows.

Mindrally/skills · 32 tokens