openapi-to-typescript
Skill2.5k starsChanged 10 months agoMITView on GitHub
Converts OpenAPI 3.0 JSON/YAML to TypeScript interfaces and type guards. This skill should be used when the user asks to generate types from OpenAPI, convert schema to TS, create API interfaces, or generate TypeScript types from an API specification.
1 other project uses a version of this.
Trending
More talk lately.about the whole repository
Most recently taken up by
- nbirkner/digital-brainword for word, first seen Apr 12, 2026
Who's talking about softaworks/agent-toolkit
- sudosubin/agents.nix“codex-plugins.github.softaworks.agent-toolkit: init at 0-unstable-2026-03-05”GitHub · Oct 4, 2026
- sudosubin/agents.nix“claude-code-plugins.github.softaworks.agent-toolkit: init at 0-unstable-2026-03-05”GitHub · Oct 4, 2026
- sudosubin/agents.nix“claude-code-marketplaces.github.softaworks.agent-toolkit: init at 0-unstable-2026-03-05”GitHub · Oct 4, 2026
- sudosubin/agents.nix“agent-skills.github.softaworks.agent-toolkit: init at 0-unstable-2026-02-08”GitHub · Oct 2, 2026
- eranroseman/agent-plugins“Curate skills from https://github.com/softaworks/agent-toolkit”GitHub · Sep 12, 2026
The biggest 5 of 40 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 40
Talked about on GitHub (40 times).
On GitHub · 40
- Oct 4, 2026codex-plugins.github.softaworks.agent-toolkit: init at 0-unstable-2026-03-05 — sudosubin/agents.nix0 reactions
- Oct 4, 2026claude-code-plugins.github.softaworks.agent-toolkit: init at 0-unstable-2026-03-05 — sudosubin/agents.nix0 reactions
- Oct 4, 2026claude-code-marketplaces.github.softaworks.agent-toolkit: init at 0-unstable-2026-03-05 — sudosubin/agents.nix0 reactions
- Oct 2, 2026agent-skills.github.softaworks.agent-toolkit: init at 0-unstable-2026-02-08 — sudosubin/agents.nix0 reactions
- Sep 12, 2026Curate skills from https://github.com/softaworks/agent-toolkit — eranroseman/agent-plugins0 reactions · 2 comments
35 more on GitHub
- Apr 25, 2026Audit candidate: softaworks/agent-toolkit — xiaolai/nlpm0 reactions · 3 comments
- Mar 31, 2026Remove unecessary useEffects from frontend — superplanehq/superplane0 reactions · 2 comments
- Mar 9, 2026[SUBMISSION] softaworks/agent-toolkit — ProSkillsMD/proskills0 reactions · 1 comment
- Feb 2, 2026New skill: /softaworks-react-dev (medium risk) — aiskillstore/marketplace0 reactions
- Feb 2, 2026New skill: /softaworks-react-useeffect (medium risk) — aiskillstore/marketplace0 reactions
- Feb 2, 2026New skill: /softaworks-game-changing-features (medium risk) — aiskillstore/marketplace0 reactions
- Feb 2, 2026New skill: /softaworks-naming-analyzer (medium risk) — aiskillstore/marketplace0 reactions
- Feb 2, 2026New skill: /softaworks-openapi-to-typescript (medium risk) — aiskillstore/marketplace0 reactions
- Feb 2, 2026New skill: /softaworks-database-schema-designer (medium risk) — aiskillstore/marketplace0 reactions
- Jan 28, 2026New skill: /softaworks-c4-architecture (safe risk) — aiskillstore/marketplace0 reactions
- Jan 28, 2026New skill: /softaworks-professional-communication (safe risk) — aiskillstore/marketplace0 reactions
- Jan 28, 2026New skill: /softaworks-plugin-forge (safe risk) — aiskillstore/marketplace0 reactions
- Jan 28, 2026New skill: /softaworks-feedback-mastery (safe risk) — aiskillstore/marketplace0 reactions
- Jan 28, 2026New skill: /softaworks-difficult-workplace-conversations (safe risk) — aiskillstore/marketplace0 reactions
- Jan 28, 2026New skill: /softaworks-humanizer (safe risk) — aiskillstore/marketplace0 reactions
- Jan 27, 2026Integrate humanizer guidelines for documentation quality — shelbeely/ADHD-Closet0 reactions
- Jan 26, 2026New skill: /softaworks-command-creator (safe risk) — aiskillstore/marketplace0 reactions
- Jan 26, 2026New skill: /softaworks-marp-slide (low risk) — aiskillstore/marketplace0 reactions
- Jan 26, 2026New skill: /softaworks-skill-judge (safe risk) — aiskillstore/marketplace0 reactions
- Jan 26, 2026New skill: /softaworks-writing-clearly-and-concisely (safe risk) — aiskillstore/marketplace0 reactions
- Jan 26, 2026New skill: /softaworks-crafting-effective-readmes (safe risk) — aiskillstore/marketplace0 reactions
- Jan 26, 2026New skill: /softaworks-gepetto (safe risk) — aiskillstore/marketplace0 reactions
- Jan 26, 2026New skill: /softaworks-mermaid-diagrams (safe risk) — aiskillstore/marketplace0 reactions
- Jan 26, 2026New skill: /softaworks-reducing-entropy (safe risk) — aiskillstore/marketplace0 reactions
- Jan 26, 2026New skill: /softaworks-ship-learn-next (safe risk) — aiskillstore/marketplace0 reactions
- Jan 24, 2026New skill: /softaworks-codex (safe risk) — aiskillstore/marketplace0 reactions
- Jan 24, 2026New skill: /softaworks-daily-meeting-update (safe risk) — aiskillstore/marketplace0 reactions
- Jan 24, 2026New skill: /softaworks-domain-name-brainstormer (safe risk) — aiskillstore/marketplace0 reactions
- Jan 24, 2026New skill: /softaworks-commit-work (safe risk) — aiskillstore/marketplace0 reactions
- Jan 24, 2026New skill: /softaworks-agent-md-refactor (safe risk) — aiskillstore/marketplace0 reactions
- Jan 24, 2026New skill: /softaworks-session-handoff (low risk) — aiskillstore/marketplace0 reactions
- Jan 24, 2026New skill: /softaworks-dependency-updater (low risk) — aiskillstore/marketplace0 reactions
- Jan 24, 2026New skill: /softaworks-qa-test-planner (low risk) — aiskillstore/marketplace0 reactions
- Jan 24, 2026New skill: /softaworks-meme-factory (low risk) — aiskillstore/marketplace0 reactions
- Jan 24, 2026New skill: /softaworks-gemini (low risk) — aiskillstore/marketplace0 reactions
Other versions1 project uses a version of this.
Word for word · 1
- nbirkner/digital-brain★ 0100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository44 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-md-refactorSkill
- backend-to-frontend-handoff-docsSkill
- c4-architectureSkill
- codexSkill
- command-creatorSkill
- commit-workSkill
- crafting-effective-readmesSkill
- daily-meeting-updateSkill
- database-schema-designerSkill
- datadog-cliSkill
- dependency-updaterSkill
- design-system-starterSkill
- difficult-workplace-conversationsSkill
- domain-name-brainstormerSkill
- draw-ioSkill
- excalidrawSkill
- feedback-masterySkill
- frontend-to-backend-requirementsSkill
- game-changing-featuresSkill
- geminiSkill
- gepettoSkill
- humanizerSkill
- jiraSkill
- lesson-learnedSkill
- marp-slideSkill
- meme-factorySkill
- mermaid-diagramsSkill
- muiSkill
- naming-analyzerSkill
- perplexitySkill
- plugin-forgeSkill
- professional-communicationSkill
- qa-test-plannerSkill
- react-devSkill
- react-useeffectSkill
- reducing-entropySkill
- requirements-claritySkill
- session-handoffSkill
- ship-learn-nextSkill
- skill-judgeSkill
- web-to-markdownSkill
- writing-clearly-and-conciselySkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
Read and validate the file (must be OpenAPI 3.0.x)
- Very specific: line 27
Ask where to save (default: types/api.ts in current directory)
- Distinctive: line 40
If invalid, report the error and stop.
- Distinctive: line 134
Use OpenAPI description as JSDoc
- Distinctive: line 217
Use the type directly (don't resolve inline)
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
OpenAPI to TypeScript
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
When to Use
- "generate types from openapi"
- "convert openapi to typescript"
- "create API interfaces"
- "generate types from spec"
Workflow
- Request the OpenAPI file path (if not provided)
- Read and validate the file (must be OpenAPI 3.0.x)
- Extract schemas from
components/schemas - Extract endpoints from
paths(request/response types) - Generate TypeScript (interfaces + type guards)
- Ask where to save (default:
types/api.tsin current directory) - Write the file
OpenAPI Validation
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.
Type Mapping
Primitives
| OpenAPI | TypeScript |
string | string |
number | number |
integer | number |
boolean | boolean |
null | null |
Format Modifiers
| Format | TypeScript |
uuid | string (comment UUID) |
date | string (comment date) |
date-time | string (comment ISO) |
email | string (comment email) |
uri | string (comment URI) |
Complex Types
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;
}Code Generation
File Header
/**
* Auto-generated from: {source_file}
* Generated at: {timestamp}
*
* DO NOT EDIT MANUALLY - Regenerate from OpenAPI schema
*/Interfaces (from components/schemas)
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;
}- Use OpenAPI description as JSDoc
- Fields in
required[]have no? - Fields outside
required[]have?
Request/Response Types (from paths)
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}Requestfor params/body{Method}{Path}Responsefor response
Type Guards
For 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:
- Check
typeof value === 'object' && value !== null - For each required field: check
'field' in value - For primitive fields: check
typeof - For arrays: check
Array.isArray() - For enums: check
.includes()
Error Type (always include)
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'
);
}$ref Resolution
When encountering {"$ref": "#/components/schemas/Product"}:
- Extract the schema name (
Product) - Use the type directly (don't resolve inline)
// OpenAPI: items: {$ref: "#/components/schemas/Product"}
// TypeScript:
items: Product[] // reference, not inlineComplete Example
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": "#/components/schemas/User"}
}
}
}
}
}
}
}
}Output (TypeScript):
/**
* Auto-generated from: api.openapi.json
* Generated at: 2025-01-15T10:30:00Z
*
* DO NOT EDIT MANUALLY - Regenerate from OpenAPI schema
*/
// ============================================================================
// Types
// ============================================================================
export type UserRole = "admin" | "user";
export interface User {
/** UUID */
id: string;
/** Email */
email: string;
role: UserRole;
}
// ============================================================================
// Request/Response Types
// ============================================================================
export interface GetUserByIdRequest {
id: string;
}
export type GetUserByIdResponse = User;
// ============================================================================
// Type Guards
// ============================================================================
export function isUser(value: unknown): value is User {
return (
typeof value === 'object' &&
value !== null &&
'id' in value &&
typeof (value as any).id === 'string' &&
'email' in value &&
typeof (value as any).email === 'string' &&
'role' in value &&
['admin', 'user'].includes((value as any).role)
);
}
// ============================================================================
// Error Types
// ============================================================================
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'
);
}Common Errors
| Error | Action |
| OpenAPI version != 3.0.x | Report that only 3.0 is supported |
| $ref not found | List missing refs |
| Unknown type | Use unknown and warn |
| Circular reference | Use type alias with lazy reference |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

