Generate mock API servers for testing and development with realistic response data.

MITAuto-check passedTesting & QA

Install Mocking APIs

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill mocking-apis -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace mocking-apis --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/mocking-apis .claude/skills/mocking-apis && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mocking-apis
GitHub stars
2.8k
Token cost
~1.3k tokens
SKILL.md length
556 words
Files
4 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Generate mock API servers for testing and development with realistic response data.

  • Works in 8 steps: Read the OpenAPI specification using… → Generate response fixtures for each… → Configure the mock server to match… → …
  • Creating mock APIs for development and testing
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Mocking APIs is an agent skill from jeremylongshore/tons-of-skills-marketplace. Generate mock API servers for testing and development with realistic response data. Use when creating mock APIs for development and testing. Trigger with phrases like "create mock API", "generate API mock", or "setup mock server".

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/errors.md`, `references/examples.md` and `references/implementation.md`). Compatibility notes: Designed for Claude Code

It sits in Testing & QA. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Creating mock APIs for development and testing
  • With phrases like create mock API
  • Generate API mock
  • Setup mock server

Example prompts

  • “create mock API”
  • “generate API mock”
  • “setup mock server”
  • “/mocking-apis”

Requirements

  • Node.js
  • Docker
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Grep, Glob, Bash(api:mock-*)

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Read the OpenAPI specification using Read and extract all endpoint definitions, response schemas, and example values to build the mock…
  2. Generate response fixtures for each endpoint using schema-aware data generation: realistic names (Faker), valid emails, properly formatted…
  3. Configure the mock server to match requests by method, path pattern, query parameters, and request body content type, returning the…
  4. Add stateful behavior for CRUD operations: POST creates a record in memory, GET returns it, PUT updates it, DELETE removes it -- enabling…
  5. Implement configurable response delays (50-500ms per endpoint) to simulate real-world latency and test client timeout handling.
  6. Add error scenario mocking: configure specific request patterns to return 400, 401, 404, 429, or 500 responses for testing error handling…
  7. Enable request recording that captures all incoming requests with timestamps and headers for later replay in contract tests.
  8. Create a startup script that launches the mock server on a configurable port with hot-reload when fixture files change.

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Grep
    • Glob
    • Bash(api:mock-*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • stoplight.io
    • mswjs.io
    • wiremock.org
    • fakerjs.dev

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Mocking APIs loads about 1.3k tokens when it runs, and up to ~3.3k if it reads all its reference files. Until then it costs about 61 tokens; SKILL.md has 556 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~61
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 556 words, ~1,271 tokens.

Download SKILL.mdSave it as .claude/skills/mocking-apis/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
mocking-apis
description
Generate mock API servers for testing and development with realistic response data. Use when creating mock APIs for development and testing. Trigger with phrases like "create mock API", "generate API mock", or "setup mock server".
allowed-tools
Read, Write, Edit, Grep, Glob, Bash(api:mock-*)
compatibility
Designed for Claude Code
version
1.24.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
tags
api, testing, mocking-apis

Mocking APIs

Overview

Generate mock API servers from OpenAPI specifications that return realistic, schema-compliant response data for development and testing. Support dynamic response generation with Faker.js data, configurable latency simulation, stateful CRUD behavior, and request recording for contract testing validation.

Prerequisites

  • OpenAPI 3.0+ specification file with response schema definitions
  • Mock server runtime: Prism (Stoplight), json-server, MSW (Mock Service Worker), or WireMock
  • Faker.js or equivalent for realistic test data generation
  • Docker for containerized mock server deployment (optional but recommended)
  • Frontend or consumer application needing API stubs for parallel development

Instructions

  1. Read the OpenAPI specification using Read and extract all endpoint definitions, response schemas, and example values to build the mock response inventory.
  2. Generate response fixtures for each endpoint using schema-aware data generation: realistic names (Faker), valid emails, properly formatted dates, and relational IDs that reference other mock entities.
  3. Configure the mock server to match requests by method, path pattern, query parameters, and request body content type, returning the appropriate fixture.
  4. Add stateful behavior for CRUD operations: POST creates a record in memory, GET returns it, PUT updates it, DELETE removes it -- enabling realistic integration testing flows.
  5. Implement configurable response delays (50-500ms per endpoint) to simulate real-world latency and test client timeout handling.
  6. Add error scenario mocking: configure specific request patterns to return 400, 401, 404, 429, or 500 responses for testing error handling paths.
  7. Enable request recording that captures all incoming requests with timestamps and headers for later replay in contract tests.
  8. Create a startup script that launches the mock server on a configurable port with hot-reload when fixture files change.

See ${CLAUDE_SKILL_DIR}/references/implementation.md for the full implementation guide.

Output

  • ${CLAUDE_SKILL_DIR}/mocks/server.js - Mock server entry point with route registration
  • ${CLAUDE_SKILL_DIR}/mocks/fixtures/ - Per-endpoint response fixture JSON files
  • ${CLAUDE_SKILL_DIR}/mocks/generators/ - Dynamic response generators using Faker.js
  • ${CLAUDE_SKILL_DIR}/mocks/scenarios/ - Error scenario configurations (4xx, 5xx responses)
  • ${CLAUDE_SKILL_DIR}/mocks/state.js - In-memory state store for CRUD behavior
  • ${CLAUDE_SKILL_DIR}/mocks/recordings/ - Captured request logs for contract testing
  • ${CLAUDE_SKILL_DIR}/docker-compose.mock.yml - Docker configuration for mock server
Show full SKILL.md (233 more words)Show less

Error Handling

ErrorCauseSolution
Schema mismatchMock response does not match updated OpenAPI specRun spec-to-fixture sync on spec change; add CI check comparing fixture schemas
Missing endpointConsumer requests path not defined in OpenAPI specReturn 501 with message listing available endpoints; log unknown path for spec update
Stale fixturesMock data becomes unrealistic after API schema evolutionRegenerate fixtures from latest spec; use generators over static fixtures for evolving APIs
Port conflictMock server port already in use by another dev serviceMake port configurable via environment variable; default to spec-defined server URL port
State leak between testsStateful mock retains data from previous test runReset in-memory state before each test suite; expose POST /mock/reset admin endpoint

Refer to ${CLAUDE_SKILL_DIR}/references/errors.md for comprehensive error patterns.

Examples

Frontend parallel development: Launch a Prism mock server from the OpenAPI spec so frontend developers can build against realistic API responses while backend implementation is in progress.

Integration test isolation: Use MSW (Mock Service Worker) to intercept HTTP requests in Node.js test suites, returning fixture responses without network calls, with per-test response customization.

Contract testing: Record all requests to the mock server during frontend E2E tests, then replay them against the real backend to verify the mock accurately represents actual API behavior.

See ${CLAUDE_SKILL_DIR}/references/examples.md for additional examples.

Resources

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in skills/.curated/mocking-apis of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/errors.md
  • references/examples.md
  • references/implementation.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Mocking APIs next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Mocking APIs compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mocking APIs this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.3kAutomated safety check: PassMIT
Web Application Testinganthropics/skills180k51 repos~966Automated safety check: PassApache-2.0
Diagnosing Bugsfossasia/eventyay-interpretation1.6k32 repos~2.1kAutomated safety check: PassApache-2.0
TDDpietheinstrengholt/rssmonster56430 repos~906Automated safety check: PassMIT
TDD WorkflowhellangleZ/burn-in-cceverywhere-ralph11211 repos~2.4kAutomated safety check: PassNone
TDDsanity-io/sanity6.4k20 repos~1kAutomated safety check: PassMIT

Similar skills

  • Web Application Testing

    anthropics/skills

    Official

    Tests local web applications with Python Playwright scripts, checking frontend behavior, capturing screenshots and reading browser console logs.

    180k GitHub starsUsed in 51 repos~966 tokens
    Testing & QAAuto-check passed
  • Diagnosing Bugs

    fossasia/eventyay-interpretation

    Diagnosis loop for hard bugs and performance regressions. An agent skill from fossasia/eventyay-interpretation.

    1.6k GitHub starsUsed in 32 repos~2.1k tokens
    Testing & QAAuto-check passed
  • TDD

    pietheinstrengholt/rssmonster

    Test-driven development. An agent skill from pietheinstrengholt/rssmonster.

    564 GitHub starsUsed in 30 repos~906 tokens
    Testing & QAAuto-check passed
  • TDD Workflow

    hellangleZ/burn-in-cceverywhere-ralph

    A skill your agent uses when writing new features, fixing bugs, or refactoring code.

    112 GitHub starsUsed in 11 repos~2.4k tokens
    Testing & QAAuto-check passed
  • TDD

    sanity-io/sanity

    Official

    Test-driven development with red-green-refactor loop. An agent skill from sanity-io/sanity.

    6.4k GitHub starsUsed in 20 repos~1k tokens
    Testing & QAAuto-check passed
  • Context Driven Development

    Ibrahim-3d/orchestrator-supaconductor

    A skill your agent uses when working with Conductor's context-driven development methodology, managing project context artifacts, or understanding the relationship between product.md, tech-stack.md…

    381 GitHub starsUsed in 9 repos~2.9k tokens
    Testing & QAAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Categories

Questions about Mocking APIs

What does Mocking APIs do?

Generate mock API servers for testing and development with realistic response data. Mocking APIs is an agent skill from jeremylongshore/tons-of-skills-marketplace. Generate mock API servers for testing and development with realistic response data.

When should I use Mocking APIs?

Mocking APIs fits situations like: creating mock APIs for development and testing; with phrases like create mock API; generate API mock; setup mock server.

How do I install Mocking APIs in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill mocking-apis -a claude-code`. Or copy the skill folder (skills/.curated/mocking-apis in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/mocking-apis in your project. Claude Code loads it when a task matches its description.

How do I install Mocking APIs in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill mocking-apis -a codex`. Or copy the skill folder (skills/.curated/mocking-apis in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/mocking-apis in your project. Codex loads it when a task matches its description.

Can I use Mocking APIs in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill mocking-apis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mocking-apis, .gemini/skills/mocking-apis, .github/skills/mocking-apis and .opencode/skills/mocking-apis in your project.

What does Mocking APIs need to run?

SKILL.md names no scripts, command-line tools or credentials: Mocking APIs is instructions for the agent only. Our summary lists: Node.js; Docker. Its frontmatter pre-approves these tools: Read, Write, Edit, Grep, Glob, Bash(api:mock-*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Mocking APIs access the network?

SKILL.md names 4 domains. As links in the text: stoplight.io, mswjs.io, wiremock.org and fakerjs.dev. This is read from the text; nothing was executed.

Is Mocking APIs safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Mocking APIs use?

Mocking APIs is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mocking APIs use?

About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2k tokens, read only when the agent opens those files.

What are the alternatives to Mocking APIs?

Skills that share tags, products or a category with Mocking APIs: Web Application Testing (anthropics/skills, 180k stars), Diagnosing Bugs (fossasia/eventyay-interpretation, 1.6k stars), TDD (pietheinstrengholt/rssmonster, 564 stars) and TDD Workflow (hellangleZ/burn-in-cceverywhere-ralph, 112 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mocking APIs?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.