types-generate

Generate TypeScript types from JSON schemas, OpenAPI, GraphQL, and database definitions.

1|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/manastalukdar/claude-devstudio --skill types-generate
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: types-generate
Source: https://github.com/manastalukdar/claude-devstudio/tree/main/skills/types-generate
Command: npx skills add https://github.com/manastalukdar/claude-devstudio --skill types-generate

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openapi-typescript, @graphql-codegen/cli, json-schema-to-typescript, quicktype, zod, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the creation of TypeScript types from various data sources, ensuring type safety and reducing manual effort in your development workflow.

Core Features & Use Cases

  • Multi-Source Generation: Supports OpenAPI specs, JSON schemas, GraphQL schemas, and database schemas (Prisma, Drizzle).
  • Runtime Validation: Integrates with tools like Zod to generate runtime type guards.
  • Use Case: You have an OpenAPI specification for your API. Use this Skill to automatically generate all the necessary TypeScript interfaces and types for your frontend or backend code, ensuring consistency between your API contract and your codebase.

Quick Start

Use the types-generate skill to create TypeScript types from the 'openapi.yaml' file.

Frequently Asked Questions about types-generate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate TypeScript types from an OpenAPI specification?

Generating TypeScript types from an OpenAPI specification involves parsing the schema file to automatically produce matching interfaces. This ensures your frontend or backend codebase remains strictly typed and consistent with your API contract.

Can I create TypeScript interfaces from a GraphQL schema?

Yes, you can create TypeScript interfaces from a GraphQL schema using specialized code generators like graphql-codegen. This translates your GraphQL type definitions directly into strictly typed TypeScript code.

What is the best way to add runtime validation to generated TypeScript types?

The best way to add runtime validation to generated TypeScript types is by integrating tools like Zod during the generation process. This creates runtime type guards that validate data structures dynamically alongside static typing.

Does types-generate support converting JSON schemas to TypeScript?

Yes, converting JSON schemas to TypeScript is fully supported by leveraging libraries like json-schema-to-typescript. This automates the creation of static type definitions directly from your standard JSON schema files.

How do you handle incremental generation for multiple TypeScript schema sources?

Incremental generation for multiple TypeScript schema sources is handled using optimized strategies and automated detection via Bash and Glob patterns. This efficiently processes updates across diverse data sources without regenerating the entire codebase.