Standardizes Rust development with best practices for dependency management, formatting, and testing.
Install
mkdir -p .claude/skills/rust-best-practice && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11998" && unzip -o skill.zip -d .claude/skills/rust-best-practice && rm skill.zipInstalls to .claude/skills/rust-best-practice
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
[Critical] Best practice for Rust coding. Always activate this skill before authoring Rust code or answering questions about Rust.Key capabilities
- →Use `cargo add` for dependencies
- →Run `cargo fmt` after modifying Rust source files
- →Run tests using `cargo test --all --workspace`
How it works
The skill instructs to use `cargo add` for dependencies, run `cargo fmt` for consistent formatting, and execute `cargo test --all --workspace` for testing after modifying Rust code.
Inputs & outputs
When to use rust-best-practice
- →Coding in Rust
- →Managing Rust dependencies
- →Formatting Rust source code
About this skill
Important dos and don'ts for working with Rust source code
- Use
cargo addto add new dependencies or features rather than editingCargo.tomldirectly - Before finishing your turn, when editing Rust code:
- Run
cargo fmtafter modifying Rust source files to ensure consistent formatting - Run tests (most commonly
cargo test --all --workspace, though some projects may have other commands)
- Run
When not to use it
- →When editing `Cargo.toml` directly to add dependencies
- →When not working with Rust source code
- →When the project has other commands for running tests
Limitations
- →Applies specifically to Rust coding practices
- →Requires `cargo add` for dependency management
- →Requires `cargo fmt` for code formatting
How it compares
This skill enforces specific best practices for Rust development, such as using `cargo add` and `cargo fmt`, to maintain code quality and consistency, unlike general coding instructions.
Compared to similar skills
rust-best-practice side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| rust-best-practice (this skill) | 0 | 3mo | No flags | Beginner |
| rust-tests-guidelines | 7 | 5mo | No flags | Beginner |
| check-rust-coverage | 5 | 5mo | Review | Beginner |
| check-code-quality | 1 | 29d | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
rust-tests-guidelines
RediSearch
Guidelines for writing Rust tests.
check-rust-coverage
RediSearch
Check which Rust lines are not covered by Rust tests.
check-code-quality
r3bl-org
Run comprehensive Rust code quality checks including compilation, linting, documentation, and tests. Use after completing code changes and before creating commits.
lint
RediSearch
Check code quality and formatting before committing changes
run-clippy
r3bl-org
Run clippy linting, enforce comment punctuation rules, format code with cargo fmt, and verify module organization patterns. Use after code changes and before creating commits.
move-code-quality
davila7
Analyzes Move language packages against the official Move Book Code Quality Checklist. Use this skill when reviewing Move code, checking Move 2024 Edition compliance, or analyzing Move packages for best practices. Activates automatically when working with .move files or Move.toml manifests.