api-integration-generator

Generates API integration plans with endpoint specs, error codes, caching, and Mock strategies.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/fen-zx/NovelToScript --skill api-integration-generator-fen-zx
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: api-integration-generator
Source: https://github.com/fen-zx/NovelToScript/tree/main/.agents/skills/api-integration-generator
Command: npx skills add https://github.com/fen-zx/NovelToScript --skill api-integration-generator-fen-zx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It eliminates misalignment between frontend and backend teams by turning page data requirements into a complete API contract before any code is written, covering endpoints, request/response shapes, error codes, caching, and Mock plans. ## Core Features & Use Cases - Endpoint Derivation: Infers RESTful endpoints (GET/POST/PUT/DELETE) from requirement data fields or page specs, with full request parameters and response JSON examples. - Contract Governance: Produces HTTP status code mappings, business error codes, cache matrices with TTL and invalidation rules, and race-condition handling (debounce, AbortController). - Mock & Encapsulation Plans: Outputs phased Mock strategies (local JSON, YApi/MSW, vite proxy) plus ready-to-use src/api/ axios module scaffolding. - Use Case: Given a user management page spec listing fields like name, email, and status, generate the full interface list, response schemas, error code table, and a question list of unresolved items to confirm with the backend. ## Quick Start Ask the AI to generate a complete API integration plan for the user management page based on its data fields and features, including endpoints, error codes, caching, and Mock strategy.

Frequently Asked Questions about api-integration-generator

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

FAQPage Schema
How do I generate an API integration plan from page requirements?▼

Provide the requirement analyzer output containing page data fields, or a design spec with a data source table. The skill derives RESTful endpoints, request parameters, response JSON structures, error codes, and caching rules following the project's { code, message, data } convention.

Can I convert an OpenAPI or Swagger document into frontend API code?▼

Yes, OpenAPI and Swagger documents in JSON or YAML are accepted as input. The skill parses them into an interface inventory and generates axios-based encapsulation modules for the src/api/ directory.

What Mock strategies work before the backend API is ready?▼

The skill recommends a phased approach: local JSON files for prototype demos, YApi or MSW for pre-integration development, vite proxy switching during joint debugging, and Mock Service Worker for testing without code intrusion.

How should frontend caching and invalidation be designed for REST APIs?▼

List queries use Stale-While-Revalidate with 30s TTL, detail queries use Cache-First with 5min TTL, and write operations are never cached but must invalidate related list and detail caches on success.

What are the limitations of generating API specs from requirements?▼

Fields not present in the requirements are never guessed; they are marked as pending confirmation and collected into a question list for the backend team. Items like default sort fields, soft versus hard delete, and batch operations typically need manual confirmation.