본문으로 건너뛰기
TakoAPI
스킬로 돌아가기

neo-api-to-ts-interface

martinforsulu 제작

Web & Frontend Development
—아직 평가 없음
내 평가

요약

Automatically generates TypeScript interfaces from REST API responses with Storybook-style documentation UI.

설명

이 스킬이 하는 일

Generates TypeScript interfaces from REST API responses by parsing JSON or XML payloads and inferring type structures. Produces formatted, compilable TypeScript code alongside Storybook-style documentation for exploring and sharing types. Supports CLI, programmatic, and agent workflow usage.

Removes the manual round-trip between fetching an API response and writing matching TypeScript, eliminating drift between actual response shapes and declared types.

사용 시점

  • Converting a third-party API response into typed interfaces before writing client code
  • Batch-processing multiple endpoints to keep a shared types file in sync
  • Generating interactive type documentation for an internal API
  • Validating that existing TypeScript interfaces match current API response shapes
  • Automating interface generation in a CI pipeline after API schema changes

예시 워크플로

입력

User asks: Generate TypeScript interfaces from this API response: {"id":1,"user":{"name":"Alice","roles":["admin"]},"active":true}

에이전트
  1. 1

    Parse the JSON payload and recursively traverse its structure

  2. 2

    Infer types for each field: primitives, nested objects, arrays, and unions

  3. 3

    Generate a formatted TypeScript interface file with readonly modifiers and proper union types

  4. 4

    Validate the output against the TypeScript compiler API

  5. 5

    Render a Storybook CSF documentation file with collapsible type explorer

출력

A compilable types.ts file with inferred interfaces and an accompanying Storybook HTML doc showing the type hierarchy with example values

설치

clawhub install martinforsulu/neo-api-to-ts-interface

CLI 명령을 실행하거나, 프롬프트를 Claude Code, Cursor, Codex 등 사용하는 코딩 에이전트에 붙여넣으세요.

링크