api-mocking

api-mocking is a skill for Claude Code from Postman-Devrel/postman-claude-code-plugin. It costs 142 tokens per session (1,847 once invoked), scanned A, original, Apache-2.0.

A tool for creating a fake web server that behaves like an API, based on a request collection or OpenAPI specification. The fake server can run locally or be shared through a durable cloud URL, and can return chosen scenarios or status codes.

In plain words
What is it for?
Use it to generate, run, call, and share local or cloud mock APIs for application development, integration tests, and error-path testing.
Why use it?
It lets you develop and test clients before the real backend is available, including failure cases that are difficult to produce on a live service.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the postman plugin — 13 skills, 1 hook, 1 MCP server shipped together

Good fit Use it to generate, run, call, and share local or cloud mock APIs for application development, integration tests, and error-path testing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/postman-devrel/postman-claude-code-plugin/api-mocking
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Postman-Devrel/postman-claude-code-plugin --skill api-mocking
Clone the repo
git clone --depth 1 https://github.com/Postman-Devrel/postman-claude-code-plugin

Made for: Claude Code.

Or install postman, the plugin that ships this one along with the rest of its 13 skills, 1 hook, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for api-mocking

README.md
[![agentmods](https://agentmods.dev/badge/skills/postman-devrel/postman-claude-code-plugin/api-mocking/github.svg)](https://agentmods.dev/skills/postman-devrel/postman-claude-code-plugin/api-mocking)
Your own site
<a href="https://agentmods.dev/skills/postman-devrel/postman-claude-code-plugin/api-mocking"><img src="https://agentmods.dev/badge/skills/postman-devrel/postman-claude-code-plugin/api-mocking/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for api-mocking

Your own site · 80×15
<a href="https://agentmods.dev/skills/postman-devrel/postman-claude-code-plugin/api-mocking"><img src="https://agentmods.dev/badge/skills/postman-devrel/postman-claude-code-plugin/api-mocking.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 142 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,847 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00142 $0.01847
Opus 5.5 $0.00057 $0.00739
Sonnet 5.5 $0.00028 $0.00369
Haiku 4.5 $0.00014 $0.00185

Measured 1mo ago against content hash b0d190feead0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

api-mocking scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/api-mocking/SKILL.md · 120 lines

How it starts

The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.

API Mocking

Overview

A mock is two files on disk: config.yaml (name, port, list of scenarios) and default.js — a plain Node HTTP server, and the mock itself, not a wrapper around one. Because it's just code, generating, inspecting, running, and calling a mock are all local and work for a logged-out guest. Only sharing it — pushing it to the cloud and deploying a durable URL — needs postman login.

Local and cloud aren't a choice made once at generate time. Every mock starts as a local folder; mock push promotes any existing local folder to the cloud later, whether or not -w was passed at generate. Reach for cloud only when something other than you needs to hit this mock over the network — a teammate, a CI job elsewhere, a webhook sender. A purely local mock answering a postman request on your machine never needs it.

Process

  1. Generate. postman mock generate -n NAME --port N with no source scaffolds a complete sample cart mock — the fastest way to a server that already answers, useful whenever the point is exercising mock behavior rather than a specific API's shape. Pass a real source — postman mock generate SOURCE -n NAME --port N, where SOURCE is a collection folder or an openapi.yaml — when the endpoints need to mirror an actual API. Either form writes config.yaml + default.js into postman/mocks/NAME/. Adding -w <workspaceId> also creates the mock in that workspace on top of writing the local files — it doesn't replace the local write, and it requires being logged in.
  2. Run it. postman mock run ./postman/mocks/NAME starts Mock server started at http://localhost:PORT. If the port in config.yaml is taken and --port wasn't passed explicitly, it falls back to a free OS-assigned port instead of erroring — read the real port off that line rather than assuming the configured one. Naming --port explicitly makes a taken port a hard Port already in use error instead.
  3. Call it. Plain postman request localhost:PORT/route returns the default scenario's response. Two headers change that per-request, with no restart needed: x-mock-scenario: <name> selects a different scenario (the valid names live in config.yaml — mock get only ever shows the default one), and x-mock-response-code: <code> returns that status instead. A wrong route and a wrong scenario name both come back as Endpoint not defined — indistinguishable from the message alone. There's no hot reload: a default.js edit does nothing until you Ctrl+C the running server and mock run it again.
  4. Push it, if it needs to leave your machine. postman mock push ./postman/mocks/NAME is safe to re-run — Created the first time, Updated after. It returns a cloud ID that is a new identifier, not the id already sitting in config.yaml — see The three identifiers below. It also modifies .postman/resources.yaml; commit that change.
  5. Deploy it, for a URL that outlives your terminal. postman mock deploy CLOUD_ID -s SLUG -y --auto-deploy prints https://SLUG.mock.<team-domain>.postman.dev. Deployed private by default — callers need an API key — add --public only when the mock should be reachable by anyone with the URL. -y alone accepts private/auto-deploy-off; without --auto-deploy, a later push doesn't change what's actually being served until you deploy again.
  6. See who's calling it. postman mock get CLOUD_ID --json returns .mockServerId; feed that into postman mock log MOCK_SERVER_ID --json for call entries. An empty log means the URL genuinely hasn't been hit — a rejected caller still shows up, recorded with its failing status code.
  7. Tear down. postman mock delete ./path --yes (local) or postman mock delete CLOUD_ID --yes (cloud) — both refuse while the thing is still alive, so stop the local run or bring the deployment down first. Cloud delete doesn't touch .postman/resources.yaml; drop that line by hand afterward or the repo keeps claiming a mock that's gone.

Read the full file on GitHub · 120 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 120 lines · 142 tokens per session scan A b0d190feead0

Subscribe to this mod's changes

api-mocking is a skill published in the GitHub repository Postman-Devrel/postman-claude-code-plugin (41 stars, last pushed 22d ago), licensed Apache-2.0. It adds 142 tokens to every session and 1,847 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-20.

Related

Other skills, from other repositories

postman

Full API lifecycle management through Postman. Sync OpenAPI specs to collections, generate typed client code, run API tests, create mock servers, publish documentation, audit security against OWASP Top 10, and discover APIs across workspaces. Requires the Postman MCP Server. Use this skill when the user mentions…

Postman-Devrel/agent-skills · 111 tokens

spring-mcp-contracts

Develops and verifies JSON contracts of the Spring plugin's MCP tools using Java/Kotlin PSI, UAST, scoped Spring models and bounded response regression tests. Use when changing an endpoint lookup or contract tool, URL matching, the call-chain trace, a bean lookup or listing tool, a parameter source or requiredness, a…

explyt/spring-plugin · 102 tokens

postman-api-readiness

Analyze any API for AI agent compatibility. Scans OpenAPI specs across 8 pillars (48 checks), scores agent-readiness 0-100, and provides prioritized fix recommendations. Use this skill when the user asks: "Is my API agent-ready?", "Scan my API", "Analyze my OpenAPI spec", "What's wrong with my API for AI agents?"…

Postman-Devrel/agent-skills · 108 tokens

mem0-test-integration

Verify a Mem0 integration produced by /mem0-integrate. Runs in the same workspace on the same branch (loose coupling) — installs dependencies, runs the repo's native test suite, then exercises a real end-to-end smoke flow against the user's API key. Produces a scorecard. TRIGGER when: user has just run /mem0-integrate…

mem0ai/mem0 · 207 tokens

prowler-test-api

Testing patterns for Prowler API: JSON:API, Celery tasks, RLS isolation, RBAC. Trigger: When writing tests for api/ (JSON:API requests/assertions, cross-tenant isolation, RBAC, Celery tasks, viewsets/serializers).

prowler-cloud/prowler · 62 tokens

python-sdk

Implement or modify Python SDK behavior under python/composio, including tools, toolkits, sessions, auth configs, connected accounts, client integration, and shared Python models. Use for Python core runtime/API work; pair with python-testing and cross-sdk-parity when TypeScript must match.

ComposioHQ/composio · 60 tokens