# run-rust-tests

run-rust-tests runs Rust tests for the RediSearch crates your edit touched, then repairs whatever fails.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · ★ 6244 repo stars
- Author: RediSearch
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/RediSearch/RediSearch/tree/HEAD/.skills/run-rust-tests/SKILL.md
- Updated: 2026-10-29
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/run-rust-tests

## What it does

Edit Rust code in RediSearch and this skill works out which crates the change reaches, then tests those. With no arguments it reads `git status` and `git diff --name-only`, looks inside `src/redisearch_rs/`, and takes the top-level folder name as the crate. `cargo nextest` runs for those packages only. When nothing under that folder changed, or the mapping stays unclear, the full suite runs.

Pass `all` for every test, a crate name for one package, or a crate name plus a test name for a single function. On a red run the skill reads the error output, fixes the code or the test itself, and repeats the suite.

It shells out to `cargo nextest`, so nextest has to be on your machine already. The extra line for spotting undefined behavior is `cargo +nightly miri test`, and that one needs a nightly toolchain.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add RediSearch/RediSearch --skill run-rust-tests -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/run-rust-tests/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/run-rust-tests/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add RediSearch/RediSearch --skill run-rust-tests -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/run-rust-tests/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add RediSearch/RediSearch --skill run-rust-tests -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/run-rust-tests/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install RediSearch/RediSearch .skills/run-rust-tests/SKILL.md
```

2. **Manually: put the files in place**
- File: `.github/skills/run-rust-tests/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add RediSearch/RediSearch --skill run-rust-tests -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/RediSearch/RediSearch --path .skills/run-rust-tests
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/run-rust-tests/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add RediSearch/RediSearch --skill run-rust-tests -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/RediSearch/RediSearch/tree/HEAD/.skills/run-rust-tests/SKILL.md

## When to use it
- run tests only for the crates your edit touched
- re-run one named test inside a crate
- fix a failing test and confirm it passes
- run the whole Rust suite before a commit
- hunt undefined behavior with miri

## Example prompts
- Run `/run-rust-tests` now that I've finished editing `src/redisearch_rs/`.
- Run `/run-rust-tests all` and show me the failures.
- Run `/run-rust-tests hyperloglog test_merge` and fix it if the test is red.

## Similar
- [rust-security](https://affpapa.org/en/nevibecode/skills/rust-security.md) — skill · 696 installs
- [rust-engineer](https://affpapa.org/en/nevibecode/skills/sammcj-rust-engineer.md) — skill · ★ 173 repo stars
- [rust-best-practices](https://affpapa.org/en/nevibecode/skills/rust-best-practices.md) — skill · 23400 installs
- [rust-write-tests](https://affpapa.org/en/nevibecode/skills/rust-write-tests.md) — skill · 257 installs
- [rust-sanitizers-miri](https://affpapa.org/en/nevibecode/skills/rust-sanitizers-miri.md) — skill · 667 installs
- [rust-unit-tests](https://affpapa.org/en/nevibecode/skills/rust-unit-tests.md) — skill · ★ 720 repo stars

From the same set: [redisearch/redisearch](https://affpapa.org/en/nevibecode/by/redisearch/redisearch.md) — 4 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
