Generate Realistic API Mocks
Skill for building realistic mock API services with deterministic fixtures and scenario switching for parallel dev and testing.
Why it matters
Create robust API mocks to simulate real-world behavior for development and testing. Enable parallel development and thorough validation of API contracts before backend completion.
Outcomes
What it gets done
Build mock APIs for frontend or integration testing.
Simulate partner or third-party APIs during development.
Create demo environments with realistic responses.
Validate API contracts before backend completion.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/ag-api-testing-observability-api-mock | bash Overview
API Mocking Framework
A skill for designing realistic mock API services with deterministic fixtures and documented scenario switching, for dev/test/demo use. Use for frontend/integration testing, third-party API simulation, or demo environments before the real API is ready; not for production testing or security testing.
What it does
This skill designs comprehensive API mocking solutions that simulate real API behavior for development, testing, and demonstration - enabling parallel development and thorough testing before a real backend or third-party integration is ready. Its process: clarify the API contract, auth flows, error shapes, and latency expectations; define mock routes, scenarios, and state transitions before generating responses; provide deterministic fixtures with optional randomness toggles; and document how to run the mock server and switch between scenarios. A detailed implementation playbook (resources/implementation-playbook.md) covers code samples, checklists, and templates.
When to use - and when NOT to
Use this when building mock APIs for frontend or integration testing, simulating a partner or third-party API during development before it's available, creating demo environments with realistic responses, or validating an API contract before the backend is complete.
Not the right skill for testing production systems or live integrations, for security or penetration testing (a different scope entirely), or when there's no API contract or expected behavior to mock in the first place.
Inputs and outputs
Inputs: the target API's contract (routes, request/response shapes, auth flows, error shapes, latency expectations) and the scenarios that need to be simulated.
Outputs: a mock API service with defined routes and state transitions, deterministic fixtures (with optional randomness toggles), documentation for running the mock server and switching scenarios - with mock secrets/data kept separate from production secrets and endpoints clearly labeled to prevent accidental use.
Integrations
Designed to sit in front of whatever mock-server tooling the project uses; the skill provides the design methodology and fixture/scenario patterns rather than a specific vendor integration.
Who it's for
Developers who need a realistic mock API for parallel frontend/backend development, third-party integration simulation, or demo environments, before the real API is available or complete.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.