Skip to content
AI & Agents
Command

/cs-dl-diagnose

/cs-dl-diagnose — Diagnose a training run against Chapter 11's decision tree: read training error before deciding anything, and never diagnose a NaN as overfitting. Returns a ranked cause, the specific next action, and the chapter that justifies it.

From plugin
claude-skills
30k169 skills127 agents169 commands2 MCP
$ npx -y skills add alirezarezvani/claude-skills --agent claude-code

Command definition

cs-dl-diagnose.md
disable-model-invocation: true
name: "cs-dl-diagnose"
description: "/cs-dl-diagnose — Diagnose a training run against Chapter 11's decision tree: read training error before deciding anything, and never diagnose a NaN as overfitting. Returns a ranked cause, the specific next action, and the chapter that justifies it."
argument-hint: "[what the run is doing — losses, gradient norm, or a description]"

/cs-dl-diagnose — Measurement first, hypothesis second

**Command:** `/cs-dl-diagnose [symptoms]`

Chapter 11's rule, which most teams have backwards: **read training error first.** High training error means the model or the optimizer is the bottleneck, and more data cannot help.

Procedure

1. **Collect the instruments.** Ask for what is missing, in this order:

  • training loss and validation loss (same units, same epoch)
  • the target loss — a human baseline, a published number, or an irreducible-error estimate

(without it, underfitting cannot be distinguished from convergence)

  • global gradient norm, if available
  • has the loss ever gone NaN or inf?
  • can the model drive training loss to ~0 on 10–50 examples? (the smoke test that separates

a bug from a hard problem) 2. **Run the tool:**

   python3 ${CLAUDE_PLUGIN_ROOT}/skills/deep-learning-book/scripts/training_diagnostics.py \
       --train-loss <x> --val-loss <y> --target-loss <z> --grad-norm <g> \
       --tiny-subset-fits yes|no|unknown

Exit 4 means not enough instruments — ask for one of the named measurements rather than guessing. 3. **Act on finding [1] first.** Rules fire in priority order for a reason: a non-finite loss is a numerics failure, not a modelling one, and a model that cannot overfit 20 examples has a bug that no hyperparameter will fix. 4. **On an OVERFIT verdict**, follow up with the capacity planner, which ranks the regularization ladder and applies the double-descent correction:

   python3 .../capacity_planner.py --params <n> --train-examples <m> \
       --train-error <x> --val-error <y> --applied early-stopping

5. **On a memory or throughput question**, run `model_arithmetic.py --spec <file>` — it reports parameters, FLOPs and activation memory per example, and refuses a stack whose shapes do not connect. 6. **Close with the discipline, not just the fix:** change one thing per experiment, log it, re-measure the gap.

Do not

  • Skip to the interesting hypothesis before the rules have been read in order.
  • Recommend collecting data while training error is high.
  • Recommend shrinking an overparameterized model first — see the double-descent caveat in

`skills/deep-learning-book/references/book_to_2026_delta.md`.

Read more
@alirezarezvani
Ships withclaude-skills

411 production-ready skills for Claude Code and 12 other coding agents, covering engineering, product, marketing, compliance, finance and the C-suite. We test whether each skill loads when you ask in plain words, and publish the results.

30k200 skills127 agents2 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
29.6k
Star history of alirezarezvani/claude-skills on GitHub, a chart by star-history.com

Other commands on claude-skills.

focused-fix

focused-fix

Command

Deep-dive feature repair — systematically fix an entire feature/module across all its files and dependencies. Usage: /focused-fix…

plugin-audit

plugin-audit

Command

Comprehensive audit pipeline for skills, plugins, agents, and commands. Validates structure, quality, security, marketplace…

More commands from other plugins.

devbox-entrypoint

devbox-entrypoint

Command

Context: runloop resumes a devbox by re-running the same entrypoint script, which invokes `cn serve --id <agentId> ...`. Because…

continue12d36k
@continuedev@continuedevInstall Command
c

c

Command

Shortcut for "continue working" — pick the work in flight back up exactly where it stopped and keep going until it is done or…

lifeos2w20k
@danielmiessler@danielmiesslerInstall Command
sidecar

sidecar

Command

Spawn a read-only sidecar subagent to investigate something in this checkout without editing files, moving branches, or touching…

@builderio@builderioInstall Command