smithery.ai

write-rust-tests

Write Rust tests to verify correctness of Rust code. Use this when you want to write Rust tests.

First seen Apr 16, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,769 B
  • docs SUMMARY.md 76 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 3 installs

SKILL.md

Write Rust Tests

Write new Rust tests for Rust code.

Arguments

  • <path>: Path to the Rust crate or file.
  • <path 1> <path 2>: Multiple crate/file paths.

If a path doesn't include src/, assume it to be in the src/redisearchrs directory. E.g. numericrangetree becomes src/redisearchrs/numericrangetree. If a path points to a directory, consider all Rust files in that directory.

Guidelines

The generated tests must follow the guidelines outlined in [/rust-tests-guidelines](../rust-tests-guidelines/SKILL.md).

What to test

Ensure that all public APIs are tested thoroughly, including edge cases, error conditions and branches. Use [/check-rust-coverage](../check-rust-coverage/SKILL.md) to determine which lines are not covered by tests.

Avoiding redundant tests

Before writing each test, explicitly identify which branch or code path it will cover that no existing test already covers. An uncovered line is not sufficient justification — ask why it is uncovered and whether it is reachable through an already-tested entry point.

Two tests are redundant if they exercise the same set of branches in the code under test. Differing only in input values that don't change control flow is not a distinct scenario.

Do not write standalone tests for:

  • Trivial trait delegationsDefault, From, or similar trait impls that are single-line delegations to an already-tested constructor, since they will be covered transitively.

After adding tests, double check that every new test covers at least one branch that no other test (existing or new) covers. Remove any that don't.