api-codegen-runner

Generate TypeScript API clients from OpenAPI/Swagger or Apifox JSON using EJS templates.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill automates API code generation from standardized JSON using templates.

Core Features & Use Cases

  • Generate TypeScript API clients and types from OpenAPI/Swagger or Apifox sources using customizable EJS templates.
  • Enable consistent code structure across projects with a template-driven approach, CLI workflow, and optional watch mode to auto-regenerate on changes.
  • Use cases include rapid bootstrapping of API clients, maintaining up-to-date API typings, and integrating with Vite for development workflows.

Quick Start

Run the initialization command to create a base configuration, then modify codegen.config.ts and run the generate command.

Frequently Asked Questions about api-codegen-runner

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

FAQPage Schema
How do I automate TypeScript API client generation from OpenAPI?

Automate TypeScript API client generation by using customizable EJS templates to convert standardized OpenAPI or Swagger JSON into consistent code. This enforces a template-driven approach to maintain up-to-date typings across projects.

How do I generate API types from Apifox using a CLI?

Generate API types from Apifox by running an initialization command to create a base configuration, modifying the codegen.config.ts file, and executing the generate command via CLI. This automates type extraction from Apifox JSON sources.

Can I automatically regenerate API code when my OpenAPI spec changes?

Yes, you can automatically regenerate API code by enabling the optional watch mode. This monitors your OpenAPI or Apifox JSON sources for changes and triggers automatic regeneration of your TypeScript clients and types.

What is the best way to maintain consistent API typings in a TypeScript project?

The best way to maintain consistent API typings is adopting a template-driven codegen workflow. By standardizing JSON inputs and using EJS templates, you ensure consistent code structure and up-to-date API typings across your projects.

Does API codegen work with Vite for development workflows?

Yes, API codegen integrates with Vite for development workflows. You can use the CLI and optional watch mode to automatically regenerate TypeScript API clients and types during development.

Do I need to customize templates to generate API code from JSON?

Yes, you need customizable EJS templates to generate API code from standardized JSON. This template-driven approach ensures the generated TypeScript clients and types match your specific real-world project workflows and structure.