hatch3r-api-spec

Generate and validate OpenAPI 3.1 specifications from codebases with oasdiff CI gates.

26|4|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/hatch3r/hatch3r --skill hatch3r-api-spec
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hatch3r-api-spec
Source: https://github.com/hatch3r/hatch3r/tree/main/skills/hatch3r-api-spec
Command: npx skills add https://github.com/hatch3r/hatch3r --skill hatch3r-api-spec

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It reduces the risk of outdated or incorrect API documentation by turning your codebase into a validated OpenAPI specification with breaking-change protection.

Core Features & Use Cases

  • Inventory-first endpoint mapping: Extracts methods, paths, params, request/response shapes, status codes, and auth requirements directly from the codebase.
  • OpenAPI generation with reusable components: Produces OpenAPI 3.1 specs with grouped tags, shared schemas, and matching security schemes.
  • Validation and documentation output: Ensures schema constraints align with real serialized output and generates human-readable documentation with examples.
  • Release safety via oasdiff: Wires an oasdiff breaking-change CI gate to prevent breaking changes to stable endpoints.

Quick Start

Ask the AI to scan your repository endpoints and generate an OpenAPI 3.1 spec (openapi.yaml), including schema validation and an oasdiff breaking-change CI gate wired to your stable endpoints policy.

Frequently Asked Questions about hatch3r-api-spec

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate an OpenAPI specification directly from my codebase?

Generating an OpenAPI specification from a codebase involves inventorying endpoints, extracting request/response shapes and auth requirements, and producing an OpenAPI 3.1 document with reusable schemas. This process ensures your API documentation accurately reflects your actual codebase.

Can I prevent breaking API changes in CI using oasdiff?

Yes, you can prevent breaking API changes in CI by wiring an oasdiff breaking-change gate to fail on ERR-level breakages for stable endpoints. This validates schema constraints and ensures controlled evolution across releases.

What is inventory-first endpoint mapping for API documentation?

Inventory-first endpoint mapping extracts methods, paths, parameters, status codes, and auth requirements directly from the codebase to produce accurate API documentation. It ensures your OpenAPI schemas align with real serialized output rather than manual annotations.

How do I validate schema constraints against actual runtime serialization in OpenAPI?

Validating schema constraints against runtime serialization requires verifying that generated OpenAPI schemas match actual output through linter-based validation. This ensures schema correctness and detects ambiguities between documented specifications and runtime behavior.

Do I need existing API annotations to generate an OpenAPI 3.1 spec?

No, you do not need existing API annotations because the generation process inventories endpoints directly from the codebase to extract methods, paths, and request/response shapes. It produces OpenAPI 3.1 documents with grouped tags and matching security schemes automatically.

When should I use a breaking-change CI gate for API specifications?

You should use a breaking-change CI gate when you need consistent API contracts for SDK clients and controlled evolution across releases. It prevents outdated or incorrect API documentation by failing CI on ERR-level breakages to stable endpoints.