rust-testing
Skill0 starsChanged 5 days agoApache-2.0View on GitHub
Behavior. Use when writing or reviewing Rust tests: assertions, proving layer, real dependencies, time control, and defect detection.
44 other projects use a version of this.
Adopted by
Most recently taken up by
- KevinLoichot/everything-claude-codetheir own version, first seen Nov 29, 2026
- aayushsoam/clawbot-plustheir own version, first seen Nov 29, 2026
- multiplex-ai/muggle-ai-teamstheir own version, first seen Nov 29, 2026
- rewrite-rs/skillstheir own version, first seen Nov 29, 2026
- satvikgbusiness-jpg/Claude-skillstheir own version, first seen Nov 29, 2026
- leileigwl/claude-skillstheir own version, first seen Nov 29, 2026
Used with
Projects with it also use rust-cli, rust-api-design and 6 more.
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.
tumfSkillrust-cli
Design and implementation guidance for maintainable Rust CLIs with strong ergonomics, machine-friendly behavior, testable structure, and release automation. Use when creating or refactoring a Rust command-line tool, choosing crates like clap/anyhow/tracing/serde_json, improving command UX, adding JSON output, tightening test/release workflows, or making an existing CLI safer for agents and automation.
Also in 4 projects that use this
adxptivedSkillrust-api-design
Rust API Design guidelines, naming conventions, and best practices. Use when: - User is designing a library, crate, or public APIs - Implementing patterns like Builder, Typestate, or Extension traits - Designing public structures, enums, or traits - Working with common traits (From/Into, Default, AsRef, Debug, Clone) - Applying #[must_use] or #[non_exhaustive] attributes - Restricting trait implementation via Sealed Traits - Formatting naming structures and lifetime designs
Also in 3 projects that use this
dawidpereiraSkillrust-macros
Rust macros — macro_rules!, proc macros, derive macros, attribute macros, fragment specifiers, repetition, hygiene, cargo expand, when to use macros vs generics. Use when writing or debugging declarative or procedural macros, choosing between macros and other abstractions, understanding expansion errors, or generating repetitive code.
Also in 3 projects that use this
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 5 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 9 projects that use this
junimnjwSkillrust-patterns
Idiomatic Rust patterns, ownership, error handling, traits, concurrency, and best practices for building safe, performant applications.
Also in 4 projects that use this
Other versions44 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 44
- loulanyue/awesome-claude-notes★ 272same name
- Blushyes/reef★ 84same name
- Fmarzochi/EGC★ 61same name
- huiali/rust-skills★ 47same name
- rewrite-rs/skills★ 32same name
- Bitslix/BLXCode★ 15same name
- full-stack-skills/rust-skills★ 8same name
- gongyijie85/dsh-ecc★ 8same name
- FimawLLC/fimaw-skills★ 3same name
- aayushsoam/clawbot-plus★ 2same name
34 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 repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- rust-coderSkill
- rust-debuggingSkill
- rust-dependenciesSkill
- rust-errorsSkill
- rust-idiomaticSkill
- rust-performanceSkill
- rust-securitySkill
- rust-structural-qualitySkill
- rust-verificationSkill
- thermo-nuclear-code-quality-reviewSkill
- rust-modern-guidelinesSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 43 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Determinism: Keep output order, paths, and fingerprints independent of thread scheduling, filesystem iteration order, host path separators, …
“Common” is measured: kept by at least 6 in 10 of the 43 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
Behavior first. Name the observable contract a defect would break, select the smallest layer able to watch it fail, and assert concrete user-visible outcomes (reported finding id and span, rendered replacement, .fixed.rs output, report JSON, stderr bytes, exit code, or untouched working tree) against independent expected values.
Smallest proving layer. Match the harness to the boundary under test: unit tests beside pure logic in cargo-modernize-core, paired catalog fixtures (<id>.rs with //~ <id> markers and <id>.fixed.rs) plus a negative twin for every rule, metamorphic property tests (metamorphic_proptest.rs) for matcher and renderer invariants, and binary-level tests in crates/cargo-modernize/tests over tempfile workspaces for discovery, MSRV/edition resolution, --diff, --verify, --fix, --check, and exit codes. Assert public behavior so internal refactors stay green.
Real inputs versus doubles. Exercise real cargo, git, and parser behavior whenever their semantics belong to the claim (generated workspaces, real repositories for VCS diffs, real cargo check for --verify/--fix); reserve doubles such as the test-only panic detector for injected faults. Cover every supported edition (2015–2024), no_std/alloc/std variants, MSRV boundaries one release below and at requires, and const and macro contexts when a rule's admission depends on them.
Determinism. Keep output order, paths, and fingerprints independent of thread scheduling, filesystem iteration order, host path separators, and environment; normalize only what the contract declares unstable, and never sleep to synchronize.
Defect reproduction and discovery. Organize tests by behavior with small fixtures and explicit boundary limits. Reproduce bugs with a failing test first, verify non-zero executed test counts, and use cargo mutants, property tests, Miri, cargo xtask stress-ui, or fuzzing selectively as discovery aids rather than mandatory gates.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

