From testscribe
Write or review Rust tests using the testscribe test framework (test trees with Given/When/Then output). Use when a Rust project depends on the testscribe crate and the task involves writing, changing, or reviewing tests.
How this skill is triggered — by the user, by Claude, or both
Slash command
/testscribe:testscribeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
testscribe builds **test trees**: each test performs ONE business action, asserts on its
testscribe builds test trees: each test performs ONE business action, asserts on its side effects, and passes its returned state to child tests. Test output reads like a domain narrative (Given → When → Then) — if the output doesn't read naturally, the test is wrong.
The full guides ship inside the testscribe package itself. Always read them from the version this project actually uses:
grep -A1 '^name = "testscribe"$' Cargo.lockls -d ~/.cargo/registry/src/*/testscribe-<version>
(if missing, run cargo fetch once)docs/llms.md — the agent guide: workflow, then! decision tree, good/bad patternsdocs/foundations.md — the test-tree philosophy and the SHAPE loopdocs/guidelines.md — naming and assertion rules with examplestests/*.rs — complete runnable examples for every feature (environments, cloning,
custom checks, parameterized tests, custom runners)docs/advanced_techniques.md — only when environments, state cloning, or custom
checks are involveddocs/does_it_fit.md — when deciding whether testscribe fits a use case at all:
linear stories and test matrices (pure functions, time-dependent behavior,
multi-actor scenarios) vs. cases it doesn't fit (concurrency, property tests, benchmarks)docs/testing_checklist.md — apply after writing each testDo not write tests from memory of this skill alone; the docs above are canonical for the installed version.
cargo test -- --nocapture and read the output.
Identify existing states and which business actions are not covered yet.Given<...>).
Create a root (standalone) test only when no earlier business step exists.Then line must make sense to
someone who knows the domain but not the code.docs/testing_checklist.md before moving on.payment_attempt_failed, not test_payment.then!(variable).eq(..) / then!(expr => alias).eq(..) /
then!("statement").run(|| ..) / then!("statement").params(list).run(|item| ..)self: name them rejected_as_* / has_*, never is_*/to_*
(clippy wrong_self_convention).Env<E>,
infrastructure); clone expensive setups via cloneable/cloneable_async instead of
letting parents re-run.Provides a checklist for code reviews covering functionality, security, performance, maintainability, tests, and quality. Use for pull requests, audits, team standards, and developer training.
npx claudepluginhub fraillt/testscribe --plugin testscribe