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 skills add wenhaochai/claude-plugins --skill diagnosegit clone --depth 1 https://github.com/wenhaochai/claude-pluginsWrote 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/skills/wenhaochai/claude-plugins/diagnose)<a href="https://agentmods.dev/skills/wenhaochai/claude-plugins/diagnose"><img src="https://agentmods.dev/badge/skills/wenhaochai/claude-plugins/diagnose/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.
<a href="https://agentmods.dev/skills/wenhaochai/claude-plugins/diagnose"><img src="https://agentmods.dev/badge/skills/wenhaochai/claude-plugins/diagnose.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00053 | $0.00891 |
| Opus 5.5 | $0.00021 | $0.00356 |
| Sonnet 5.5 | $0.00011 | $0.00178 |
| Haiku 4.5 | $0.00005 | $0.00089 |
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 17d 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 — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.
diagnose is a sequence of steps. Work through them one at a time and mark each one done as you go.
It stops after one finding, one fix and the measurement that proves it. The user
chose this over optimize because they want an answer in an hour rather than a
branch in a day, and a second finding they did not ask for costs them that hour.
Step 1: setup
Use the setup-baseline skill. It builds the worktree and the workspace, has
extract-computation-graph write records/computation_graph.json and
records/execution_schedule.json, then measures the base commit for speed, memory and
correctness, profiles it in full with torch-profile, and records it with
workspace.py add --verdict base. A workspace left in that shape is one
optimize can pick up later without profiling the base again.
The tolerance it derives is what step 3 reads the fix against. Without it a fix has no number for whether the job still computes the same thing.
Do not arm anything. The registry and the Claude Code
watchdog keep a campaign turning for hours, and this is one pass. They belong to
optimize.
Step 2: the one finding
setup-baseline left the traces under commits/<base sha>/trace/, the rendered
views beside them and the diagnosis at commits/<base sha>/report.md. This step
reads them and picks one.
Read all five views before naming anything. "The largest" is a claim about the other four, so ranking them is what earns it.
Take the top finding by what it costs in wall clock: the part not already hidden
behind other work, multiplied by its repeat count from records/computation_graph.json.
Do not rank by kernel time. A collective that is fully hidden costs nothing, and
a 2 ms stall on every one of forty blocks outranks a 60 ms one-off.
The finding carries everything torch-profile's ③ asks for. The code_anchor and
the cost ceiling are the two the user reads first.
Step 3: the one fix
Pick the fix by optimize's Tradeoffs: architecture, breadth, memory, precision.
Then prove it, on the same benchmark script and the same node:
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.
- 17d ago First seen · 84 lines · 53 tokens per session scan A 79ac5928af7a
diagnose is a skill published in the GitHub repository wenhaochai/claude-plugins (17 stars, last pushed 2d ago), licensed MIT. It adds 53 tokens to every session and 891 once invoked, about $0.0002 per session on Opus 5.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-10-01.
Other skills, from other repositories
trace
Evidence-driven tracing lane that orchestrates competing tracer hypotheses in Claude built-in team mode.
smiles-validation
Strict SMILES validation, structural comparison, and modification verification. Catches invalid LLM-generated molecules.
nonlinear-solvers
Select and configure nonlinear solvers for f(x)=0 or min F(x). Use for Newton methods, quasi-Newton (BFGS, L-BFGS), Broyden, Anderson acceleration, diagnosing convergence issues, choosing line search vs trust region, and analyzing Jacobian quality.
linear-solvers
Select and configure linear solvers for systems Ax=b in dense and sparse problems. Use when choosing direct vs iterative methods, diagnosing convergence issues, estimating conditioning, selecting preconditioners, or debugging stagnation in GMRES/CG/BiCGSTAB.
numerical-stability
Analyze and enforce numerical stability for time-dependent PDE simulations. Use when selecting time steps, choosing explicit/implicit schemes, diagnosing numerical blow-up, checking CFL/Fourier criteria, von Neumann analysis, matrix conditioning, or detecting stiffness in advection/diffusion/reaction problems.
social-physics-filter
Unified boundary enforcement, interpersonal diagnostic, and relational audit engine. Absorbs 40 psychology + 2 social protocols and all relationship case studies.