rc-openapi

Generates or updates an OpenAPI specification by discovering HTTP endpoints and schemas from source code.

19|1|Updated Jun 27, 2026
One-click install
npx skills add https://github.com/rodolfochicone/rc-project --skill rc-openapi-rodolfochicone
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rc-openapi
Source: https://github.com/rodolfochicone/rc-project/tree/main/skills/misc/rc-openapi
Command: npx skills add https://github.com/rodolfochicone/rc-project --skill rc-openapi-rodolfochicone

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Keeping an OpenAPI specification in sync with a live codebase is tedious and error-prone; specs drift out of date as endpoints, request contracts, and response models change. This Skill reads the actual source code and produces a spec that mirrors what the API really does. ## Core Features & Use Cases - Endpoint Discovery: Detects routing in frameworks like Express, Gin, Spring, and FastAPI, plus infrastructure manifests such as serverless.yml HTTP events, and enumerates every endpoint with method, path, and handler. - Contract Extraction: Reads validation layers (Zod, Pydantic, Go structs, class-validator) to extract path params, query params, body fields, constraints, and response models with correct status codes. - Version-Correct Output: Generates OpenAPI 3.1.0 by default (or 3.0.3 when tooling requires it), with DRY $ref-based schemas, realistic examples, and reconciliation that preserves manual additions when updating an existing spec. - Use Case: After refactoring a REST API, run this Skill to regenerate openapi.yaml so the documented endpoints, request bodies, and error responses match the current handlers exactly. ## Quick Start Generate an OpenAPI 3.1 specification for this repository by scanning its HTTP routes and validation schemas, and write it to .techdocs/docs/openapi.yaml.

Frequently Asked Questions about rc-openapi

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

FAQPage Schema
How do I generate an OpenAPI spec from existing source code?▼

Run this Skill against the repository; it detects the routing mechanism (Express, Gin, Spring, FastAPI, or serverless.yml HTTP events), enumerates every endpoint, and writes a complete OpenAPI document to .techdocs/docs/openapi.yaml by default.

How to keep an openapi.yaml in sync after API changes?▼

Invoke the Skill in update mode: it locates the existing spec, adds new endpoints and schemas, removes ones no longer in source, updates changed parameters and responses, and preserves non-conflicting manual additions like extra descriptions.

Does it support OpenAPI 3.0 versus 3.1?▼

Yes. It defaults to OpenAPI 3.1.0 for new specs and uses 3.0.3 only when project tooling pins it. It never mixes versions, using union types for nullability in 3.1 and nullable: true in 3.0.

Which frameworks and validation libraries are detected?▼

Routing is detected in frameworks like Express, Gin, Spring, and FastAPI, plus infrastructure manifests such as serverless.yml HTTP events. Request contracts are read from validation layers including Zod, Pydantic, Go structs, and class-validator.

What happens if no HTTP endpoints are found in the project?▼

The Skill reports which routing mechanisms it inspected and asks you to point at the route definitions rather than fabricating endpoints. It also marks gaps when a request or response schema cannot be determined.

When should I not use this OpenAPI generator?▼

Do not use it for Postman collections, README documentation, or editing source code — it only writes the spec file and never modifies source. Those cases belong to dedicated Postman or README skills.