validate-spec

An OpenAPI specification checker. OpenAPI is a standard document that describes an HTTP API so people and software tools can understand its endpoints, inputs, outputs, and rules.

In plain words
What is it for?
Use it to validate an OpenAPI file, run stricter checks, review warnings separately, and understand errors by their location in the specification.
Why use it?
It finds errors and warnings that can break API tooling, documentation, or code generation, then explains where they occur and what they mean.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/erraggy/oastools/validate-spec
Any agent
npx skills add erraggy/oastools --skill validate-spec
Clone the repo
git clone --depth 1 https://github.com/erraggy/oastools

Made for: Claude Code, Codex.

Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 614 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00018 $0.00614
Opus 5 $0.00009 $0.00307
Sonnet 5 $0.00004 $0.00123
Haiku 4.5 $0.00002 $0.00061

Measured 2d ago against content hash 7e0f3e0da997, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

validate-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 2d 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.

plugin/skills/validate-spec/SKILL.md · 78 lines

How it starts

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

Validate an OpenAPI Specification

Step 1: Run validation

Call the validate tool on the user's spec:

{"spec": {"file": "<path>"}}

If the user wants strict validation, add "strict": true.

⚠️ Tip for large specs: Use "no_warnings": true for initial triage. Large specs can produce hundreds of warnings that obscure the actual errors. Get the error picture first, then run again without no_warnings to review warnings separately.

Step 2: Report results

If the spec is valid:

  • Confirm it passes validation
  • Mention the detected OAS version
  • Note any warnings (unless no_warnings was set)

If the spec has errors:

  • List each error with its JSON path and a plain-language explanation
  • Group related errors (e.g., multiple missing $ref targets)
  • Explain why each error matters and what it would cause in practice (tooling failures, code generation issues, etc.)

Paginating large results

Results are paginated (default limit: 100). When returned < error_count, there are more errors:

{"spec": {"file": "<path>"}, "offset": 100, "limit": 100}

⚠️ Strategy for large error sets: Analyze the first page for patterns — if errors are repetitive (e.g., hundreds of missing path parameters), summarize the pattern and total count rather than paging through all of them. Only page further when errors appear diverse or the user needs specifics.

Step 3: Suggest fixes

For each error, explain how to fix it. Common patterns:

Error type Suggested fix
Missing path parameter Add the parameter to the operation's parameters array
Duplicate operationId Rename to be unique, following a verb+resource pattern
Invalid $ref target Fix the reference path, or stub the missing schema
Missing required field Add the field with an appropriate value

If the errors are auto-fixable, offer to run the fix tool:

{"spec": {"file": "<path>"}, "dry_run": true}

Show the user the planned fixes before applying. ✅ When applying, use output to persist:

Read the full file on GitHub · 78 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. 2d ago First seen · 78 lines · 18 tokens per session scan A 7e0f3e0da997

Subscribe to this mod's changes

validate-spec is a skill published in the GitHub repository erraggy/oastools (5 stars, last pushed 4d ago), licensed MIT. It adds 18 tokens to every session and 614 once invoked, about $0.0001 per session on Opus 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-08-31.