api-mock-server

Generate and run mock API servers from OpenAPI specifications

509 stars

Best use case

api-mock-server is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Generate and run mock API servers from OpenAPI specifications

Teams using api-mock-server should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/api-mock-server/SKILL.md --create-dirs "https://raw.githubusercontent.com/a5c-ai/babysitter/main/library/specializations/software-architecture/skills/api-mock-server/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/api-mock-server/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How api-mock-server Compares

Feature / Agentapi-mock-serverStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Generate and run mock API servers from OpenAPI specifications

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# API Mock Server Skill

## Overview

Generates and runs mock API servers from OpenAPI specifications with dynamic response generation, request validation, and Prism/Mockoon integration.

## Capabilities

- Generate mock server from OpenAPI spec
- Dynamic response generation based on schemas
- Request validation against spec
- Prism and Mockoon integration
- Custom response scenarios
- Callback and webhook simulation
- Stateful mock behavior

## Target Processes

- api-design-specification
- microservices-decomposition

## Input Schema

```json
{
  "type": "object",
  "required": ["specPath"],
  "properties": {
    "specPath": {
      "type": "string",
      "description": "Path to OpenAPI specification"
    },
    "port": {
      "type": "number",
      "default": 4010
    },
    "engine": {
      "type": "string",
      "enum": ["prism", "mockoon", "custom"],
      "default": "prism"
    },
    "options": {
      "type": "object",
      "properties": {
        "dynamic": {
          "type": "boolean",
          "default": true,
          "description": "Generate dynamic responses"
        },
        "validateRequest": {
          "type": "boolean",
          "default": true
        },
        "cors": {
          "type": "boolean",
          "default": true
        },
        "scenarios": {
          "type": "array",
          "description": "Custom response scenarios"
        }
      }
    }
  }
}
```

## Output Schema

```json
{
  "type": "object",
  "properties": {
    "serverUrl": {
      "type": "string"
    },
    "port": {
      "type": "number"
    },
    "endpoints": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "method": { "type": "string" },
          "path": { "type": "string" }
        }
      }
    },
    "pid": {
      "type": "number",
      "description": "Process ID of running server"
    }
  }
}
```

## Usage Example

```javascript
{
  kind: 'skill',
  skill: {
    name: 'api-mock-server',
    context: {
      specPath: 'api/openapi.yaml',
      port: 4010,
      engine: 'prism',
      options: {
        dynamic: true,
        validateRequest: true
      }
    }
  }
}
```

Related Skills

react-server-components

509
from a5c-ai/babysitter

React Server Components patterns including streaming, data fetching, client/server component composition, and performance optimization.

apollo-server

509
from a5c-ai/babysitter

Apollo Server configuration, plugins, caching, federation, and performance optimization.

mock-spec-extractor

509
from a5c-ai/babysitter

Extracts design specifications from mock images including colors, typography, spacing, and component details

sdk-mock-generator

509
from a5c-ai/babysitter

Generate mock servers and clients for SDK testing

Language Server Protocol

509
from a5c-ai/babysitter

Expert skill for implementing Language Server Protocol servers with full IDE feature support

proxy-server

509
from a5c-ai/babysitter

Expert skill for proxy server implementation, configuration, and traffic interception

dedicated-server

509
from a5c-ai/babysitter

Dedicated server skill for deployment, scaling, and orchestration.

client-server

509
from a5c-ai/babysitter

Client-server architecture skill for authority models and validation.

electron-mock-factory

509
from a5c-ai/babysitter

Generate mocks for Electron APIs (ipcMain, ipcRenderer, dialog, etc.) for unit testing

mcp-mock-client

509
from a5c-ai/babysitter

Create mock MCP client for server testing with request/response simulation.

cli-mock-stdin

509
from a5c-ai/babysitter

Create mock stdin utilities for interactive CLI testing.

process-builder

509
from a5c-ai/babysitter

Scaffold new babysitter process definitions following SDK patterns, proper structure, and best practices. Guides the 3-phase workflow from research to implementation.

Workflow & Productivity