rust-unit-tests — Claude Code skill: what it does, how to install
rust-unit-tests is a Claude Code skill that writes and improves Rust unit tests within the codebase. It assists when handling data transformations or fixing reproducible bugs.
AGPL-3.0 ★ 720 updated 2026-11-10
npx skills add dominikmartn/harp --skill rust-unit-tests -a claude-codeWhat rust-unit-tests does
This skill guides the creation of crate-level unit tests for deterministic logic and pure data processing. It enforces the use of specific test files like _tests.rs or mod_test.rs while ensuring tests exercise public APIs rather than internal state.
The skill discourages change-detector tests and promotes state-based assertions to keep the test suite maintainable. It suggests separating logic from I/O layers to facilitate unit testing without heavy mocking.
The tool assumes a standard Rust project environment. It is not designed for GUI rendering, PTY timing, or integration scenarios where internal shell wiring is the primary concern.
What it helps with
- generate unit tests for data transformation logic
- verify edge cases for parser functions
- create a failing test for a bug
- refactor code into testable pure functions
Example prompts for the agent
- Create a unit test for the function in
parser.rs - Add edge case coverage to
domain_logic_tests.rs - Update tests to verify system state via public API
How to install rust-unit-tests
1Skills CLI (Vercel)
npx skills add dominikmartn/harp --skill rust-unit-tests -a claude-code2Manually: put the files in place
~/.claude/skills/rust-unit-tests/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/rust-unit-tests/
1Skills CLI (Vercel)
npx skills add dominikmartn/harp --skill rust-unit-tests -a codex2Manually: put the files in place
.agents/skills/rust-unit-tests/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dominikmartn/harp --skill rust-unit-tests -a cursor2Manually: put the files in place
.cursor/skills/rust-unit-tests/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dominikmartn/harp .agents/skills/rust-unit-tests2Manually: put the files in place
.github/skills/rust-unit-tests/SKILL.md1Skills CLI (Vercel)
npx skills add dominikmartn/harp --skill rust-unit-tests -a gemini-cli2Platform CLI
gemini skills install https://github.com/dominikmartn/harp --path .agents/skills/rust-unit-testsManually: put the files in place
.devin/skills/rust-unit-tests/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about rust-unit-tests
How to install rust-unit-tests in Claude Code?
Run npx skills add dominikmartn/harp --skill rust-unit-tests -a claude-code. The skill configuration is then accessible at ~/.claude/skills/rust-unit-tests/SKILL.md.
What does rust-unit-tests do?
It assists the agent in writing concise, diagnosable Rust unit tests by enforcing proper test file structure and behavior-driven naming conventions.
When should you use this skill?
Use it for testing isolated logic and data transformations. For GUI rendering, shell integration, or cross-process behaviors, rely on the project's higher-level integration testing tools instead.