apidocslisted
Install: claude install-skill arbazkhan971/godmode
# APIDocs — Documentation Generation & Interactive Specs
## Activate When
- User invokes `/godmode:apidocs`
- User says "generate API docs", "write OpenAPI spec", "set up Swagger"
- User says "add Redoc", "create API reference", "document my API"
- User says "auto-generate docs from code", "set up interactive docs"
- When `/godmode:api` finishes and documentation needs to be published
- When `/godmode:review` flags missing or outdated API documentation
- When a codebase has API routes but no corresponding spec or docs
## Workflow
### Step 1: Discovery & Approach Selection
Determine the documentation strategy before generating anything:
```
APIDOCS DISCOVERY:
Project: <name and purpose>
Language/Framework: <Node/Express, Python/FastAPI, Java/Spring, Go, NestJS, etc.>
```
If the user hasn't specified, ask: "Do you want to write the spec first and generate code from it
(spec-first), or generate the spec from existing code (code-first)?"
### Step 2: Spec-First — Writing OpenAPI from Scratch
For spec-first (contract-first) development, produce a complete OpenAPI document:
```yaml
# Template: OpenAPI 3.1 Spec-First
openapi: "3.1.0"
info:
```
Rules for spec-first:
- Write the spec BEFORE any implementation. The spec is the contract.
- Every field must have a `description` and an `example`.
- Use `$ref` aggressively — never duplicate schema definitions.
- Group related endpoints under `tags`.
- Provide `examples` for every request body and response.
- Include `servers` for all