quicktype
Quicktype - JSON to Type Generator
Generate strongly-typed interfaces from JSON files or URLs.
When to Use
- User asks to generate types from JSON
- User wants TypeScript interfaces for API responses
- User needs type definitions for config files
- User mentions "quicktype" or "json to types"
Instructions
-
Parse the input to identify:
- File path or URL
- Target language (default: TypeScript)
- Output file (optional)
-
Run the quicktype script:
python3 ~/.claude/skills/quicktype/scripts/quicktype.py <file> [--lang LANG] [--out FILE]
-
Display the generated types in a fenced code block
-
If
--outspecified, save to that file
Supported Languages
| Flag | Language |
|---|---|
ts |
TypeScript |
go |
Go structs |
py |
Python dataclass |
rs |
Rust structs |
swift |
Swift Codable |
kotlin |
Kotlin data class |
Examples
Input: /quicktype api/users.json
Output: TypeScript interfaces for the JSON structure
Input: /quicktype config.json --lang go
Output: Go struct definitions
Input: /quicktype response.json --out src/types/api.ts
Output: Types saved to specified file
More from htlin222/dotfiles
cpp
Write modern C++ with RAII, smart pointers, and STL. Use for C++ development, memory safety, or performance optimization.
130refactor
Refactor code for quality and maintainability. Use for cleanup and tech debt reduction.
74data-science
Data analysis, SQL queries, BigQuery operations, and data insights. Use for data analysis tasks and queries.
52c-lang
Write efficient C code with proper memory management and system calls. Use for C optimization, memory issues, or system programming.
46quarto-book
Generate Quarto Book project structure with chapters, configuration, and output settings. Use when user wants to create a book, multi-chapter document, technical manual, or asks about Quarto book setup.
45scientific-figure-assembly
Assemble multi-panel scientific figures with panel labels (A, B, C) at publication quality (300 DPI) using R. Use when combining individual plots into journal-ready figures.
43