← ClaudeAtlas

mocking-strategy-rosterlisted

Use when an agent must mock a downstream HTTP/event dependency for an integration test and needs to know WHICH mocking strategy and stack adapter to use. Resolves the mocking strategy (Microcks by default, overridable to an in-process library) and the stack, then points to the concrete `mocking-<strategy>-<stack>` adapter. Loaded by the mock-integration-worker. No agent hardcodes a mocking approach — it resolves it here.
SebastienDegodez/skraft-plugin · ★ 4 · Testing & QA · score 60
Install: claude install-skill SebastienDegodez/skraft-plugin
# Mocking Strategy Roster (stack + strategy agnostic) The single place that resolves **how** a downstream dependency is mocked for an integration test. No agent and no worker hardcodes "spin up Microcks" or "use Moq". They resolve the pair `(strategy x stack)` here, then load the matching adapter. This mirrors `resolving-stack-commands`: the roster owns the routing table; the adapters own the concrete wiring. ## Two orthogonal axes - **Strategy** — WHICH mocking approach. Exclusive choice: - `microcks` (DEFAULT, overridable) — mock the downstream from its OpenAPI/examples contract via a container. - `inprocess` — an in-process test double injected into the test host DI. - **Stack** — WHICH toolchain, detected via `resolving-stack-commands`. The two axes never mix inside one file. Each `(strategy x stack)` pair is one thin adapter. ## Resolving the strategy (override cascade) Read the strategy by tool-call, never from recall. Precedence, first writer wins: 1. **Explicit prompt** — the run prompt names a strategy/library (e.g. "mock with Moq", "use Microcks here"). Highest priority. 2. **Repo instruction file** — read `.github/instructions/skraft.instructions.md` field `testing.mocking.strategy` (and `testing.mocking.library` when `strategy: inprocess`). Read ONLY the `testing.mocking.*` namespace. 3. **Default** — `microcks`. Read the file with a tool call (it is a fact-that-must-be-true, S7). Do not assume its contents. If the file is absent, fall