test-isolation
Claude / Skills / user-test-isolation
Source: user · Invoked as: test-isolation · Loads in a $HOME session: yes
The test-isolation skill gives every test an id and reclaims exactly what it created, which stops tests leaking into shared databases, Redis and the user's home directory. It works in any project; reach for it before writing a test that touches a real backend, when a test passes alone but fails in the suite, or when a shared test database keeps growing.
The pattern is an id per test (not a global wipe, not a shared prefix) used to tag every created object and to remove precisely those objects afterwards. The skill explains why the obvious alternatives fail, lists what the audit finds, and shows the usage: audit before writing backend tests, preview what would be installed, install the fixture, and the source-side half where code under test accepts the id. It drives ~/.claude/tools/test_isolation.py (with audit, --file, --quiet-when-clean) and points to the reference conftest files of the projects that already use it.
Stale detail: the fixtures still use the <PREFIX>_NEO4J_URI names, while the graph is now Memgraph. The test_isolation_hook runs the audit automatically after test-file edits. A byte-identical copy ships in the plugin (orchestrata-test-isolation). Related: RUL-002, RUL-038, RUL-036.
Skill file
| Field | Value |
|---|---|
| Name | test-isolation |
| Source | ~/.claude/skills |
| Path | ~/.claude/skills/test-isolation/SKILL.md |
| Size | 5864 bytes |
| Loads | yes |
Frontmatter description (quoted):
Give every test an id and reclaim exactly what it created — the isolation pattern that stops tests leaking into shared databases, Redis, and the user's home directory. Works in ANY project (user-level install). Reach for this PROACTIVELY whenever you are about to write a test that touches a real backend, whenever a test passes alone but fails in the suite, whenever a suite is order-dependent or "flaky", when a shared test database keeps growing, or when someone asks why a test suite is polluting state. Also triggers on "fix test leaks", "tests should clean up", "test isolation", "tests are flaky", "test pollution", "this test passes on its own". Run the audit BEFORE writing new backend tests, not after they leak.
What it drives
| Names | Kind | Status on this host |
|---|---|---|
~/.claude/tools/test_isolation.py |
path | present |
~/.claude/cicd_context |
path | missing |
~/workspace/orchestrata-ultimate-architecture/tests/conftest.py |
path | present |
Duplicates
- orchestrata-test-isolation (orchestrata): byte-identical