Skip to content
Skills Library
Programming · Building & coding

api-generator

/api-generator

Autonomous Frontend Code Generation Agent specialized in project-aware API integration. Use when user provides backend API specs needing frontend request code, mock data to convert to request types and handlers, API endpoints to add with types mocks and tests, or new API integration following existing project conventions. Automatically detects TypeScript, request patterns, mock infrastructure, and test frameworks to generate artifact-gated code.

Repository
skills ↗
Licence
MIT
Last repository change
27.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Autonomous Frontend Code Generation Agent specialized in project-aware API integration. Use when user provides backend API specs needing frontend request code, mock data to convert to request types and handlers, API endpoints to add with types mocks and tests, or new API integration following existing project conventions. Automatically detects TypeScript, request patterns, mock infrastructure, and test frameworks to generate artifact-gated code.

Original author description

Autonomous Frontend Code Generation Agent specialized in project-aware API integration. Use when user provides backend API specs needing frontend request code, mock data to convert to request types and handlers, API endpoints to add with types mocks and tests, or new API integration following existing project conventions. Automatically detects TypeScript, request patterns, mock infrastructure, and test frameworks to generate artifact-gated code.

How it works

  1. Core Principles
  2. Phase 1: Project Recon (MANDATORY)
  3. Phase 2: Plan Mode (MANDATORY)
  4. Phase 3: Execution (ONLY AFTER USER APPROVAL)
  5. Interview Mode (MANDATORY WHEN UNCERTAIN)
  6. Safety Rules
  7. User Input Format (Expected)
  8. Output Style
  9. Goal
Original SKILL.md headings · 147 lines, 681 words
SKILL.md preview
---
name: api-generator
description: Autonomous Frontend Code Generation Agent specialized in project-aware API integration. Use when user provides backend API specs needing frontend request code, mock data to convert to request types and handlers, API endpoints to add with types mocks and tests, or new API integration following existing project conventions. Automatically detects TypeScript, request patterns, mock infrastructure, and test frameworks to generate artifact-gated code.
---

# Frontend API Generator

## Core Principles

1. **Recon → Plan → Execute** - Always analyze repository before generating code
2. **Incremental changes only** - Never destructive refactors
3. **Generate only supported infrastructure** - Match existing project patterns
4. **Ask when uncertain** - Use Interview Mode for ambiguity
5. **User must approve plan** - No execution without confirmation

## Phase 1: Project Recon (MANDATORY)

Before generating any code, analyze the repository to determine project architecture.

### A. Language & Type System
- Detect if project is TypeScript or JavaScript
- Detect existing type systems:
  - TypeScript interfaces/types
  - zod / io-ts / yup schemas
  - openapi generated types
- Output: `typed = on | partial | off`

### B. Request Layer Pattern
Identify request strategy:
- axios / fetch / umi-request / apollo / react-query / swr / custom client
- Check for custom wrappers (e.g. request.ts, apiClient.ts)
- Determine if APIs are functions, hooks, or SDK client methods
- Output: `request_style = function | hook | sdk | mixed`

### C. Mock Infrastructure
Detect if mock exists:
- msw
- vite-plugin-mock
- mockjs
- custom mock server
- folder structure and patterns
- Output: `mock = on | off`, `mock_style = ...`

### D. Test Infrastructure
Detect if tests exist:
- jest / vitest / testing-library / cypress / playwright
- existing test folders and naming patterns
- Output: `test = on | off`, `test_style = unit | integration | e2e`

## Phase 2: Plan Mode (MANDATORY)

You MUST output a PLAN before writing any code.

### Plan Structure (STRICT FORMAT)

#### 1. Project Recon Summary
Summarize detected conventions and key files.

#### 2. Artifacts to Generate (Capability-Gated)
List which of the following will be generated:
- Request function
- Types (only if typed != off)
- Mock handlers (only if mock = on)
- Tests (only if test = on)

#### 3. File Change List
Explicitly list files to be created/modified and their purpose.

#### 4. Incremental Merge Strategy
Explain how you will avoid breaking existing code.
Rules:
- Do NOT rewrite existing APIs
- Only append fields, exports, handlers, fixtures
- Do NOT reorganize directories
- Do NOT change naming conventions

#### 5. Uncertainties & Questions
List ambiguous points and ask the user to clarify:
- baseURL / prefix
- response envelope structure
- mock scenarios
- test type preference

#### 6. Validation Steps
Explain how user can verify locally.

## Phase 3: Execution (ONLY AFTER USER APPROVAL)

After the user confirms the plan:

### A. Generate Request Code
Follow detected project patterns exactly.

### B. Generate Types (if typed = on)
- Follow existing naming conventions
- Prefer schema → type inference if project uses schema libs
- Otherwise generate interfaces/types

### C. Generate Mock Data (if mock = on)
- Follow existing mock structure and routing patterns
- Add fixtures if project uses fixtures
- Include success/error/empty if user provided

### D. Generate Tests (if test = on)
- Follow existing test framework and folder structure
- Prefer integration tests if mock infra exists
- Reuse mock fixtures for assertions
- Avoid network calls unless project already does so

## Interview Mode (MANDATORY WHEN UNCERTAIN)

If any ambiguity exists:
- Ask targeted questions
- Do NOT generate code

Example ambiguity triggers:
- Multiple request wrappers
- Multiple mock frameworks
- Mixed TS/JS usage
- Multiple API folders
- Unknown API response envelope

## Safety Rules

- Never refactor unrelated code
- Never move files without explicit approval
- Never delete existing code
- Prefer additive changes only
- Explain all modifications

## User Input Format (Expected)

User will provide:
- Endpoint method + path
- Params/body schema
- Response schema or example JSON
- Mock examples (optional)
- Whether this is new or existing endpoint
- Optional module/domain name

## Output Style

- Use structured markdown sections
- Always start with PLAN unless explicitly told to execute
- Be concise but precise
- Include file paths and code snippets in execution phase

## Goal

Minimize frontend engineer manual work while fully respecting repository architecture and conventions.

Versions

The database has no other skills named api-generator.

Database snapshot: 13.11.2026 · package version 5c07ac96ffe2 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100backend-test
    Generate backend tests (unit, integration, mocks) for existing code. Auto-invoke when user says "write test for", "add test", "test this", or "create test".
  • 100api-mock-generator
    Generate api mock generator operations. Auto-activating skill for API Development. Triggers on: api mock generator, api mock generator Part of the API Development skill category. Use when working with APIs or building integrations. Trigger with phrases like "api mock generator",…
  • 100integration-test-generator
    Generate integration test generator operations. Auto-activating skill for API Integration. Triggers on: integration test generator, integration test generator Part of the API Integration skill category. Use when writing or running tests. Trigger with phrases like "integration…
  • 85API Node Generator
    Automatically generate workflow automation nodes from API documentation. Use when user asks to create a node for a service, generate an integration, add a provider, automate node creation, or mentions API node generation, service integration, or provider nodes. This skill…
  • 100api-generating
    Generate API endpoint code and documentation from specifications. Use when the user wants to create new API endpoints, generate route handlers, scaffold REST APIs, or produce OpenAPI/Swagger specs from code.
  • 95api-integration-builder
    Generates production-ready API clients with TypeScript types, retry logic, rate limiting, authentication (OAuth, API keys), error handling, and mock responses. Use when user says "integrate API", "API client", "connect to service", or requests third-party service integration.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.