morganlinton/BeautifulRust / skills/rust-best-practices
rust-best-practices
UnverifiedWrite idiomatic, robust, maintainable Rust. Use this skill whenever you write, review, refactor, debug, or explain Rust code: new crates, modules, functions, structs, traits, error types, async code, unsafe or FFI code, Cargo.toml, tests, or rustdoc. Trigger on any mention of Rust, cargo, crates, .rs files, the borrow checker, lifetimes, traits, clippy, or rustfmt, even when the user does not ask for "best practices" or "idiomatic" code. Synthesized from the Google Rust Style Guide, the Rust API Guidelines, Effective Rust, Rust Design Patterns, and Microsoft's Pragmatic Rust Guidelines.
evals/refactor-inventory-module/case.yaml
View on GitHubschema_version: "1.1"
name: refactor-inventory-module
context:
scaffold_script: place-files.sh
expected_outcome: |
A refactored inventory.rs that keeps the public behavior but fixes the
idiom problems in the original: the crate-level deny(warnings), Rc<RefCell>
leaking through the public API, &String and &Vec parameters, unwrap on
fallible paths (file read, parse, map lookup), the get_ prefix on a getter
that clones, the bool parameter on report, string concatenation with +,
check-then-unwrap, an error enum without Display or std::error::Error, and
nondeterministic HashMap iteration in report. CHANGES.md lists the changes
with a one-line reason each.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |