Convert OpenAPI 3.0 specifications to TypeScript interfaces and type guards.
Works with
Accepts OpenAPI files in JSON or YAML format and validates against OpenAPI 3.0.x specification
Generates TypeScript interfaces from components/schemas , request/response types from paths , and runtime type guards for validation
Handles complex types including objects, arrays, enums, unions (oneOf), and inheritance (allOf) with proper required/optional field mapping
Includes automatic JSDoc comments from O
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionopenapi-to-typescriptExecute the skills CLI command in your project's root directory to begin installation:
Fetches openapi-to-typescript from softaworks/agent-toolkit and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate openapi-to-typescript. Access via /openapi-to-typescript in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
1.4K
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
1.4K
stars
Converts OpenAPI 3.0 specifications to TypeScript interfaces and type guards.
Input: OpenAPI file (JSON or YAML) Output: TypeScript file with interfaces and type guards
components/schemaspaths (request/response types)types/api.ts in current directory)Check before processing:
- Field "openapi" must exist and start with "3.0"
- Field "paths" must exist
- Field "components.schemas" must exist (if there are types)
If invalid, report the error and stop.
| OpenAPI | TypeScript |
|---|---|
string |
string |
number |
number |
integer |
number |
boolean |
boolean |
null |
null |
| Format | TypeScript |
|---|---|
uuid |
string (comment UUID) |
date |
string (comment date) |
date-time |
string (comment ISO) |
email |
string (comment email) |
uri |
string (comment URI) |
Object:
// OpenAPI: type: object, properties: {id, name}, required: [id]
interface Example {
id: string; // required: no ?
name?: string; // optional: with ?
}
Array:
// OpenAPI: type: array, items: {type: string}
type Names = string[];
Enum:
// OpenAPI: type: string, enum: [active, draft]
type Status = "active" | "draft";
oneOf (Union):
// OpenAPI: oneOf: [{$ref: Cat}, {$ref: Dog}]
type Pet = Cat | Dog;
allOf (Intersection/Extends):
// OpenAPI: allOf: [{$ref: Base}, {type: object, properties: ...}]
interface Extended extends Base {
extraField: string;
}
/**
* Auto-generated from: {source_file}
* Generated at: {timestamp}
*
* DO NOT EDIT MANUALLY - Regenerate from OpenAPI schema
*/
For each schema in components/schemas:
export interface Product {
/** Product unique identifier */
id: string;
/** Product title */
title: string;
/** Product price */
price: number;
/** Created timestamp */
created_at?: string;
}
required[] have no ?required[] have ?For each endpoint in paths:
// GET /products - query params
export interface GetProductsRequest {
page?: number;
limit?: number;
}
// GET /products - response 200
export type GetProductsResponse = ProductList;
// POST /products - request body
export interface CreateProductRequest {
title: string;
price: number;
}
// POST /products - response 201
export type CreateProductResponse = Product;
Naming convention:
{Method}{Path}Request for params/body{Method}{Path}Response for responseFor each main interface, generate a type guard:
export function isProduct(value: unknown): value is Product {
return (
typeof value === 'object' &&
value !== null &&
'id' in value &&
typeof (value as any).id === 'string' &&
'title' in value &&
typeof (value as any).title === 'string' &&
'price' in value &&
typeof (value as any).price === 'number'
);
}
Type guard rules:
typeof value === 'object' && value !== null'field' in valuetypeofArray.isArray().includes()export interface ApiError {
status: number;
error: string;
detail?: string;
}
export function isApiError(value: unknown): value is ApiError {
return (
typeof value === 'object' &&
value !== null &&
'status' in value &&
typeof (value as any).status === 'number' &&
'error' in value &&
typeof (value as any).error === 'string'
);
}
When encountering {"$ref": "#/components/schemas/Product"}:
Product)// OpenAPI: items: {$ref: "#/components/schemas/Product"}
// TypeScript:
items: Product[] // reference, not inline
Input (OpenAPI):
{
"openapi": "3.0.0",
"components": {
"schemas": {
"User": {
"type": "object",
"properties": {
"id": {"type": "string", "format": "uuid"},
"email": {"type": "string", "format": "email"},
"role": {"type": "string", "enum": ["admin", "user"]}
},
"required": ["id", "email", "role"]
}
}
},
"paths": {
"/users/{id}": {
"get": {
"parameters": [{"name": "id", "in": "path", "required": true}],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {"$ref"<Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
softaworks/agent-toolkit
softaworks/agent-toolkit
jwynia/agent-skills
sickn33/antigravity-awesome-skills
dotneet/claude-code-marketplace
mindrally/skills
openapi-to-typescript fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
openapi-to-typescript has been reliable in day-to-day use. Documentation quality is above average for community skills.
openapi-to-typescript fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
Registry listing for openapi-to-typescript matched our evaluation — installs cleanly and behaves as described in the markdown.
Useful defaults in openapi-to-typescript — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
I recommend openapi-to-typescript for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
I recommend openapi-to-typescript for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
Useful defaults in openapi-to-typescript — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
Solid pick for teams standardizing on skills: openapi-to-typescript is focused, and the summary matches what you get after install.
Solid pick for teams standardizing on skills: openapi-to-typescript is focused, and the summary matches what you get after install.
showing 1-10 of 75