mcpField
Q
quicktype

quicktype

github.com/htlin222Development7835 installsUpdated 3w ago
Repository

About quicktype

A skill that generates strongly typed definitions from JSON files or URLs, with TypeScript as the default target. It is for developers who need types for API responses or configuration data, and supports several output languages.

Key features

  1. 01Generate types from JSON files or URLs
  2. 02TypeScript as the default language
  3. 03Support Go, Python, Rust, Swift, and Kotlin
  4. 04Optionally save output to a file

Use cases

  1. 01Create TypeScript interfaces from API responses
  2. 02Generate types for configuration files
  3. 03Convert JSON data into Go or Python definitions

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/htlin222/dotfiles --skill quicktype

After installing, type/quicktypein Claude Code to confirm it loaded.

Bundled filesscripts/quicktype.py

Details

From the project README

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

  1. Parse the input to identify:

    • File path or URL
    • Target language (default: TypeScript)
    • Output file (optional)
  2. Run the quicktype script:

python3 ~/.claude/skills/quicktype/scripts/quicktype.py <file> [--lang LANG] [--out FILE]
  1. Display the generated types in a fenced code block

  2. If --out specified, save to that file

Supported Languages

FlagLanguage
tsTypeScript
goGo structs
pyPython dataclass
rsRust structs
swiftSwift Codable
kotlinKotlin 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

Comments

Markdown supported