api-generator

Generate frontend API integration code with request functions, types, mocks, and tests.

6|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/hubvue/skills --skill api-generator-hubvue
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-generator
Source: https://github.com/hubvue/skills/tree/main/project/api-generator
Command: npx skills add https://github.com/hubvue/skills --skill api-generator-hubvue

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the generation of frontend code for API integration, reducing manual effort and ensuring consistency with project conventions.

Core Features & Use Cases

  • Project-Aware Code Generation: Automatically detects and adheres to existing project patterns for TypeScript, request handling, mocking, and testing.
  • Comprehensive Artifacts: Generates request functions, types, mock data, and unit tests based on provided API specifications.
  • Use Case: When you receive a new API endpoint specification, use this Skill to generate the corresponding frontend request function, type definitions, mock data, and tests, all matching your project's established architecture.

Quick Start

Use the api-generator skill to create frontend code for the 'GET /users/:id' endpoint with a user ID parameter and a user object response.

Frequently Asked Questions about api-generator

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

FAQPage Schema
How do I generate frontend API integration code from an endpoint specification?

Generate frontend API integration code by providing an endpoint specification to the generator, which analyzes your project architecture to produce request functions, TypeScript types, mocks, and tests matching existing conventions.

Can I automatically generate mock data and unit tests for my API request functions?

Yes, you can generate mock data and unit tests alongside request functions and type definitions. The generator detects your existing mock infrastructures and testing frameworks to ensure all artifacts match project conventions.

Does the code generation tool work with both JavaScript and TypeScript projects?

Yes, the code generation tool works with both JavaScript and TypeScript projects. It automatically detects and adheres to your established request patterns, mocking setups, and testing frameworks within either environment.

What is project-aware code generation for frontend APIs?

Project-aware code generation is an approach that automatically detects your existing project patterns for request handling, mocking, and testing, ensuring newly generated API integration code adheres strictly to your current architecture.

How do I ensure generated API types and request functions match my project's conventions?

To ensure generated API types and request functions match your conventions, the generator analyzes your project architecture before creating artifacts, inheriting existing TypeScript patterns, request handling, and testing setups automatically.

What's the best way to automate creating request functions for new API endpoints?

The best way to automate creating request functions is using a generator that analyzes your architecture and outputs comprehensive artifacts—including types, mocks, and tests—directly from your provided API specifications.