ai-context-engineering-for-qa: Skill for Claude Code

.claude/skills/api-mocks/SKILL.md

api-mocks is a skill for Claude Code from vlad-ryzhkov/ai-context-engineering-for-qa. It costs 50 tokens per session (1,612 once invoked), scanned A, original, Unlicense.

A tool for creating an in-process HTTP mock server and WireMock shared test setups from an API specification. An API specification describes the requests and responses a service supports.

In plain words
What is it for?
Use it to build isolated API test doubles from a specification, following the project's required Java serialization and WireMock conventions.
Why use it?
It lets tests use predictable simulated services instead of calling real external systems.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is vlad-ryzhkov/ai-context-engineering-for-qa's own configuration. It tells Claude Code how to work on ai-context-engineering-for-qa itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ai-context-engineering-for-qa configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/vlad-ryzhkov/ai-context-engineering-for-qa/main/.claude/skills/api-mocks/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/vlad-ryzhkov/ai-context-engineering-for-qa

Made for: Claude Code.

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-mocks

README.md
[![agentmods](https://agentmods.dev/badge/skills/vlad-ryzhkov/ai-context-engineering-for-qa/api-mocks/github.svg)](https://agentmods.dev/skills/vlad-ryzhkov/ai-context-engineering-for-qa/api-mocks)
Your own site
<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.

agentmods 80×15 button for api-mocks

Your own site · 80×15
<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>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,612 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.00050 $0.01612
Opus 5.5 $0.00020 $0.00645
Sonnet 5.5 $0.00010 $0.00322
Haiku 4.5 $0.00005 $0.00161

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

Security

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.

.claude/skills/api-mocks/SKILL.md · 109 lines

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.)

  • object singleton, 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() sets BASE_URL system property, stop() clears it
  • Extract from spec: required fields → validate presence, type, format; business rules (length, regex, uniqueness, password complexity)
  • ConcurrentHashMap sets for uniqueness tracking (case-insensitive for email)
  • ConcurrentHashMap for idempotency cache: same key + same body hash → cached response; same key + different body → 400 IDEMPOTENCY_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-sig with claims extracted from spec (alg, sub, aud, exp = now+TTL) — use Base64.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

Read the full file on GitHub · 109 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. 2mo ago Changed · +84 lines · +31 tokens per session c69d9c549eb9
  2. 3mo ago First seen · 25 lines · 19 tokens per session scan A fd74d98b3a1f

Subscribe to this mod's changes

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.

Related

api-mocks compared with skills from other repositories

api-mocks next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
api-mocksvlad-ryzhkov/ai-context-engineering-for-qaSkill62mo agoUnlicenseA50Claude Code
detecting-broken-object-property-level-authorizationxalgorix/xalgorixSkill1.6kyesterdayApache-2.0A36Claude Code, Codex
api-designopen-gsd/gsd-piSkill1.4ktodayMITA91Claude Code, Codex
create-mcp-serveropen-gsd/gsd-piSkill1.4ktodayMITA90Claude Code, Codex
api-documentationLambdaTest/agent-skillsSkill402yesterdayMITA147Claude Code, Codex
openapi-spec-generatorLambdaTest/agent-skillsSkill402yesterdayMITA165Claude Code, Codex
api-sdk-generatorLambdaTest/agent-skillsSkill402yesterdayMITA147Claude Code, Codex