openapi-parser

A parser for OpenAPI 3 and Swagger 2 specifications, documents that describe a web API's available requests and data.

In plain words
What is it for?
Use it to load JSON or YAML API specifications, check their version and required structure, and extract endpoint information.
Why use it?
It extracts endpoint details from local or remote specification files so other tools can use them for code generation.

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/jhlee0409/claude-plugins/openapi-parser
Any agent
npx skills add jhlee0409/claude-plugins --skill openapi-parser
Clone the repo
git clone --depth 1 https://github.com/jhlee0409/claude-plugins

Made for: Claude Code, Codex.

Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,057 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.00020 $0.02057
Opus 5 $0.00010 $0.01028
Sonnet 5 $0.00004 $0.00411
Haiku 4.5 $0.00002 $0.00206

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

Security

Grade A, and why

openapi-parser 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.

plugins/oas/skills/openapi-parser/SKILL.md · 280 lines

How it starts

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

OpenAPI Parser

Parse OpenAPI specifications and extract structured endpoint information for code generation.


EXECUTION INSTRUCTIONS

When this skill is invoked, Claude MUST perform these steps in order:

Step 1: Load Specification

Determine source type:

  • If source starts with http:// or https:// → Remote URL
  • Otherwise → Local file

For Remote URL:

  1. Use WebFetch tool to fetch the content
  2. Extract JSON from response
  3. If 404 → Error: ❌ Spec not found at URL
  4. If other error → Error: ❌ Failed to fetch: <error>

For Local File:

  1. Use Read tool to read the file
  2. If .yaml or .yml extension → Parse as YAML
  3. If .json extension or no extension → Parse as JSON
  4. If file not found → Error: ❌ File not found: <path>
  5. If parse error → Error: ❌ Invalid format: <error>

Step 2: Validate Specification

Check for valid OpenAPI/Swagger structure:

  1. Version Check:

    • If has openapi field (e.g., "3.0.0", "3.1.0") → OpenAPI 3.x
    • If has swagger field (e.g., "2.0") → Swagger 2.0
    • If neither → Error: ❌ Not a valid OpenAPI/Swagger spec
  2. Required Fields:

    • Must have info object with title and version
    • Must have paths object
    • If missing → Error: ❌ Missing required field: <field>
  3. Report:

    📄 OpenAPI: <title> v<version>
       Spec version: <openapi/swagger version>
       Endpoints: <count>
    

Step 3: Convert Swagger 2.0 (if needed)

If Swagger 2.0, convert to OpenAPI 3.0 format internally:

Swagger 2.0 OpenAPI 3.0
definitions components.schemas
parameters (body) requestBody
produces/consumes content with media types
securityDefinitions components.securitySchemes

Step 4: Extract Metadata

Extract and store:

{
  "title": "<info.title>",
  "version": "<info.version>",
  "description": "<info.description or null>",
  "servers": ["<server urls>"],
  "specVersion": "<openapi or swagger version>"
}

Read the full file on GitHub · 280 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 · 280 lines · 20 tokens per session scan A 97072f6e5acb

Subscribe to this mod's changes

openapi-parser is a skill published in the GitHub repository jhlee0409/claude-plugins (4 stars, last pushed 7mo ago), licensed MIT. It adds 20 tokens to every session and 2,057 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.