regression-guardlisted
Install: claude install-skill thepictishbeast/claude-tools
# /regression-guard — emit a REGRESSION-GUARD test stub for a refactor commit
Thin wrapper around the `regression-guard` binary (installed at
`~/.local/bin/regression-guard`; built by `install.sh`). Binary
owns: `git show` of the commit, diff pattern auto-detection, test
skeleton rendering. Agent fills in the test body.
## Steps
1. **Invoke the binary** with the refactor commit hash:
```sh
regression-guard <commit-hash> \
[--pattern <override>] \
[--test-name <fn-name>] \
[--module-path <crate::path::to::mod>] \
[--git-dir <repo-path>]
```
Stdout is a Rust source snippet (test fn + REGRESSION-GUARD
docstring referencing the commit + the detected pattern).
2. **Paste the snippet into the test module** of the file the
refactor touched (typically `src/<file>.rs`'s
`#[cfg(test)] mod tests` block).
3. **Fill in the test body** with the actual exercise of the
pathological input the refactor defends against. Examples per
pattern are listed in the snippet's TODO comment.
4. **Run the test**: `cargo test <test_name>` — it MUST pass on the
post-refactor code (that's the point — it locks in the new
behaviour). If it fails, the test isn't asserting the right
thing; revisit.
5. **Commit** the test in the same PR / commit-chain as the
refactor, or in a `[REGRESSION-GUARD]`-prefixed follow-up
commit referencing the refactor hash.
## Net visible tool calls per r