{"slug":"mocking-strategy-roster","title":"mocking-strategy-roster","summary":"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 co","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-11-29T00:42:32.291881Z","repo":{"url":"https://github.com/SebastienDegodez/skraft-plugin","stars":17,"forks":3,"license":"GPL-3.0","updatedAt":"2026-11-29T00:18:21Z"},"bodyHtml":"<hr>\n<h2>name: mocking-strategy-roster\ndescription: 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 <code>mocking-&lt;strategy&gt;-&lt;stack&gt;</code> adapter. Loaded by the mock-integration-worker. No agent hardcodes a mocking approach — it resolves it here.</h2>\n<h1>Mocking Strategy Roster (stack + strategy agnostic)</h1>\n<p>The single place that resolves <strong>how</strong> a downstream dependency is mocked for an\nintegration test. No agent and no worker hardcodes \"spin up Microcks\" or \"use\nMoq\". They resolve the pair <code>(strategy x stack)</code> here, then load the matching\nadapter.</p>\n<p>This mirrors <code>resolving-stack-commands</code>: the roster owns the routing table; the\nadapters own the concrete wiring.</p>\n<h2>Two orthogonal axes</h2>\n<ul>\n<li><strong>Strategy</strong> — WHICH mocking approach. Exclusive choice:\n<ul>\n<li><code>microcks</code> (DEFAULT, overridable) — mock the downstream from its\nOpenAPI/examples contract via a container.</li>\n<li><code>inprocess</code> — an in-process test double injected into the test host DI.</li>\n</ul>\n</li>\n<li><strong>Stack</strong> — WHICH toolchain, detected via <code>resolving-stack-commands</code>.</li>\n</ul>\n<p>The two axes never mix inside one file. Each <code>(strategy x stack)</code> pair is one\nthin adapter.</p>\n<h2>Resolving the strategy (override cascade)</h2>\n<p>Read the strategy by tool-call, never from recall. Precedence, first writer wins:</p>\n<ol>\n<li><strong>Explicit prompt</strong> — the run prompt names a strategy/library\n(e.g. \"mock with Moq\", \"mock with respx\", \"use Microcks here\"). Highest priority.</li>\n<li><strong>Repo instruction file</strong> — read\n<code>.github/instructions/skraft.instructions.md</code> field\n<code>testing.mocking.strategy</code> (and <code>testing.mocking.library</code> when\n<code>strategy: inprocess</code>). Read ONLY the <code>testing.mocking.*</code> namespace.</li>\n<li><strong>Default</strong> — <code>microcks</code>.</li>\n</ol>\n<p>Read the file with a tool call (it is a fact-that-must-be-true, S7). Do not\nassume its contents. If the file is absent, fall through to the default.</p>\n<p>When <code>strategy: inprocess</code> resolves but no <code>library</code> is named, the chosen\nadapter's Library table decides — its rows are ordered by priority (top =\nhighest). The roster does not restate the order.</p>\n<h2>Detection -&gt; adapter</h2>\n<p>Detect the stack from markers at the repo root (delegate to\n<code>resolving-stack-commands</code>), then resolve the concrete adapter from the matching\n<code>mocking-&lt;strategy&gt;-&lt;stack&gt;</code> skill:</p>\n<table>\n<thead>\n<tr>\n<th>Strategy</th>\n<th>Stack</th>\n<th>Adapter</th>\n<th>Status</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>microcks</td>\n<td>.NET</td>\n<td><code>mocking-microcks-dotnet</code></td>\n<td>supported</td>\n</tr>\n<tr>\n<td>inprocess</td>\n<td>.NET</td>\n<td><code>mocking-inprocess-dotnet</code></td>\n<td>supported</td>\n</tr>\n<tr>\n<td>microcks</td>\n<td>Python</td>\n<td><code>mocking-microcks-python</code></td>\n<td>supported</td>\n</tr>\n<tr>\n<td>inprocess</td>\n<td>Python</td>\n<td><code>mocking-inprocess-python</code></td>\n<td>supported</td>\n</tr>\n<tr>\n<td>microcks</td>\n<td>TypeScript (Vitest)</td>\n<td><code>mocking-microcks-typescript</code></td>\n<td>supported</td>\n</tr>\n<tr>\n<td>inprocess</td>\n<td>TypeScript (Vitest)</td>\n<td><code>mocking-inprocess-typescript</code></td>\n<td>supported</td>\n</tr>\n<tr>\n<td>microcks</td>\n<td>Java</td>\n<td><em>(mocking-microcks-java not yet provided)</em></td>\n<td>NOT SUPPORTED</td>\n</tr>\n<tr>\n<td>inprocess</td>\n<td>Java</td>\n<td><em>(mocking-inprocess-java not yet provided)</em></td>\n<td>NOT SUPPORTED</td>\n</tr>\n</tbody>\n</table>\n<p>Adding a stack = add the <code>mocking-&lt;strategy&gt;-&lt;stack&gt;</code> adapter(s) and the row(s)\nhere, with zero edits to the worker or the orchestrator.</p>\n<h2>Unknown value -&gt; stop, never guess</h2>\n<p>If the resolved strategy is outside <code>{microcks, inprocess}</code>, or the library is\nnot a row of the resolved adapter's Library table when <code>strategy: inprocess</code>\n(.NET: <code>moq</code>, <code>fakeiteasy</code>, <code>nsubstitute</code>; Python: <code>respx</code>, <code>responses</code>, <code>fake</code>;\nTypeScript: <code>msw</code>, <code>fake</code>), or the\ndetected stack has no adapter, STOP and emit a structured blocker. Never invent\na wiring:</p>\n<pre><code>status: blocked\ntype: unsupported_mocking_strategy   # | unsupported_mocking_library | unsupported_stack\nmessage: No mocking adapter for the resolved (strategy x stack)\ncontext:\n  strategy: kafka-mock\n  stack: dotnet\n  source: prompt | skraft.instructions.md | default\n</code></pre>\n<h2>Contract for callers</h2>\n<ul>\n<li>Resolve <code>(strategy x stack)</code> here; do not embed a mocking approach in the worker.</li>\n<li>Load the resolved adapter and apply its recipe.</li>\n<li>Adding a strategy or stack = add an adapter and a row here, zero edits elsewhere.</li>\n</ul>\n","files":[{"path":"SKILL.md","sizeBytes":4137,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-11-29T00:44:08.675105Z","sha256":"F7BB3023F2E076B08560E8DAC4766330C54868501FDB484AA5BFC0FB6ABDAE3B","sizeBytes":1829},"review":null,"source":{"repositoryUrl":"https://github.com/SebastienDegodez/skraft-plugin","path":"plugins/skraft-framework/skills/mocking-strategy-roster","license":"GPL-3.0","commit":"c6117c6236a25490bf1916b131866069740c9b22","subtreeSha":"D71248F25D931F0632A91C9AB6A482D3F8E0D8DE58F5E84FC53AF2D31893CCC4","lastSyncedAt":"2026-11-29T00:42:27.348488Z"},"reviewedAt":"2026-11-29T00:47:55.759036Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/SebastienDegodez/skraft-plugin/tree/main/plugins/skraft-framework/skills/mocking-strategy-roster"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install sebastiendegodez-skraft-plugin@llmmart"},{"target":"git","command":"git clone https://github.com/SebastienDegodez/skraft-plugin.git"}]}