/ai-devkit:cmk:test-resourcesfrom ai-devkit
Designs how test suites share expensive resources (containers, databases, external services) across parallel tests without silent failures from process-model mismatches.
Ships in ai-devkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Design how a test suite shares an expensive-to-start resource (a container, a database, an external service) across tests, without the sharing silently doing nothing or silently racing.
Init (default) — design a new resource-sharing pattern for a test suite from scratch: verify the process model, pick the sharing shape, wire namespacing.
Update — revise an existing pattern after a new resource is added or the test runner changes, without re-deriving the process-model check from zero.
Verify — report-only audit against the checks under ## Verify; never mutates.
A resource-sharing optimization is designed against an assumed execution model — usually "all tests in this binary or file run in one process" — that the actual test runner does not honor. Many modern parallel runners (Rust's cargo-nextest, for instance) execute each test as its own OS process, even when they compile into one binary. In-process shared state (a static, a lazily-initialized singleton, a process-wide connection pool) never persists across tests under that model — every test starts fresh, the "sharing" degrades silently into "works, but shares nothing," and no test fails to reveal it.
Verify the runner's actual process model empirically before designing any in-process sharing. Don't infer it from "these tests live in one file" or "this compiles into one binary." Log a process identifier from two tests in the same binary and confirm whether it repeats. Read references/resource-sharing-under-parallel-runners.md for the detection technique and the two valid sharing shapes once the real model is known.
pytest-xdist within one worker, cargo test by default): an in-process singleton genuinely works. A lock held across the resource's async startup, keyed by a weak reference so the last user's drop tears it down, is the standard idiom.Never assume which shape applies without checking. The wrong shape compiles, passes locally, and produces zero benefit — or a race — under the runner's real concurrency.
Once a resource genuinely is shared across concurrent processes, every test still needs its own slice of it (its own database, bucket, or table), and the name carving out that slice must be unique across every scope that can race concurrently — not just the scope its naming counter happens to live in. A per-process counter restarts at zero in every fresh process; naming a shared resource by that counter alone is only safe if nothing else is racing it, which is false the moment two test processes hit the same shared server concurrently. Compose a process-unique discriminator with the counter. Read references/resource-sharing-under-parallel-runners.md for the naming idiom and an override-guard pattern for opting a test into the shared resource without an empty default being mistaken for a deliberate choice.
cmk:cicd's cold-cache-poisoning trap is the same principle applied to CI caching instead of test resources.Report-only — never mutate:
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (commandosslabs/ai-devkit) — no native marketplace selected
npx claudepluginhub p/commandosslabs-ai-devkit36 skills in this plugin
/cmk:adrUse when the user asks to "record this decision", "we decided to use X over Y", "document why we chose this approach", "record an ADR", "update ADR-0003", or needs to create or update architecture decision records for system-level technical choices like choosing a database, communication protocol, or infrastructure pattern./cmk:agent-instructionsUse when the user asks to "set up CLAUDE.md", "set up AGENTS.md", "agent instructions", "add engineering rules", "make the instructions thinner", or needs to establish or maintain a thin, multi-vendor root instruction file backed by on-demand engineering rules under docs/rules/./cmk:agent-vendorsUse when the user asks to "vendor the kit's skills into this repo", "set up agent adapters", "add a coding-agent vendor", "wire skills for Claude Code / Codex / OpenCode / Grok Build / Cursor", or whenever a repo needs one canonical skill set discoverable by multiple coding agents.