api-codegen-universal

Generate TypeScript API clients and servers from OpenAPI and Apifox definitions.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/XSIJIE975/agents-skills --skill api-codegen-universal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-codegen-universal
Source: https://github.com/XSIJIE975/agents-skills/tree/main/skills/api-codegen-universal
Command: npx skills add https://github.com/XSIJIE975/agents-skills --skill api-codegen-universal

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

The tool automates the generation of API client and server code from OpenAPI and Apifox specifications, reducing boilerplate and keeping your code in sync with API definitions.

Core Features & Use Cases

  • OpenAPI and Apifox adapters for automated code generation.
  • Centralized TypeScript interfaces and reusable patterns across adapters.
  • Use Case: Generate a TypeScript API client in a mono-repo and update it as the API evolves.

Quick Start

Install dependencies with pnpm install, then run the codegen against your OpenAPI or Apifox definitions using the api-codegen-universal workflow. For example: pnpm install; pnpm build (in a monorepo) to generate code.

Frequently Asked Questions about api-codegen-universal

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate TypeScript API clients from OpenAPI definitions in a monorepo?

To generate TypeScript API clients from OpenAPI definitions in a monorepo, install the api-codegen-universal package via pnpm and run the codegen workflow to automatically produce consistent adapters and interfaces.

Can I use Apifox definitions to automate TypeScript code generation?

Yes, you can use Apifox definitions to automate TypeScript code generation. The tool provides specific Apifox adapters that translate your API definitions into centralized TypeScript interfaces and reusable client patterns.

What is the best way to keep TypeScript API interfaces in sync with evolving OpenAPI specifications?

The best way to keep TypeScript interfaces in sync with evolving OpenAPI specifications is to run automated codegen during development, testing, and release cycles, which updates the boilerplate code directly from the API definitions.

Do I need pnpm and Node.js to run the OpenAPI codegen workflow?

Yes, you need pnpm and Node.js to run the OpenAPI codegen workflow. These prerequisites are required to install the api-codegen-universal package dependencies and execute the code generation and build commands in your project.

Why use a universal codegen adapter for both OpenAPI and Apifox in a monorepo?

Using a universal codegen adapter for both OpenAPI and Apifox in a monorepo ensures consistent TypeScript interfaces and reusable patterns across different API definitions, reducing boilerplate and keeping client code synchronized across adapters.