diagnose

diagnose is a command for coding agents from xiaolai/cc-suite. It costs 33 tokens per session (1,160 once invoked), scanned A, original, ISC.

A project health check for the cc-suite setup. It examines the configuration, reports healthy and problematic parts, and identifies fixes that can be applied automatically or manually.

In plain words
What is it for?
Use it to check a cc-suite installation, review detected issues, apply available repairs, and run the check again to confirm the result.
Why use it?
It shows what is misconfigured or missing instead of requiring you to inspect each setup file yourself. It also distinguishes deliberately disabled tools from actual problems.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the cc-suite plugin — 13 skills, 39 commands, 4 agents, 3 hooks 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/xiaolai/cc-suite/diagnose
Clone the repo
git clone --depth 1 https://github.com/xiaolai/cc-suite

Or install cc-suite, the plugin that ships this one along with the rest of its 13 skills, 39 commands, 4 agents, 3 hooks.

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/xiaolai/cc-suite/diagnose.svg)](https://agentmods.dev/commands/xiaolai/cc-suite/diagnose)
Your own site
<a href="https://agentmods.dev/commands/xiaolai/cc-suite/diagnose"><img src="https://agentmods.dev/badge/commands/xiaolai/cc-suite/diagnose.svg" alt="Measured on agentmods" height="20"></a>
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,160 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 $0.00033 $0.01160
Opus 5 $0.00016 $0.00580
Sonnet 5 $0.00007 $0.00232
Haiku 4.5 $0.00003 $0.00116

Measured 4d ago against content hash e392912f22f6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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.

commands/diagnose.md · 80 lines

How it starts

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

CC-Suite Diagnose

All detection, classification, and repair mapping live in one structured engine: scripts/diagnose.py. This command is a thin wrapper — run the engine, render its report, apply the fixes it prescribes, then run it again and diff. Do not re-implement checks in prose here; if a check is missing or misclassified, the engine is where it gets fixed.

The engine contract

python3 "${CLAUDE_PLUGIN_ROOT}/scripts/diagnose.py" --json

Returns one JSON object:

  • enabled_tools — the project's Enabled Tools selection. The engine classifies with this in view: artifacts absent because their tool is deselected report as expected_absent, never as issues.
  • checks[] — each with id, label, status, detail, and fix (null, or {auto: [shell commands], manual: text, restart_required: bool}). Statuses: healthy, issue (fixable — fix.auto holds runnable commands, otherwise fix.manual explains), info (worth knowing, nothing to fix), expected_absent, manual (only the user can close it), skipped (not runnable here).
  • summary — counts per status.

Flags: --boot-test adds the network-dependent claude-octopus boot/handshake check (it tests the version actually registered in .codex/config.toml, falling back to an expected-pin smoke test when there is no registration). Include it when the user asks for a deep check or Codex→Claude delegation is misbehaving. --no-preflight skips the model-pin freshness probe.

Workflow

Step 1: Run the engine

Run the engine with --json (add --boot-test per above). If the script itself fails to run, report the error and fall back to bash "${CLAUDE_PLUGIN_ROOT}/scripts/status.sh" for a basic readout — but say clearly that the structured diagnosis was unavailable.

Step 2: Render the report

Present the checks grouped by bucket, in this order — include Information even when there are no issues:

  1. Issues — table: # | Item | Diagnosis | Fix (label, detail, fix.auto commands joined with &&, or fix.manual)
  2. Manual action needed — items only the user can close, with their fix.manual text
  3. Information — non-issue observations (deliberate model pin drift, user-managed configs, malformed fields)
  4. Healthy — one line each
  5. Expected absent / Skipped — one line each, so the user sees what was consciously not judged

Read the full file on GitHub · 80 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. 4d ago First seen · 80 lines · 33 tokens per session scan A e392912f22f6

Subscribe to this mod's changes

diagnose is a command published in the GitHub repository xiaolai/cc-suite (44 stars, last pushed 2d ago), licensed ISC. It adds 33 tokens to every session and 1,160 once invoked, about $0.0002 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.