rust-testing
Skill0 starsChanged 2 months agoMITView on GitHub
Guides agents through authoring, running, and debugging Rust tests with cargo test, test filters, and #[should_panic].
29 other projects use a version of this.
Adopted by
Most recently taken up by
- Rojios/everything-claude-codetheir own version, first seen Nov 8, 2026
- ahmadvahidi/skill-atlastheir own version, first seen Nov 8, 2026
- damacus/agent-skillstheir own version, first seen Nov 1, 2026
- Blushyes/reeftheir own version, first seen Nov 1, 2026
- jniltinho/macos-kvm-guitheir own version, first seen Oct 25, 2026
- renepf/claude-skillstheir own version, first seen Oct 25, 2026
Used with
Projects with it also use rust-async-patterns and rust-best-practices.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
klauswgSkillrust-async-patterns
Master Rust async programming with Tokio, async traits, error handling, and concurrent patterns. Use when building async Rust applications, implementing concurrent systems, or debugging async code.
Also in 4 projects that use this
MicrosoftSkillrust-best-practices
Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook. Use this skill when: (1) writing new Rust code or functions, (2) reviewing or refactoring existing Rust code, (3) deciding between borrowing vs cloning or ownership patterns, (4) implementing error handling with Result types, (5) optimizing Rust code for performance, (6) writing tests or documentation for Rust projects.
Also in 7 projects that use this
Other versions29 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 29
- loulanyue/awesome-claude-notes★ 272same name
- Blushyes/reef★ 84same name
- Fmarzochi/EGC★ 61same name
- huiali/rust-skills★ 47same name
- Bitslix/BLXCode★ 15same name
- full-stack-skills/rust-skills★ 8same name
- gongyijie85/dsh-ecc★ 8same name
- aphrody-code/bxc★ 2same name
- damacus/agent-skills★ 2same name
- idexal/idexal-skills★ 2same name
19 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository49 other files it gives its agents.
- bug-reproducerSkill
- claim-checkerSkill
- command-failure-diagnoserSkill
- config-risk-reviewerSkill
- csv-validatorSkill
- deployment-checklist-makerSkill
- diff-reviewerSkill
- factual-summarizerSkill
- field-extractorSkill
- api-contract-testerSkill
- database-migration-helperSkill
- security-vulnerability-fixerSkill
- git-commit-stagerSkill
- git-conflict-resolverSkill
- github-actions-debuggerSkill
- github-issue-triagerSkill
- github-pr-creatorSkill
- github-pr-reviewerSkill
- go-code-qualitySkill
- go-lint-and-vetSkill
- go-testingSkill
- json-schema-converterSkill
- lint-and-typecheckSkill
- meaning-preserving-editorSkill
- meeting-notes-to-actionsSkill
- minimal-bug-fixSkill
- option-comparatorSkill
- py-code-qualitySkill
- py-lint-and-typecheckSkill
- py-testingSkill
- readme-writerSkill
- regression-test-writerSkill
- release-notes-drafterSkill
- repo-inspectorSkill
- research-briefSkill
- reversible-cleanup-plannerSkill
- rust-clippy-checkSkill
- rust-code-qualitySkill
- small-refactorSkill
- status-updateSkill
- step-by-step-tutorialSkill
- step-decomposerSkill
- tabular-analyzerSkill
- task-briefSkill
- test-runner-debuggerSkill
- ts-code-qualitySkill
- ts-lint-and-typecheckSkill
- ts-testingSkill
- skill-templateSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 3 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 28 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Use this skill when:
- Very specific: line 20
Do not use for linting; use rust-clippy-check.
- Very specific: line 26
If test_name is missing: run all tests in package via cargo test.
- Very specific: line 27
Never comment out assert_eq!
- Distinctive: line 30
Follow these numbered actions:
- Very specific: line 34
Read panic trace (left: X, right: Y).
- Very specific: line 43
If testing expected panics: annotate with #[should_panic(expected = "message")].
- Distinctive: line 70
Stop and ask the user when:
“Common” is measured: kept by at least 6 in 10 of the 28 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Rust Testing (cargo test)
Guides agents through executing, isolating, and debugging Rust unit tests, integration tests (tests/), and documentation tests using cargo test.
1. Purpose
Execute and debug Rust tests. A "Unit Test" resides in src/ annotated with #[test]. An "Integration Test" resides in tests/.
2. When to Use
Use this skill when:
- Running Rust test suites (
cargo test). - Filtering by test function name (
cargo test <name>). - Viewing stdout in passing or failing tests (
cargo test -- --nocapture).
3. When Not to Use
- Do not use for linting; use
rust-clippy-check.
4. Required Inputs
test_name: Name or substring of the test to run.
5. Missing-Input Behavior
- If
test_nameis missing: run all tests in package viacargo test. - Never comment out
assert_eq!to hide test failures.
6. Procedure
Follow these numbered actions:
- Action 1: Run Targeted Test
- Execute:
cargo test <test_name> -- --nocapture
- Execute:
- Action 2: Inspect Panic or Assertion Message
- Read panic trace (
left: X, right: Y).
- Read panic trace (
- Action 3: Trace and Modify Source Code
- Edit source logic to satisfy test contract.
- Action 4: Re-Run Targeted Test
- Confirm
test <name> ... ok.
- Confirm
- Action 5: Run Full Test Suite
- Execute
cargo test.
- Execute
7. Decision Rules
- If testing expected panics: annotate with
#[should_panic(expected = "message")]. - For integration tests: run
cargo test --test <integration_test_file>.
8. Output Format
Emit the report using this template:
### Rust Test Report: [Test Name]
- **Command**: `cargo test [test_name]`
- **Status**: [ok | FAILED]
- **Passed**: [Count] | **Failed**: [Count]
#### Resolution Notes
- [Root cause and fix description]9. Verification Checklist
cargo testexits with code 0.- No assertions commented out.
- Compiler warnings addressed.
10. Common Failures and Recovery
| Failure Symptom | Cause | Recovery Action |
thread panicked at assertion failed: left == right | Logic mismatch | Inspect evaluated values; correct algorithm. |
11. Stop or Escalation Conditions
Stop and ask the user when:
- Tests require external C libraries (linking errors).
12. Examples
Example 1: Successful Execution
Input:
Test: test_parse_headerOutput:
### Rust Test Report: test_parse_header
- **Command**: `cargo test test_parse_header -- --nocapture`
- **Status**: ok
- **Passed**: 1 | **Failed**: 0
#### Resolution Notes
- Fixed off-by-one slice index in header parser.Example 2: Ambiguous or Missing Input
Input:
Test rust.Output:
### Rust Test Report: Running Full Suite
- **Command**: `cargo test`
- **Status**: ok
- **Passed**: 12 | **Failed**: 0Example 3: Expected Final Output
Output:
### Rust Test Report: test_token_expiration
- **Command**: `cargo test test_token_expiration`
- **Status**: ok
- **Passed**: 1 | **Failed**: 0Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

