openapi-parser

openapi-parser is a skill for Claude Code from pactflow/pactflow-agent-skills. It costs 145 tokens per session (1,419 once invoked), scanned A, original, MIT.

An OpenAPI 3.x parser that turns API specifications into Drift test cases. OpenAPI is a standard document describing an API's endpoints, inputs, outputs, and data types; Drift is the test format used here.

In plain words
What is it for?
It is for generating Drift tests from schemas using alternatives, inheritance, discriminators, reusable references, patterns, enums, and optional or nullable fields.
Why use it?
It handles complicated schemas and references that are easy to overlook when writing API tests by hand.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the swagger-contract-testing plugin — 6 skills, 6 agents, 2 hooks, 1 MCP server shipped together

Good fit It is for generating Drift tests from schemas using alternatives, inheritance, discriminators, reusable references, patterns, enums, and optional or nullable fields.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pactflow/pactflow-agent-skills/openapi-parser
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 pactflow/pactflow-agent-skills --skill openapi-parser
Clone the repo
git clone --depth 1 https://github.com/pactflow/pactflow-agent-skills

Made for: Claude Code.

Or install swagger-contract-testing, the plugin that ships this one along with the rest of its 6 skills, 6 agents, 2 hooks, 1 MCP server.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/pactflow/pactflow-agent-skills/openapi-parser/github.svg)](https://agentmods.dev/skills/pactflow/pactflow-agent-skills/openapi-parser)
Your own site
<a href="https://agentmods.dev/skills/pactflow/pactflow-agent-skills/openapi-parser"><img src="https://agentmods.dev/badge/skills/pactflow/pactflow-agent-skills/openapi-parser/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-parser

Your own site · 80×15
<a href="https://agentmods.dev/skills/pactflow/pactflow-agent-skills/openapi-parser"><img src="https://agentmods.dev/badge/skills/pactflow/pactflow-agent-skills/openapi-parser.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 145 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,419 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.00145 $0.01419
Opus 5.5 $0.00058 $0.00568
Sonnet 5.5 $0.00029 $0.00284
Haiku 4.5 $0.00015 $0.00142

Measured 1mo ago against content hash 85d80b339744, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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/swagger-contract-testing/skills/openapi-parser/SKILL.md · 140 lines

How it starts

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

OpenAPI Parser Skill

Reference files

  • references/schema-patterns.md — how to interpret and enumerate every complex pattern (anyOf / oneOf / allOf / discriminator / $ref / enum / pattern / nullable / optional), with real examples from snyk, digitalocean, posthog, and front/core specs
  • references/drift-mapping.md — how to map enumerated schema variants to Drift YAML, including datasets, expressions, lifecycle hooks for stateful cases, and expected response matchers for each pattern type

Workflow

OpenAPI version: This skill targets OpenAPI 3.x. Swagger 2.0 specs use the same structural patterns ($ref, allOf, oneOf) but different envelope syntax — you may need to adapt field names manually. If working from the konfig-sdks/openapi-examples collection, see references/example-repos.md for navigation commands.

1. Locate the endpoint

Extract only what's needed:

# Find the line number of the endpoint (macOS/Linux/Git Bash/WSL)
grep -n "^  /path/to/endpoint" spec.yaml

# Read just that block (adjust line range as needed)
# Then follow each $ref to components/schemas
grep -n "SchemaName:" spec.yaml
# PowerShell equivalents (Windows)
Select-String -Path spec.yaml -Pattern "^  /path/to/endpoint" | Select-Object LineNumber, Line
Select-String -Path spec.yaml -Pattern "SchemaName:" | Select-Object LineNumber, Line

Extract: path/query/header parameters, request body schema, and each response status code's schema.

2. Resolve $refs recursively

  1. Grep for Foo: in the spec to find its definition block
  2. If Foo itself contains refs, resolve those too
  3. Stop at primitive types (string, integer, boolean, array, object)

allOf: [$ref: Base, properties: {...}] is inheritance — merge Base fields with local properties to get the full schema. See references/schema-patterns.md for all patterns.

Read the full file on GitHub · 140 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. 1mo ago First seen · 140 lines · 145 tokens per session scan A 85d80b339744

Subscribe to this mod's changes

openapi-parser is a skill published in the GitHub repository pactflow/pactflow-agent-skills (7 stars, last pushed yesterday), licensed MIT. It adds 145 tokens to every session and 1,419 once invoked, about $0.0006 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-08-31.

Related

Other skills, from other repositories