diagnose

diagnose is a command for Claude Code from FlorianBruniaux/ccboard. It costs 28 tokens per session (842 once invoked), scanned A, original, MIT.

A Rust development check that examines the project, dependencies, build, and compiler feedback. Rust is a programming language, and Cargo is its tool for building Rust projects.

In plain words
What is it for?
Use it at the start of a session or when Rust errors appear. It checks Cargo status and compilation, can check for outdated dependencies, and may run Clippy to show warnings and errors.
Why use it?
It helps identify common problems after a code change or a git pull, such as missing dependencies, an outdated lock file, build failures, or a wrong working directory.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; names the AskUserQuestion tool.

Part of the ccboard plugin — 14 skills, 2 commands, 10 agents, 4 hooks, 2 MCP servers shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/florianbruniaux/ccboard/diagnose
Clone the repo
git clone --depth 1 https://github.com/FlorianBruniaux/ccboard

Made for: Claude Code.

Or install ccboard, the plugin that ships this one along with the rest of its 14 skills, 2 commands, 10 agents, 4 hooks, 2 MCP servers.

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 diagnose

README.md
[![agentmods](https://agentmods.dev/badge/commands/florianbruniaux/ccboard/diagnose.svg)](https://agentmods.dev/commands/florianbruniaux/ccboard/diagnose)
Your own site
<a href="https://agentmods.dev/commands/florianbruniaux/ccboard/diagnose"><img src="https://agentmods.dev/badge/commands/florianbruniaux/ccboard/diagnose.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 842 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00028 $0.00842
Opus 5 $0.00014 $0.00421
Sonnet 5 $0.00006 $0.00168
Haiku 4.5 $0.00003 $0.00084

Measured 6d ago against content hash 8991ec2d8247, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

diagnose scanned grade A with 0 findings 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 6d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/diagnose.md · 126 lines

How it starts

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

/diagnose

Check the development environment and suggest fixes.

When to use

  • Auto-suggested when Claude detects these error patterns:

    • error[E...] (rustc errors) → compilation failure
    • cannot find crate → missing dependency or cargo fetch needed
    • error: failed to run custom build command → build script failure
    • CARGO_MANIFEST_DIR issues → wrong working directory
    • thread 'main' panicked → runtime panic in dev
  • Manually after a git pull or at session start

Execution

1. Parallel checks

Run these commands in parallel:

# Git status
git status --short && git branch --show-current
# Cargo.lock freshness
if [ ! -f "Cargo.lock" ]; then
  echo "❌ MISSING: Cargo.lock"
elif [ "Cargo.toml" -nt "Cargo.lock" ]; then
  echo "⚠️ OUTDATED: cargo fetch or cargo build needed"
else
  echo "✅ OK: Cargo.lock"
fi
# Check compilation
cargo check --all 2>&1 | tail -5
# Check for outdated dependencies
cargo outdated --depth 1 2>/dev/null | head -15 || echo "(cargo-outdated not installed)"

2. Clippy (optional, if errors suspected)

cargo clippy --all-targets 2>&1 | grep -E "^error|^warning" | head -20

3. Test suite (optional, if regressions suspected)

cargo test --all 2>&1 | tail -10

Output format

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔍 Environment Diagnostic
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📦 Cargo.lock:    ✅ OK
🔧 cargo check:   ⚠️  3 errors (see below)
📎 Clippy:        ✅ OK
🧪 Tests:         ✅ OK (47 passed)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Suggested actions

Use AskUserQuestion if issues detected:

question: "Issues detected. Which fixes should I apply?"
header: "Fixes"
multiSelect: true
options:
  - label: "cargo fetch"
    description: "Fetch missing dependencies"
  - label: "cargo build --all"
    description: "Build all workspace crates"
  - label: "cargo clippy --all-targets --fix"
    description: "Auto-fix clippy lints"
  - label: "Fix all (recommended)"
    description: "cargo fetch && cargo build --all && cargo clippy --all-targets"

Read the full file on GitHub · 126 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. 6d ago First seen · 126 lines · 28 tokens per session scan A 8991ec2d8247

Subscribe to this mod's changes

diagnose is a command published in the GitHub repository FlorianBruniaux/ccboard (95 stars, last pushed 4d ago), licensed MIT. It adds 28 tokens to every session and 842 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.