rust-doctor: Skill for Claude Code

.claude/skills/rule-candidate/SKILL.md

rule-candidate is a skill for Claude Code from arthjean/rust-doctor. It costs 99 tokens per session (1,417 once invoked), scanned A, original, Apache-2.0.

A workflow for reviewing candidate Rust Clippy lints, which are automated checks that identify possible code problems. It decides which candidate checks should enter the project's lint catalogue.

In plain words
What is it for?
Use it to inspect the next batch of candidate lints, research what each check does, and record reasons for accepting or rejecting them.
Why use it?
It turns an unreviewed queue of compiler checks into documented decisions before any rule is added.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is arthjean/rust-doctor's own configuration. It tells Claude Code how to work on rust-doctor itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything rust-doctor configures →

Reuse

Borrowing it

Nothing to install: this file belongs to arthjean/rust-doctor. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/arthjean/rust-doctor/main/.claude/skills/rule-candidate/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/arthjean/rust-doctor

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rule-candidate

README.md
[![agentmods](https://agentmods.dev/badge/skills/arthjean/rust-doctor/rule-candidate/github.svg)](https://agentmods.dev/skills/arthjean/rust-doctor/rule-candidate)
Your own site
<a href="https://agentmods.dev/skills/arthjean/rust-doctor/rule-candidate"><img src="https://agentmods.dev/badge/skills/arthjean/rust-doctor/rule-candidate/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rule-candidate

Your own site · 80×15
<a href="https://agentmods.dev/skills/arthjean/rust-doctor/rule-candidate"><img src="https://agentmods.dev/badge/skills/arthjean/rust-doctor/rule-candidate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,417 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 40
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00099 $0.01417
Opus 5 $0.00049 $0.00709
Sonnet 5 $0.00020 $0.00283
Haiku 4.5 $0.00010 $0.00142

Measured 9d ago against content hash 98d173534752, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

rule-candidate scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -sSL -o clippy.tar.gz \
.claude/skills/rule-candidate/SKILL.md · 133 lines

How it starts

The opening of the file, as written. The whole thing — 133 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Triage a batch of candidate lints

The upstream side of this catalog is finite: clippy-driver -W help enumerates every lint of the toolchain. Triage walks that list in batches and turns each lint into one of three states. Nothing here edits the catalog; retaining a lint only hands it to rule-admit.

Read the "Admitting a rule" and "The candidate queue" sections of docs/catalog-and-corpus.md before starting.

Step 1: Read the queue

cargo test --lib policy::coverage -- --nocapture

The run prints universe N, decided N, queue N and then the queue itself, one lint per line as level, id, groups. Take the batch off the top unless the user named a theme. The head is the warned lints, and that order is deliberate: they already reach the user's report uncatalogued, with no category, no tier and no help, and they cost the score its authoritative flag.

Default batch size is 20. Announce the batch before working it.

Step 2: Decide each lint

Fetch what the lint actually does. The toolchain carries the one-line description, and the rationale lives in the lint declaration itself, never in memory. The published lints.json no longer resolves, so read the source: pull the Clippy tree once per session into a scratch directory and extract every declare_clippy_lint! doc comment, which gives "What it does", "Why is this bad?" and "Known problems" for all lints at once.

curl -sSL -o clippy.tar.gz \
  https://github.com/rust-lang/rust-clippy/archive/refs/heads/master.tar.gz
tar xzf clippy.tar.gz --strip-components=1 --wildcards "*/clippy_lints/src/*"

That tree is master, not the pinned toolchain. The wording of a stable lint rarely moves, but check the toolchain's own one-line description when the two seem to disagree.

Three outcomes, and only two of them are edits.

Reject when the lint should never ship, for a reason that holds whatever workspace is scanned. Append to src/policy/rejected.json, sorted by id, with a closed class and one written sentence ending in a period:

Read the full file on GitHub · 133 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 133 lines · 99 tokens per session scan A 98d173534752

Subscribe to this mod's changes

rule-candidate is a skill published in the GitHub repository arthjean/rust-doctor (18 stars, last pushed 2d ago), licensed Apache-2.0. It adds 99 tokens to every session and 1,417 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.