# Remove unused Rust dependencies before they quietly bloat builds and reviews with cargo-machete

> Use cargo-machete when an agent needs to find and remove unused Rust dependencies before they keep inflating build time, review noise, and manifest drift.

- Skill: `agentskillexchange/remove-unused-rust-dependencies-before-they-quietly-bloat-bu` (Agent Skill)
- Install (CLI): `npx skillmds@latest add agentskillexchange/remove-unused-rust-dependencies-before-they-quietly-bloat-bu`
- Raw SKILL.md: https://api.skillmd.com/api/skills/agentskillexchange/remove-unused-rust-dependencies-before-they-quietly-bloat-bu/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: agentskillexchange (https://skillmd.com/u/agentskillexchange)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/agentskillexchange/remove-unused-rust-dependencies-before-they-quietly-bloat-bu

---


# Remove unused Rust dependencies before they quietly bloat builds and reviews with cargo-machete

Use cargo-machete when an agent needs to find and remove unused Rust dependencies before they keep inflating build time, review noise, and manifest drift.

## Prerequisites

Rust toolchain, Cargo project, and shell access for dependency scans and cleanup edits.

## Installation

Use the upstream install or setup path that matches your environment:
- cargo-machete is a Cargo tool that detects unused dependencies in Rust
- cargo install cargo-machete
- Run cargo-machete in a directory that contains one or more Rust projects (using Cargo for
- cargo machete /absolute/path/to/my/directory

Requirements and caveats from upstream:
- ## Docker Image
- A docker image for cargo machete.

Basic usage or getting-started notes:
- dependency management):
- bash
- cd my-directory && cargo machete

- Source: https://github.com/bnjbvr/cargo-machete
- Extracted from upstream docs: https://raw.githubusercontent.com/bnjbvr/cargo-machete/HEAD/README.md

## Documentation

- https://github.com/bnjbvr/cargo-machete#readme

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/remove-unused-rust-dependencies-before-they-quietly-bloat-builds-and-reviews-with-cargo-machete/)

