Skip to main content
skill CX Codex

write-rust-tests — Claude Code skill: tests and setup

The write-rust-tests skill writes Rust tests for public APIs, edge cases, errors, and branches. Use it when a Rust crate needs targeted coverage.

no license ★ 6,244 updated 2026-10-29

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add RediSearch/RediSearch --skill write-rust-tests -a claude-code
Open on GitHub

What write-rust-tests does

The skill creates tests for a Rust file, crate, or directory. It can work with several paths at once; a directory makes the skill consider the Rust files inside it. A path without src/ is resolved under src/redisearch_rs, so numeric_range_tree points to that module location.

Before adding a test, it checks which new branch or execution path the case would cover. Inputs that leave control flow unchanged are treated as duplicates, and simple Default or From delegations are skipped when the constructor already exercises them. Coverage gaps can be inspected with check-rust-coverage, while test structure follows rust-tests-guidelines.

A file, crate, or directory path is required so the skill knows which Rust code to examine.

What it helps with

  • write tests for a Rust crate or file
  • cover public APIs and edge cases
  • exercise error branches
  • inspect uncovered lines with check-rust-coverage
  • remove tests that duplicate existing paths

Example prompts for the agent

  • Use write-rust-tests to add tests for src/redisearch_rs/numeric_range_tree.
  • Apply write-rust-tests to src/redisearch_rs/query.rs and cover its error cases and edge conditions.
  • Run write-rust-tests on src/redisearch_rs without adding tests for branches already covered.

How to install write-rust-tests

1Skills CLI (Vercel)

npx skills add RediSearch/RediSearch --skill write-rust-tests -a claude-code

2Manually: put the files in place

~/.claude/skills/write-rust-tests/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/write-rust-tests/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about write-rust-tests

How do I install write-rust-tests in Claude Code?

Run npx skills add RediSearch/RediSearch --skill write-rust-tests -a claude-code. The installed skill file is then available at ~/.claude/skills/write-rust-tests/SKILL.md.

What does the write-rust-tests skill do?

It adds Rust tests for public APIs, edge cases, errors, and uncovered branches. It checks each proposed case against existing coverage to avoid duplicate scenarios.

Which paths can write-rust-tests handle?

It accepts a file, crate, directory, or several paths. Paths without src/ are resolved under src/redisearch_rs, and a directory covers the Rust files it contains.

Similar skills

All skills for Testing and QA →

From the same set4

Project sponsors

Companies that keep this analytics open