Agent skill · Backend & API

generating-typescript-types-from-apis

Generates TypeScript interfaces from API responses or OpenAPI schemas. Use when the user asks about typing API responses, creating interfaces from JSON, parsing Swagger/OpenAPI, or keeping types in sync with backend.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill api-typescript-generator-wesleysmits-agent-skills-2 --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 10 KB
Bundled scripts: none
Path: skills/api/api-typescript-generator-wesleysmits-agent-skills-2/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# API Response → TypeScript Types ## When to use this skill - User asks to type an API response - User has JSON and needs TypeScript interfaces - User mentions OpenAPI or Swagger schemas - User wants to generate types from endpoints - User asks about keeping frontend/backend types in sync ## Workflow - [ ] Identify API source (JSON response, OpenAPI, endpoint) - [ ] Parse response structure - [ ] Generate TypeScript interfaces - [ ] Handle nested objects and arrays - [ ] Add JSDoc comments - [ ] Export types to appropriate location ## Instructions ### Step 1: Identify Source Type | Source | Approach | | --------------- | --------------------- | | JSON response | Parse and infer types | | OpenAPI/Swagger | Use generator tool | | GraphQL | Use codegen | | Live endpoint | Fetch and parse | ### Step 2: Parse JSON Response **Sample API response:** ```json { "id": 123, "name": "John Doe", "email": "john@example.com", "isActive": true, "roles": ["admin", "user"], "profile": { "avatar": "https://example.com/avatar.jpg", "bio": null, "socialLinks": [ { "platform": "twitter", "url": "https://twitter.com/john" } ] }, "createdAt": "2026-01-18T10:00:00Z", "metadata": {} } ``` **Generated TypeSc

What's inside
Steps it walks through
  1. When to use this skill
  2. Workflow
  3. Instructions
  4. Step 1: Identify Source Type
  5. Step 2: Parse JSON Response
  6. Step 3: Type Inference Rules
  7. Step 4: Handle Arrays
  8. Step 5: Handle Optional Fields
  9. Step 6: API Response Wrappers
  10. Step 7: OpenAPI/Swagger Generation
  11. Step 8: Fetch and Generate Script
  12. Step 9: Keep Types in Sync
  13. Output Location
  14. Validation
Ships with 1 file
  • metadata.json
Commands it runs
npm install -D openapi-typescript
From URL
npx openapi-typescript https://api.example.com/openapi.json -o types/api.ts
From local file
npx openapi-typescript ./openapi.yaml -o types/api.ts
Watch mode
npx openapi-typescript ./openapi.yaml -o types/api.ts --watch
npm install openapi-fetch
git add types/api.ts
Validate generated types
More from claude-skill-registry
All skills →
About this skill
What does the generating-typescript-types-from-apis skill do?

Generates TypeScript interfaces from API responses or OpenAPI schemas. Use when the user asks about typing API responses, creating interfaces from JSON, parsing Swagger/OpenAPI, or keeping types in sync with backend.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill api-typescript-generator-wesleysmits-agent-skills-2 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going