# Show HN: Rust Doctor, a code health scanner for Cargo workspaces

> Source: <https://github.com/arthjean/rust-doctor>
> Published: 2026-08-19 20:29:42+00:00

Your agent writes bad Rust, this catches it.

Rust Doctor scans your Cargo workspace with 62 curated rules and finds issues across security, correctness, reliability, performance, maintainability, and dependencies. It ends on a score out of 100 and the three rules worth fixing first.

Works on any Cargo workspace - a single binary crate, a library, a virtual workspace with dozens of members, you name it.

Everything runs locally: no network, no upload, no telemetry. Inspect trusted local workspaces only, since Cargo runs the build scripts and procedural macros of whatever it compiles. [Limits →](https://rust-doctor.com/docs/limitations)

Run this at your workspace root to get an audit.

```
npx rust-doctor@latest
```

Once you have an audit, install the skill so your coding agent fixes what it found. The skill teaches it which finding to repair first, how the score is capped, and what to look for in a file the scan already flagged.

```
npx rust-doctor@latest skill install
```

This writes `.claude/skills/rust-doctor/`

for Claude Code, from the binary rather than the network, and never over an existing skill.

For a one-off handoff instead, the report sends the findings straight to an agent, with the rules, their spans, and the scan scope already written into the prompt.

```
rust-doctor          # then pick "Hand off to an agent"
```

Works with Claude Code, Codex, and Cursor, and copies the same context to your clipboard for any other agent.

Rust Doctor reviews every pull request and reports only the issues your change introduced, not your existing backlog. Set it up from the report menu:

```
rust-doctor          # then pick "Add to GitHub Actions"
```

This writes `.github/workflows/rust-doctor.yml`

, pinned to the version that wrote it, and never overwrites an existing file. The gate exits non-zero only when a diagnostic reaches the blocking level, which you change anytime with `--blocking`

.

You can configure which rules to run and how to run them in `rust-doctor.toml`

, or from the command line.

```
rust-doctor --rule clippy::unwrap_used=off
rust-doctor --category performance=error
```

The CLI reports nothing to anyone. No network call, no upload, no telemetry, no crash reporting, and nothing to opt out of. The binary carries no HTTP client and no analytics dependency.

A `--json`

report stays inside your workspace and carries only:

- Diagnostics: rule id, category, severity before and after policy, and a workspace-relative path with its span
- Score: the number, its dimensions, the gate verdict, and the rules withheld from the ranking
- Errors: which pass failed and why, when one did

No absolute path, no environment variable, no user data.

MIT OR Apache-2.0, at your option. See [LICENSE-MIT](/arthjean/rust-doctor/blob/main/LICENSE-MIT) and
[LICENSE-APACHE](/arthjean/rust-doctor/blob/main/LICENSE-APACHE).
