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.
npx agentmods add commands/xiaolai/cc-suite/diagnosegit clone --depth 1 https://github.com/xiaolai/cc-suiteWrote 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.
[](https://agentmods.dev/commands/xiaolai/cc-suite/diagnose)<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>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.
| Model | Per session | Once 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 |
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.
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 asexpected_absent, never as issues.checks[]— each withid,label,status,detail, andfix(null, or{auto: [shell commands], manual: text, restart_required: bool}). Statuses:healthy,issue(fixable —fix.autoholds runnable commands, otherwisefix.manualexplains),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:
- Issues — table:
# | Item | Diagnosis | Fix(label, detail,fix.autocommands joined with&&, orfix.manual) - Manual action needed — items only the user can close, with their
fix.manualtext - Information — non-issue observations (deliberate model pin drift, user-managed configs, malformed fields)
- Healthy — one line each
- Expected absent / Skipped — one line each, so the user sees what was consciously not judged
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.
- 4d ago First seen · 80 lines · 33 tokens per session scan A e392912f22f6
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.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.