cargo-machetelisted
Install: claude install-skill martineserios/thebrana
# cargo-machete - Unused Dependency Detection
Detect and remove unused dependencies in Rust projects using cargo-machete.
## When to Use This Skill
| Use this skill when... | Use X instead when... |
|------------------------|----------------------|
| Auditing for unused dependencies | Checking for outdated deps -- use `cargo outdated` |
| Cleaning up Cargo.toml | Auditing security vulnerabilities -- use `cargo audit` |
| Optimizing build times by removing bloat | Checking license compliance -- use `cargo deny` |
| Verifying deps in CI | Need nightly-accurate analysis -- use `cargo +nightly udeps` |
## Context
- Cargo.toml: !`find . -maxdepth 1 -name \'Cargo.toml\'`
- Workspace: !`grep -q '\[workspace\]' Cargo.toml`
- cargo-machete installed: !`cargo machete --version`
- Machete config: !`find . -maxdepth 1 -name \'.cargo-machete.toml\'`
- Workspace members: !`grep -A 20 '^\[workspace\]' Cargo.toml`
## Execution
Execute this unused dependency analysis:
### Step 1: Verify installation
Check if cargo-machete is installed (see Context above). If not installed, install it:
```bash
cargo install cargo-machete
```
### Step 2: Run dependency analysis
Run cargo-machete with metadata for detailed output:
```bash
# Single crate
cargo machete --with-metadata
# Workspace (if Context shows workspace)
cargo machete --workspace --with-metadata
```
### Step 3: Evaluate results
Review the output and classify each finding:
| Finding | Action |
|---------|--------|
| Genuinely u