api-mock

Generate API mock servers from OpenAPI specs, GraphQL schemas, or code.

1|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/manastalukdar/claude-devstudio --skill api-mock
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-mock
Source: https://github.com/manastalukdar/claude-devstudio/tree/main/skills/api-mock
Command: npx skills add https://github.com/manastalukdar/claude-devstudio --skill api-mock

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @stoplight/prism-cli, msw, @faker-js/faker, json-server, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill automates the generation of mock API servers and stub services, streamlining development and testing by providing a reliable, isolated environment.

Core Features & Use Cases

  • API Mock Generation: Create mock servers from OpenAPI specs, GraphQL schemas, or by analyzing existing code (Node.js, Python, Go).
  • Tool Flexibility: Supports Prism, MSW (Mock Service Worker), json-server, and WireMock for diverse mocking needs.
  • Realistic Data: Generates mock data using Faker.js for more accurate testing scenarios.
  • Use Case: A frontend developer needs to build a user interface for a new feature but the backend API is not yet ready. This Skill can generate a mock API server that simulates the expected API responses, allowing the frontend development to proceed without delays.

Quick Start

Use the api-mock skill to generate a json-server mock from the OpenAPI specification located at 'api/v1/swagger.json'.

Frequently Asked Questions about api-mock

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

FAQPage Schema
How do I generate a mock API server from an OpenAPI specification?

To generate a mock API server from an OpenAPI specification, this Skill automates stub service creation using tools like Prism or json-server. It provides a reliable, isolated environment for testing and allows frontend development to proceed without backend delays.

What's the best way to mock a backend API when the server is not yet ready?

The best way to mock a backend API is to generate a stub server from your OpenAPI spec or GraphQL schema. This Skill uses Faker.js to generate realistic mock data, allowing frontend development to proceed without delays while ensuring accurate testing scenarios.

Can I use MSW and json-server for mocking APIs in different frameworks?

Yes, you can use MSW and json-server for mocking APIs. This Skill supports multiple tools and can analyze existing code from frameworks like Express, Flask, FastAPI, and Go to generate mock servers, offering flexibility for diverse development and testing environments.

Does API mocking work with both OpenAPI specs and GraphQL schemas?

API mocking works with both OpenAPI specs and GraphQL schemas. This Skill generates mock servers and stub services by reading these specifications, enabling you to simulate expected API responses for isolated development and testing without needing a live backend.

How do I generate realistic mock data for API testing instead of static placeholders?

To generate realistic mock data for API testing, this Skill integrates Faker.js during the mock server generation process. This produces dynamic, realistic data scenarios instead of static placeholders, significantly improving the accuracy of your frontend integration tests.