# audit-dependencies

audit-dependencies audits dependency direction in Rust projects and flags layer violations. Use it when reviewing architecture or preparing a refactor.

- command · `type=command` · Claude Code, Codex, GitHub Copilot, Gemini CLI · ★ 1357 repo stars
- Author: Quintin Henry (https://github.com/qdhenry/)
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/qdhenry/Claude-Command-Suite/tree/HEAD/.claude/commands/rust/audit-dependencies.md
- Updated: 2026-03-01
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/commands/audit-dependencies

## What it does

This command examines how a Rust codebase links its Infrastructure, Adapters, Application, and Domain layers. It extracts crate imports, reviews external dependencies, checks the domain and application boundaries, and looks for adapter implementations of application ports.

It also inspects `Cargo.toml`, including workspace member dependencies, and can focus on a path or module supplied as an argument. The command works through `Read`, `Grep`, `Glob`, and `Bash`. It needs a Rust project with identifiable layers; without that structure, the audit has little architectural evidence to assess.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/commands/audit-dependencies.md` — Call it with /audit-dependencies. For all projects use ~/.claude/commands/

### Codex

**Manually: put the files in place**
- File: `~/.codex/prompts/audit-dependencies.md` — Call it with /prompts:audit-dependencies. Codex marks this format deprecated in favour of skills

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/prompts/audit-dependencies.prompt.md`

### Gemini CLI

**Manually: put the files in place**
- File: `.gemini/commands/audit-dependencies.toml` — Gemini stores commands as TOML: the prompt text goes into the prompt field

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/qdhenry/Claude-Command-Suite/tree/HEAD/.claude/commands/rust/audit-dependencies.md

## When to use it
- find outer-layer imports inside the domain
- spot direct database dependencies in application code
- map dependency flow across Rust layers
- check whether adapters implement application ports
- review workspace links in `Cargo.toml`

## Example prompts
- Run `/rust:audit-dependencies` to audit dependency direction across the Rust project.
- Focus the audit on `src/application/` with `/rust:audit-dependencies src/application/`.
- Use `/rust:audit-dependencies` to find imports that point from inner layers to outer ones.

## Similar
- [audit-and-reduce-dependencies](https://affpapa.org/en/nevibecode/skills/audit-and-reduce-dependencies.md) — skill · 3200 installs
- [dependencies-audit](https://affpapa.org/en/nevibecode/skills/dependencies-audit.md) — skill · 1900 installs
- [om-auto-audit-dependencies](https://affpapa.org/en/nevibecode/skills/om-auto-audit-dependencies.md) — skill · 614 installs
- [remove-unused-dependencies](https://affpapa.org/en/nevibecode/commands/remove-unused-dependencies.md) — command · ★ 96 repo stars
- [uv-advanced-dependencies](https://affpapa.org/en/nevibecode/skills/uv-advanced-dependencies.md) — skill · 332 installs
- [code-architecture-review](https://affpapa.org/en/nevibecode/skills/code-architecture-review.md) — skill · 270 installs

From the same set: [qdhenry/claude-command-suite](https://affpapa.org/en/nevibecode/by/qdhenry/claude-command-suite.md) — 112 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
