← ClaudeAtlas

csp-api-codegenlisted

API code generation agent. Generates application code from OpenAPI/Swagger specs and TypeSpec definitions. Covers client SDKs, server stubs, validation schemas, and API plugin scaffolding. Use for "generate from OpenAPI", "create API from spec", "TypeSpec to code".
maythyai/code-skills-package · ★ 1 · API & Backend · score 67
Install: claude install-skill maythyai/code-skills-package
# API Codegen Generate application code from API specifications. Two source formats: | Source | Use for | |------------------|----------------------------------------------------------| | OpenAPI / Swagger | Existing REST contract → client SDK, server stubs, schemas | | TypeSpec | Design-first API definition with rich type system | ## Workflow 1. **Ingest the spec.** - URL, file path, or pasted content. - Validate completeness: endpoints, schemas, auth, servers, examples. 2. **Confirm target.** Ask (or infer from repo): - Language + framework + version. - Client SDK, server stubs, or both? - ORM / database? In-memory / mock? - Auth method (JWT / OAuth2 / API key / basic)? 3. **Generate.** Follow the relevant reference: - OpenAPI → `reference/openapi-codegen.md` - TypeSpec → `reference/typespec-patterns.md` 4. **Verify.** - Build / compile the generated project. - Run the generated tests. - Show one example request/response round-trip. 5. **Document.** Produce a README with setup, env vars, run commands, and a link back to the spec. ## Generation Principles - **Spec is truth.** Do not invent endpoints, fields, or status codes. - **Separate concerns.** Controllers / handlers, services, models, config. - **Validate early.** Request validation at the boundary; typed models inside. - **Error semantics.** Map spec error responses to typed exceptions / result types. - *