generate-ts-models
Installation
SKILL.md
Generate TypeScript Models
Converts OpenAPI/Swagger schemas into TypeScript declarations (interfaces, enums, and index barrel file).
Overview
Generates TypeScript interfaces and enums from OpenAPI/Swagger specifications with automatic barrel file organization. Supports both OpenAPI 3.x (components/schemas) and Swagger 2.0 (definitions).
Core principle: Parse schemas → Apply type mappings → Generate one file per schema → Create barrel file
When to Use
Use this skill when:
- You have an OpenAPI or Swagger specification file
- Need TypeScript type safety for API models
- Want automatic barrel file (index.ts) generation
- Generating initial types or regenerating from updated specs
- Need custom type mappings or enum protection