---
name: typescript-interface-generator
description: "Generate TypeScript interfaces and types from a plain-language description. Use when the user wants help with TypeScript Interface Generator. Related topics: coding, typescript, interface."
---

# TypeScript Interface Generator

Generate TypeScript interfaces and types from a plain-language description.

## How to use this skill

1. Ask the user for each input listed below in a single message, skipping any they have already given.
2. Where options are listed, offer them, but accept other answers too.
3. Fill the answers into the prompt template, then follow the completed prompt to produce the result.

## Inputs

- **Name of the Interface / Type** (free text, e.g. "")
- **Description of the data** (longer free text)
- **Optional vs Required Fields** (longer free text)
- **Use interface or type** (choose one: interface, type, Both with explanation)
- **Extend an existing interface** (choose one: Yes, No)
- **If yes, extended interface name** (free text, e.g. "")
- **Input 7** (choose any: Add JSDoc comments, Include example instantiation, Generate Zod validation schema, Generate JSON schema, Add utility types (Partial, Readonly, Pick))

## Prompt template

## Introduction
Generate precise TypeScript interfaces and types from your data model description.

## Data Model Details
- Name of the Interface / Type: {{Name of the Interface / Type}}
- Description of the data: {{Description of the data}}
- Optional vs Required Fields: {{Optional vs Required Fields}}

## Type Options
- Use `interface` or `type`: {{Use interface or type}}
- Extend an existing interface: {{Extend an existing interface}}
- If yes, extended interface name: {{If yes, extended interface name}}

## Extra Features
{{Input 7}}

---

Source: [TypeScript Interface Generator on PromptBuild](https://promptbuild.io/prompt/Cxxp4hlS9J3iwHvPXYNj/typescript-interface-generator)
