API Mock Server
Developmentapi-mock-serverAPI Mock Server is an Agent Skill for development published in the a5c-ai/babysitter repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Generate and run mock API servers from OpenAPI specifications
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/a5c-ai/babysitter/blob/HEAD/library/specializations/software-architecture/skills/api-mock-server/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/api-mock-server, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
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
{
"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
{
"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
{
kind: 'skill',
skill: {
name: 'api-mock-server',
context: {
specPath: 'api/openapi.yaml',
port: 4010,
engine: 'prism',
options: {
dynamic: true,
validateRequest: true
}
}
}
}