# oas-generator

> Claude/Codex skill by [@pactflow](https://omgskills.com/library/pactflow/index.md) · 7 stars · Updated 2026-10-22

Generates an OpenAPI 3.x YAML spec from a provider codebase using ripwire when no spec exists. Invoke this skill whenever the user needs an OpenAPI spec for a service that doesn't have one published — phrases like "generate an openapi spec from the code", "there's no oas for this service", "create a spec from the codebase", "the provider doesn't have a spec", or any time a pact-coverage or contract testing workflow is blocked because the provider spec is missing. Uses ripwire to extract HTTP route definitions and handler schemas across Ruby (Rails/Sinatra), Node.js (Express/Fastify), Python (Flask/FastAPI), and other ripwire-supported languages. Always ask for the codebase path if not provided. Requires ripwire on PATH.

Tags: agent-skills, agents, claude-code-plugin, codex-plugin, contract-testing, copilot-cli-plugin, drift, pact, pactflow, skills, swagger-contract-testing

## Install

```sh
git clone https://github.com/pactflow/pactflow-agent-skills /tmp/pactflow-agent-skills && ln -s /tmp/pactflow-agent-skills/plugins/swagger-contract-testing/skills/oas-generator ~/.claude/skills/oas-generator
```

## From README

OAS Generator Generates an OpenAPI 3.x YAML spec by statically analysing a provider codebase with ripwire. The spec may be incomplete (stubs for unresolvable schemas), but it will always be valid OAS and immediately usable for path-coverage testing. Prerequisites: ripwire on PATH. If absent, check pact-coverage/references/ -ripwire.md. --- Step 1 — Identify the framework Run ripwire to get oriented, then infer the framework from the ranked output and config files: Also check for framework config files in the project root: Gemfile with sinatra or rails → Ruby package.json with express, fastify, koa, or hapi → Node.js pyproject.toml / requirements.txt with flask or fastapi → Python If the framework is still ambiguous after these checks, ask the user. --- Step 2 — Extract all routes Use framework-specific patterns to find every route registration. Run all applicable patterns and deduplicate results.

## Links

- HTML page: https://omgskills.com/library/pactflow/pactflow-agent-skills/plugins/swagger-contract-testing/skills/oas-generator/
- GitHub: https://github.com/pactflow/pactflow-agent-skills
- Author: [@pactflow](https://omgskills.com/library/pactflow/index.md)

## More from this repo

- [drift-testing](https://omgskills.com/library/pactflow/pactflow-agent-skills/plugins/swagger-contract-testing/skills/drift-testing/index.md) — Verifies API implementations against OpenAPI specifications using the Drift CLI, catching spec drift and supporting...
   - [@pactflow](https://omgskills.com/library/pactflow/index.md) · 7 stars
- [openapi-parser](https://omgskills.com/library/pactflow/pactflow-agent-skills/plugins/swagger-contract-testing/skills/openapi-parser/index.md) — Parses complex OpenAPI specs and generates Drift test cases from them.
   - [@pactflow](https://omgskills.com/library/pactflow/index.md) · 7 stars
- [pact-coverage](https://omgskills.com/library/pactflow/pactflow-agent-skills/plugins/swagger-contract-testing/skills/pact-coverage/index.md) — Runs a coverage check to find which API operations, status codes, request body required fields, and response body...
   - [@pactflow](https://omgskills.com/library/pactflow/index.md) · 7 stars
