Generating Typescript Types From Apis
Automatically creates TypeScript type definitions from REST API specifications (OpenAPI/Swagger), saving development time.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add generating-typescript-types-from-apis npx -- -y @trustedskills/generating-typescript-types-from-apis
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"generating-typescript-types-from-apis": {
"command": "npx",
"args": [
"-y",
"@trustedskills/generating-typescript-types-from-apis"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill automatically generates TypeScript types from API specifications. It analyzes an OpenAPI or Swagger definition and produces corresponding .ts files containing interfaces representing the API's endpoints, request bodies, and response schemas. This significantly reduces manual type creation and improves code maintainability when working with APIs.
When to use it
- When integrating a new backend API into a TypeScript project.
- To automate the generation of types for existing APIs, reducing repetitive work.
- For teams wanting to enforce strong typing across their codebase when interacting with external services.
- During API development and refactoring to keep type definitions synchronized with API changes.
Key capabilities
- Supports OpenAPI/Swagger specifications.
- Generates TypeScript interfaces for endpoints.
- Creates types for request bodies and response schemas.
- Automated code generation from API definition files.
Example prompts
- "Generate TypeScript types from this OpenAPI spec: [paste OpenAPI specification here]"
- "Create a
user.tsfile with types based on the following Swagger definition." - "Can you generate interfaces for all endpoints defined in this API?"
Tips & gotchas
- Ensure your OpenAPI/Swagger specification is valid and complete for accurate type generation.
- The generated types may require minor adjustments depending on specific project needs or coding style preferences.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.