Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/JansenAnalytics/claudexnpx agentmods add skills/jansenanalytics/claudex/mock-serverWrote 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.
[](https://agentmods.dev/skills/jansenanalytics/claudex/mock-server)<a href="https://agentmods.dev/skills/jansenanalytics/claudex/mock-server"><img src="https://agentmods.dev/badge/skills/jansenanalytics/claudex/mock-server.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00028 | $0.00475 |
| Opus 5 | $0.00014 | $0.00237 |
| Sonnet 5 | $0.00006 | $0.00095 |
| Haiku 4.5 | $0.00003 | $0.00047 |
Grade A, and why
mock-server 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 3d 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.
What it actually says
mock-server
Spin up mock API servers for frontend development and testing: static responses, record/replay real API calls, dynamic response generation.
When to Use
- Developing frontend without a backend
- Testing against mock APIs
- Recording real API responses for replay
- Isolating frontend tests from backend dependencies
Scripts
mock-server.py
Python mock API server with zero dependencies.
python3 scripts/mock-server.py --config routes.json --port 8080
Config format:
{
"routes": [
{
"method": "GET",
"path": "/api/users",
"status": 200,
"body": [{ "id": 1, "name": "Alice" }]
},
{
"method": "POST",
"path": "/api/users",
"status": 201,
"body": { "id": "{{random_id}}", "created": "{{timestamp}}" },
"delay_ms": 100
}
]
}
Dynamic templates: {{random_id}}, {{timestamp}}, {{request.body.name}}, {{uuid}}
Supports: regex path matching, custom headers, response delays.
record-replay.py
Record real API calls and replay them.
# Record
python3 scripts/record-replay.py --mode record --target https://api.example.com --port 8081 --output recordings.json
# Replay
python3 scripts/record-replay.py --mode replay --input recordings.json --port 8081
mock-config-gen.sh
Generate mock config from Express/Fastify routes or OpenAPI spec.
bash scripts/mock-config-gen.sh --source routes/ --output mock-routes.json
bash scripts/mock-config-gen.sh --source openapi.yaml --output mock-routes.json
References
mocking-strategies.md— When to mock vs use real APIs
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.
- 3d ago First seen · 80 lines · 28 tokens per session scan A 7926994f9284
mock-server is a skill published in the GitHub repository JansenAnalytics/claudex (5 stars, last pushed 2mo ago), licensed MIT. It adds 28 tokens to every session and 475 once invoked, about $0.0001 per session on Opus 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-03.
Other skills, from other repositories
api-design
API contract design for REST and GraphQL, covering resource shape, URL and header versioning with deprecation windows, RFC 9457 Problem Details error handling, and OpenAPI specs. Use when specifying the wire contract an endpoint exposes, choosing a versioning scheme, or standardizing error response bodies across…
API Test Suite Generator
Automatically generate comprehensive API test suites from OpenAPI specifications covering CRUD operations, error handling, authentication, pagination, and edge cases.
API Contract Validator
Validate API responses against OpenAPI/Swagger specifications, JSON Schema definitions, and consumer-driven contracts to prevent breaking changes.
api-design
Use when settling the contract of an API you expose, before implementation: resources/URLs, REST vs GraphQL, versioning, one RFC 9457 error envelope, pagination, idempotency — emitted as OpenAPI 3.1. NOT implementing the endpoints (that is fastapi/nestjs/go/nodejs), NOT auth hardening (that is secure-coding), NOT…
fastapi-expert
Expert-level FastAPI development for high-performance Python APIs with async support. Use when the user mentions Python, API, async, REST, OpenAPI, or Pydantic, or when the task involves FastAPI Features.
openapi-expert
Expert-level OpenAPI/Swagger specification for API design, documentation, and code generation. Use when the user mentions swagger, API specs, REST, API design, or documentation, or when the task involves OpenAPI Specification, Webhooks, or Polymorphism.