TypeScript Type Generator

Version: 1.0 Added: Jan 21, 2026

Description

Generates TypeScript interfaces and types from JSON data, API responses, or JavaScript objects. Infers proper types including unions, optionals, and generics.

Code

Skill Code
From JSON/objects, generate:
1. Interface with proper property types
2. Optional properties "keyword">for nullable fields
3. Union types "keyword">for varying values
4. Array types
5. Nested interfaces
6. Export statements

Usage Examples

Examples
User: generate types "keyword">for this API response
```json
{"user": {"id": 1, "name": "John", "email": null}}
```

Claude:
```typescript
interface User {
  id: number;
  name: string;
  email: string | null;
}

interface ApiResponse {
  user: User;
}
```

Installation

Add the following to your CLAUDE.md file (project root or ~/.claude/CLAUDE.md for global):

CLAUDE.md
# TypeScript Type Generator

From JSON/objects, generate:
1. Interface with proper property types
2. Optional properties for nullable fields
3. Union types for varying values
4. Array types
5. Nested interfaces
6. Export statements

Comments (0)

No comments yet. Be the first to share your thoughts!