Home / pactflow / pactflow-agent-skills · plugins/swagger-contract-testing/skills/oas-generator/SKILL.md · GitHub

oas-generator skillA

oas-generator is agent-read markdown (skill) from pactflow/pactflow-agent-skills: 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 rou.

Indexed from public GitHub and served as immutable, content-addressed versions. Install it pinned to an exact SHA-256 with the mdr CLI, and every file is verified against the hash recorded here before it reaches your agent. The deterministic audit below grades the latest version, and the same file always earns the same grade.

What the file says

# 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/install-ripwire.md`.

---

## Step 1 — Identify the framework

Run ripwire to get oriented, then infer the framework from the ranked output and config files:

```bash
ripwire <provider-root> --for="HTTP route definitions and request handlers"
```

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 grep patterns to find every route registration. Run all applicable
patterns and deduplicate results.

### Ruby — Rails
```bash
ripwire <root> --grep="resources\|get '\|post '\|put '\|patch '\|delete '\|namespace"
```
…

Read the whole file at its exact version.

How to install

Latest version
mdr add pactflow/pactflow-agent-skills/oas-generator@git:20260921.602eee1
Exact content
mdr add pactflow/pactflow-agent-skills/oas-generator@sha256:3735ab8871f303db

Pin to a label to follow the author's releases, or to a sha256 to freeze the exact bytes forever. Either way the resolved hash is written to mdr.lock, and mdr install reproduces it on any machine.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_hvxwrfpljm243nhu.svg)](https://markdownregistry.com/a/art_hvxwrfpljm243nhu)

1 badge views in 30 days

Versions

versioncommittedcommitsizeaudit
git:20260921.602eee1 latest2026-09-21 602eee1 8,117 BA view

Audit of the latest version

A  17 of 17 checks passed. Deterministic, no model, same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (8117 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

pactflow/pactflow-agent-skills · 6 stars · license MIT · pushed 2026-09-21 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_hvxwrfpljm243nhu
GET https://markdownregistry.com/api/v1/resolve?ref=pactflow/pactflow-agent-skills/oas-generator
GET https://markdownregistry.com/api/v1/blob/3735ab8871f303db6b30ec2fef7fd31ecbc549f48fe9cfdbf8349bf638499b9a

Your agent does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

More from pactflow/pactflow-agent-skills

contract-testing-flywheel skill
pactflow/pactflow-agent-skills · plugins/contract-testing-flywheel/skills/contract-testing-flywheel/SKILL.md · Generate a structured onboarding backlog — in Jira, GitHub Issues/Projects, Azure DevOps, or as a manual markdown…
git:20260723.fe9d6ed · audit A · 6 stars
drift-testing skill
pactflow/pactflow-agent-skills · plugins/swagger-contract-testing/skills/drift-testing/SKILL.md · Verifies API implementations against OpenAPI specifications using the Drift CLI, catching spec drift and supporting…
git:20260521.313e4b9 · audit A · 6 stars
openapi-parser skill
pactflow/pactflow-agent-skills · plugins/swagger-contract-testing/skills/openapi-parser/SKILL.md · Parses complex OpenAPI specs and generates Drift test cases from them. Use whenever the user wants to generate, write…
git:20260408.182cfa1 · audit A · 6 stars
pact-coverage skill
pactflow/pactflow-agent-skills · plugins/swagger-contract-testing/skills/pact-coverage/SKILL.md · Runs a coverage check to find which API operations, status codes, request body required fields, and response body…
git:20260921.751f1a6 · audit A · 6 stars
pactflow skill
pactflow/pactflow-agent-skills · plugins/swagger-contract-testing/skills/pactflow/SKILL.md · Expert assistant for PactFlow and Pact contract testing. Use this skill whenever the user mentions PactFlow, Pact…
git:20260410.6107050 · audit A · 6 stars

Every file in pactflow/pactflow-agent-skills

Browse by kind, by grade A, or by owner.