Borrowing it
Nothing to install: this file belongs to vlad-ryzhkov/ai-context-engineering-for-qa. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/vlad-ryzhkov/ai-context-engineering-for-qa/main/.claude/skills/api-mocks/SKILL.mdgit clone --depth 1 https://github.com/vlad-ryzhkov/ai-context-engineering-for-qaWrote 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/vlad-ryzhkov/ai-context-engineering-for-qa/api-mocks)<a href="https://agentmods.dev/skills/vlad-ryzhkov/ai-context-engineering-for-qa/api-mocks"><img src="https://agentmods.dev/badge/skills/vlad-ryzhkov/ai-context-engineering-for-qa/api-mocks/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/vlad-ryzhkov/ai-context-engineering-for-qa/api-mocks"><img src="https://agentmods.dev/badge/skills/vlad-ryzhkov/ai-context-engineering-for-qa/api-mocks.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.00050 | $0.01612 |
| Opus 5.5 | $0.00020 | $0.00645 |
| Sonnet 5.5 | $0.00010 | $0.00322 |
| Haiku 4.5 | $0.00005 | $0.00161 |
Grade A, and why
api-mocks 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.
How it starts
The opening of the file, as written. The whole thing — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.
When to Use
- Tests fail with
ConnectException/Connection refused - No live API server available (CI, local dev without backend)
- Starting a new endpoint — generate mock before writing tests
Not for: mocking only external services (put WireMock stubs directly in @BeforeEach).
Workflow: /api-mocks → retry /api-tests (fallback when no live server is available).
SILENT MODE: Execute all generation phases silently. Do not output intermediate reasoning or conversational filler. Only the final SKILL COMPLETE block (or an explicit ESCALATION if compilation fails) goes to chat.
Protocol
What to generate (always in this order):
1. helpers/{ExternalService}MockServer.kt — WireMock singleton (only if spec mentions external services like SMS, payments, etc.)
objectsingleton, dynamic port,start()idempotent,stop(),port()stub{Service}Success()/stub{Service}Unavailable()/resetAll()- Path:
POST /{service-path}from spec
2. helpers/{Endpoint}MockServer.kt — JDK com.sun.net.httpserver.HttpServer
class(not object) — per-class lifecycle;start()setsBASE_URLsystem property,stop()clears it- Extract from spec: required fields → validate presence, type, format; business rules (length, regex, uniqueness, password complexity)
ConcurrentHashMapsets for uniqueness tracking (case-insensitive for email)ConcurrentHashMapfor idempotency cache: same key + same body hash → cached response; same key + different body → 400IDEMPOTENCY_KEY_MISMATCH- Validation error responses MUST include
"field":"<field_name>" - Conflict responses MUST include
"field":"<field_name>" - If spec defines token-type response field (JWT): generate
header.payload.mock-sigwith claims extracted from spec (alg,sub,aud,exp = now+TTL) — useBase64.getUrlEncoder().withoutPadding() - External service call:
if (System.getProperty("{SERVICE}_GATEWAY_URL") != null) call(url+"/path")→ on failure return 503 - Security headers on all responses:
Content-Type: application/json; charset=utf-8,X-Content-Type-Options: nosniff,Strict-Transport-Security: max-age=31536000; includeSubDomains
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 Changed · +84 lines · +31 tokens per session c69d9c549eb9
- 3mo ago First seen · 25 lines · 19 tokens per session scan A fd74d98b3a1f
api-mocks is a skill published in the GitHub repository vlad-ryzhkov/ai-context-engineering-for-qa (6 stars, last pushed 2mo ago), licensed Unlicense. It adds 50 tokens to every session and 1,612 once invoked, about $0.0002 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-08-31.
api-mocks compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| api-mocksvlad-ryzhkov/ai-context-engineering-for-qa | Skill | 6 | 2mo ago | Unlicense | A | 50 | Claude Code |
| detecting-broken-object-property-level-authorizationxalgorix/xalgorix | Skill | 1.6k | yesterday | Apache-2.0 | A | 36 | Claude Code, Codex |
| api-designopen-gsd/gsd-pi | Skill | 1.4k | today | MIT | A | 91 | Claude Code, Codex |
| create-mcp-serveropen-gsd/gsd-pi | Skill | 1.4k | today | MIT | A | 90 | Claude Code, Codex |
| api-documentationLambdaTest/agent-skills | Skill | 402 | yesterday | MIT | A | 147 | Claude Code, Codex |
| openapi-spec-generatorLambdaTest/agent-skills | Skill | 402 | yesterday | MIT | A | 165 | Claude Code, Codex |
| api-sdk-generatorLambdaTest/agent-skills | Skill | 402 | yesterday | MIT | A | 147 | Claude Code, Codex |