install
source · Clone the upstream repo
git clone https://github.com/ComeOnOliver/skillshub
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ComeOnOliver/skillshub "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/RediSearch/RediSearch/run-rust-tests" ~/.claude/skills/comeonoliver-skillshub-run-rust-tests && rm -rf "$T"
manifest:
skills/RediSearch/RediSearch/run-rust-tests/SKILL.mdsource content
Rust Test Skill
Run Rust tests after making changes to verify correctness.
Arguments
- No arguments: Analyze changes and run tests for affected crates only
: Run all Rust testsall
: Run tests for specific crate (e.g.,<crate>
)/run-rust-tests hyperloglog
: Run specific test in crate (e.g.,<crate> <test>
)/run-rust-tests hyperloglog test_merge
Arguments provided:
$ARGUMENTS
Usage
Run this skill after modifying Rust code to ensure tests pass.
Instructions
- Check the arguments provided above:
- If arguments are empty, determine affected crates:
- Check which files were modified in
usingsrc/redisearch_rs/
andgit statusgit diff --name-only - Map each modified file to its crate (the directory name directly under
, e.g.,src/redisearch_rs/
→src/redisearch_rs/hyperloglog/src/lib.rs
)hyperloglog - Run tests for each affected crate:
cd src/redisearch_rs && cargo nextest run -p <crate1> -p <crate2> ... - If no Rust files were modified in
, or if you cannot determine affected crates, run all testssrc/redisearch_rs/
- Check which files were modified in
- If
is provided, run all Rust tests:allcd src/redisearch_rs && cargo nextest run - If a crate name is provided, run tests for that crate:
cd src/redisearch_rs && cargo nextest run -p <crate_name> - If both crate and test name are provided, run the specific test:
cd src/redisearch_rs && cargo nextest run -p <crate_name> <test_name>
- If arguments are empty, determine affected crates:
- If tests fail:
- Read the error output carefully
- Fix the failing tests or the code causing failures
- Re-run tests to verify the fix
Common Test Commands
# Test specific crate cd src/redisearch_rs && cargo nextest run -p hyperloglog cd src/redisearch_rs && cargo nextest run -p inverted_index cd src/redisearch_rs && cargo nextest run -p trie_rs # Run a specific test cd src/redisearch_rs && cargo nextest run -p <crate_name> <test_name> # Run tests under miri (for undefined behavior detection) cd src/redisearch_rs && cargo +nightly miri test