Rust Cleanup
Automatically removes unused dependencies and outdated code in Rust projects, improving build times and reducing bloat.
Install on your platform
We auto-selected Claude Code based on this skillβs supported platforms.
Run in terminal (recommended)
claude mcp add rust-cleanup npx -- -y @trustedskills/rust-cleanup
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"rust-cleanup": {
"command": "npx",
"args": [
"-y",
"@trustedskills/rust-cleanup"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
The rust-cleanup skill automates the process of cleaning up Rust project dependencies. It removes unused crates, updates outdated dependencies, and generally optimizes a Rust project's Cargo.toml file. This helps reduce build times, minimize binary sizes, and improve overall project health.
When to use it
- Large projects: Ideal for projects with many dependencies where manual cleanup is time-consuming and error-prone.
- Dependency bloat: Use when your
Cargo.tomlseems overly large or you suspect unused crates are present. - Build performance issues: If builds are slow, cleaning up dependencies can often contribute to faster compilation times.
- Reducing binary size: Removing unnecessary dependencies directly reduces the final executable's footprint.
Key capabilities
- Removes unused crates from
Cargo.toml. - Updates outdated Rust dependencies.
- Optimizes dependency versions.
Example prompts
- "Clean up my Rust project and remove any unused dependencies."
- "Update all the dependencies in my Cargo.toml to their latest compatible versions."
- "Optimize my Rust project's dependencies for size."
Tips & gotchas
The skill requires a valid Cargo.toml file to be present in the working directory. Itβs recommended to review the changes made by the tool before committing them, as aggressive cleanup could potentially break existing functionality if not carefully considered.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates β what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
π Community
Passed automated security scans.