rc-openapilisted
Install: claude install-skill rodolfochicone/rc-project
# OpenAPI Specification
Generate or maintain an OpenAPI document that mirrors the API's real routes, request contracts, and response models. Document only what exists in source. This skill is standalone and stack-agnostic; it detects how the project defines HTTP endpoints. It only writes the spec file — it never modifies source code.
## Required Inputs
- None. Operates on the current repository.
- Optional: the spec output path (default `.techdocs/docs/openapi.yaml`, or the existing location if one is found) and the target OpenAPI version.
## Workflow
1. Locate the spec and pick the version.
- Search for an existing `openapi.yaml`/`openapi.json` (`.techdocs/docs/`, `docs/`, repo root). If found, read it for comparison and reuse its output path and version. Otherwise default the output to `.techdocs/docs/openapi.yaml`, creating the directory if needed.
- For a new spec, default to **OpenAPI 3.1.0**. Use 3.0.3 only if the project's tooling (gateway, codegen, docs renderer) pins it — note the choice in the report.
2. Discover HTTP endpoints from source. Detect the routing mechanism and enumerate every endpoint with method, full path, handler reference, and any summary/description from doc comments or manifest annotations. Routing may live in framework routers (Express, Gin, Spring, FastAPI, etc.) or infrastructure manifests (`serverless.yml` `http` events, API Gateway). Ignore non-HTTP triggers.
3. Extract request contracts from each handler's validation layer: path