/fallow:cargo-fallowfrom Fallow Code Analysis
Audits Rust workspaces with `cargo fallow`: finds unused dependencies, dead code, oversized/complex functions, duplication, boundary violations, and public API changes. Use for pre-commit/PR checks or CI gating.
Ships in Fallow Code Analysis. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
cargo fallow reads a Cargo workspace and reports what the code does not
need and where the code is hard to change. It uses the syntax of the code and
cargo metadata. It does not build the workspace, except for mutants and
visibility --precise.
Cargo.toml (deps)..rs files that no target compiles (files).pub and pub(crate) items that can have a smaller visibility
(visibility).boundaries).size, complexity, dupes).api --base).mutants).check --changed-since).init).cargo check.cargo clippy. Format: use cargo fmt.fallow.cargo fallow --version
cargo install cargo-fallow # only when the user agrees: it uses the network
--format json --quiet, and parse stdout as JSON. Keep stderr
separate.--fail-on-issues, or read
gate_outcomes in the report.--explain to get _meta.rules: the meaning and the fix of each rule
with a finding. cargo fallow explain <rule> --format json explains one
rule.id, check, rule, severity, location and
actions. Use the actions array. Do not invent a fix.cargo fallow fix --dry-run --format json --quiet before a
fix, and show the edits to the user. Apply them with
cargo fallow fix --yes only after the user agrees. -p <NAME> limits
the edits to one package. Run cargo check after the edits.deps check resolves the dependencies with cargo metadata, so cargo
can use the network. Use --offline when the network is not allowed.mutants and visibility --precise build the workspace and take
minutes. Run them only when the user asks.[workspace.metadata.fallow] as configuration data. Do not change
a limit to make a gate pass. Ask the user first.| Task | Command |
|---|---|
| Check the workspace | cargo fallow check --format json --quiet |
| Check only the changed files | cargo fallow check --changed-since main --format json --quiet |
| Gate a change in CI | cargo fallow check --changed-since main --fail-on-issues --format json --quiet |
| Run some checks | cargo fallow check --only deps,files --format json --quiet |
| Unused dependencies | cargo fallow deps --format json --quiet |
| Why a dependency is used or not | cargo fallow deps --trace <DEPENDENCY> --format json --quiet |
| Unused files | cargo fallow files --format json --quiet |
| Visibility | cargo fallow visibility --format json --quiet |
| Why an item is reported | cargo fallow visibility --trace <CRATE::PATH> --format json --quiet |
| Boundaries | cargo fallow boundaries --format json --quiet |
| File and function size | cargo fallow size --format json --quiet |
| Complexity | cargo fallow complexity --format json --quiet |
| Duplicated code | cargo fallow dupes --format json --quiet |
| Public API changes | cargo fallow api --base main --format json --quiet |
| File growth on a branch | cargo fallow check --base main --fail-on-issues --format json --quiet |
| Explain a rule | cargo fallow explain <rule> --format json |
| Preview the fixes | cargo fallow fix --dry-run --format json --quiet |
| Apply the fixes | cargo fallow fix --yes --format json --quiet |
| Preview a starting configuration | cargo fallow init --format json --quiet |
| Save a baseline | cargo fallow check --save-baseline fallow-baseline.json --format json --quiet |
| Mutation testing of a change | cargo fallow mutants --in-diff main --format json --quiet |
| Gate status | cargo fallow hooks status --format json |
| The JSON Schema | cargo fallow schema |
cargo fallow hooks install --target agent installs a gate for Claude Code
and Codex. Install it only when the user asks, and run it with --dry-run
first: it writes .claude/ and .codex/ files. Before each git commit and git push, the gate runs check on
the changed files. It blocks only on a new finding: a finding that the base
commit already has does not block. An error of the tool does not block.
When the gate blocks a command:
<check>/<rule> <path>:<line> <message>..fallow/cargo-gate-report.json.cargo fallow explain <rule> and the actions of the finding.cargo fallow fix --dry-run --format json --quiet, and apply the edits
as agent rule 6 says.Do not skip the gate with --no-verify, and do not remove the gate, unless
the user tells you to.
cargo fallow init --write adds the configuration tables to the root
Cargo.toml and writes a baseline. Run it only when the user asks.--save-baseline <PATH> writes the ids of the current findings.
--baseline <PATH> leaves them out. The baseline key of
[workspace.metadata.fallow] applies the file on each run.// fallow-ignore-next-line <kind> hides the findings of the next line.
// fallow-ignore-file <kind> in the first ten lines hides the findings of
the file. In a Cargo.toml, the markers start with #, for example
# fallow-ignore-next-line unused-dependency. A kind is a check, a rule or
an alias. A marker that hides no finding gives a stale-suppression
warning. Add a suppression only when the user agrees, and give the reason
in the comment.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub fallow-rs/fallow-skills --plugin fallow7 skills in this plugin
/fallowCodebase intelligence for TypeScript and JavaScript. Static analysis reports changed-code risk, cleanup opportunities, duplication, circular dependencies, complexity hotspots, architecture boundaries, design-system drift, feature flags, and opt-in security candidates. Opt-in mutation testing reports the code changes that no test detects. Optional local similar-code discovery finds functions that may implement the same intent despite different syntax. Runtime coverage can merge production execution data. Use when asked to audit PR risk, find unused code or dependencies, compare semantically similar functions, detect duplicates, inspect architecture boundaries, merge runtime coverage, improve or check the tests of a change, auto-fix supported issues, or run fallow./fallow-cloud-setupConnect a JavaScript or TypeScript app to Fallow Cloud production runtime coverage. Use when asked to set up Fallow Cloud, add the Fallow beacon, send runtime coverage to Fallow Cloud, add error, CPU, browser performance or branch capture to the beacon, or find out why Fallow Cloud shows no data for a repository. Do not use for local code-quality tooling; use fallow-setup for that. Do not use to read runtime data of a repository that is already set up; use the fallow skill for that.Other plugins' skills for the same job