drive-testlisted
Install: claude install-skill 0xdeafcafe/skills
# drive-test - audit test quality on touched files
drive-test doesn't ask "is there a test"; lots of repos have lots of tests that don't catch bugs. It asks:
- Is the test at the **right level**? Unit / integration / e2e.
- Does it **actually assert** the behaviour under test?
- Does it mock something that **shouldn't be mocked**?
- Will it **fail when the behaviour breaks**, and only then?
- Is it **independent** - runs alone, in any order, in parallel?
Flags missing coverage on **newly added code paths**, runs the suite, applies mechanical fixes, surfaces judgment calls.
## Phase 0 - Scope
In priority order:
1. **PR context**: `gh pr diff --name-only` against the base branch.
2. **Working tree**: `git diff --name-only HEAD`.
3. **Explicit list** from the user.
For each source file, find its tests (TS/JS `*.test.*` / `*.spec.*`; Python `test_<name>.py` / `<name>_test.py`; Go `<name>_test.go`; Rust inline `#[cfg(test)]`). If no test file exists, flag it for Phase 3. Include test files the PR modifies directly.
Exclude snapshots (`__snapshots__/`, `*.snap`), generated scaffolding, `vendor/`, `third_party/`, `node_modules/`, fixtures.
## Phase 1 - Detect the test toolchain
Detect runner from config (`vitest.config` / `jest.config` / `playwright.config` / `pytest.ini` / `pyproject.toml[tool.pytest]` / `go.mod` / `Cargo.toml` / `.rspec`). Use the project's `test` script in `package.json` / `Justfile` / `Makefile` - match it instead of guessing flags.
## Phase 2 - Run t