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/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.
<a href="https://agentmods.dev/skills/jansenanalytics/claudex/mock-server"><img src="https://agentmods.dev/badge/skills/jansenanalytics/claudex/mock-server.svg" alt="Reviewed on agentmods" width="80" 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.5 | $0.00011 | $0.00190 |
| Sonnet 5.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 2mo 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.
- 2mo 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 5mo ago), licensed MIT. It adds 28 tokens to every session and 475 once invoked, about $0.0001 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-03.
mock-server compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| mock-serverJansenAnalytics/claudex | Skill | 5 | 5mo ago | MIT | A | 28 | Claude Code, Codex |
| api-designericrisco/rsc-harness | Skill | 682 | 5d ago | MIT | A | 105 | Claude Code, Codex |
| fastapi-expertpersonamanagmentlayer/pcl | Skill | 46 | 1mo ago | Apache-2.0 | A | 49 | Claude Code |
| openapi-expertpersonamanagmentlayer/pcl | Skill | 46 | 1mo ago | Apache-2.0 | A | 57 | Claude Code |
| construtor-de-apiricneves-ai/flowgrammers-skills | Skill | 118 | 2mo ago | MIT | A | 46 | Claude Code, Codex |
| api-design-patternsorganvm-iv-taxis/a-i--skills | Skill | 17 | 3mo ago | Apache-2.0 | A | 54 | Claude Code |
| mockapidevctllabs/mockapi | Skill | 3 | 1mo ago | Apache-2.0 | A | 72 | Codex |