smithery.ai

rust

Rust development guidelines and workflow

First seen Mar 19, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,784 B
  • docs SUMMARY.md 52 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 16 installs

SKILL.md

Rust Development

Target Maintenance (on skill load)

Once per session, if target/ exists:

du -sh target && find target -type f -mtime +30 -print -quit

If size > ~1 GB AND find printed a path (it stops at the first hit): run cargo clean before building (the bloat is orphaned artifacts from old toolchains). Otherwise leave the warm cache alone. A rebuild resets the 30-day clock, so this self-limits.

Commands

  • cargo build - Build (debug only)
  • cargo test - Run tests
  • cargo fmt - Format code (run after changes)
  • cargo clippy - Lint (run after changes)

Dependencies

  • MUST use cargo add <crate> to add dependencies - never manually edit Cargo.toml for dependencies
  • ALWAYS ask the user for approval before adding any new dependency
  • Only suggest well-known, widely-used crates with good maintenance records
  • Prefer crates from the Rust ecosystem's trusted maintainers (e.g., tokio-rs, serde-rs, rust-lang)
  • Check crate download counts and recent activity as indicators of reliability
  • ALWAYS run cargo audit after adding a new dependency
  • ALWAYS report any vulnerabilities or issues from cargo audit to the user - never silently ignore audit results

Toolchain

  • Prefer stable Rust
  • Use nightly only if required

Style

  • Minimal comments, self-documenting code
  • Concise implementations
  • Discuss large refactors before starting

Error Handling

  • Use judgment: unwrap/expect OK when clearer
  • Match on errors when recovery is needed

Testing

  • Unit tests with #[cfg(test)] module when asked
  • Integration tests in separate files

Build

  • NEVER make release builds (--release)
  • Always use debug builds