Skip to content

/ml-verify

Use when the user wants to verify code, config, or math before running — or proactively before any expensive training job or deployment

From plugin
superml
1967 skills1 agent1 hook1 MCP

Claude Code

$ npx -y skills add Leeroo-AI/superml --skill ml-verify --agent claude-code

SKILL.md

ml-verify.SKILL.md
name: ml-verify
description: Use when the user wants to verify code, config, or math before running — or proactively before any expensive training job or deployment

ML Verification

Catch mistakes before they waste GPU hours. Verify configs, code, and math against documented framework behavior.

Grounding

**Detect mode:** On your first grounding call, check if Leeroopedia KB tools are available. If they return results, use **KB mode**. If unavailable or auth fails, use **Web mode**.

**KB mode:** Call `verify_code_math` / `query_hyperparameter_priors` / `review_plan`. Cite as `[PageID]`.

**Web mode:** WebFetch API docs for every non-trivial import, verify signatures and params against official docs, WebFetch known good configs for comparison. Cite as `[DocName: specific page/section](URL#anchor)` — never use generic `[source]`. The link text MUST name the document and section (e.g., `[HF PEFT: LoRA Conceptual Guide](https://huggingface.co/docs/peft/main/en/conceptual_guides/lora)`). Start response with: `> Grounding: Web mode — citations from official docs.`

**Web mode URL registry:**

  • HF PEFT LoRA guide: `https://huggingface.co/docs/peft/main/en/conceptual_guides/lora`
  • HF PEFT quickstart: `https://huggingface.co/docs/peft/main/en/quicktour`
  • HF Transformers TrainingArguments: `https://huggingface.co/docs/transformers/main/en/main_classes/trainer#transformers.TrainingArguments`
  • HF TRL SFTTrainer: `https://huggingface.co/docs/trl/main/en/sft_trainer`
  • HF TRL SFTConfig: `https://huggingface.co/docs/trl/main/en/sft_trainer#trl.SFTConfig`
  • DeepSpeed: `https://www.deepspeed.ai/docs/config-json`
  • vLLM: `https://docs.vllm.ai`
  • PyTorch: `https://pytorch.org/docs/stable`

The Iron Law

NO TRAINING RUN WITHOUT VERIFICATION FIRST

An hour of verification saves days of debugging failed runs. Check the config against KB-documented ranges, check the code against documented API contracts.

Phases

Phase 1: Check Against Documentation

**KB mode:**

Call the appropriate KB tools:

  • **For code/math:** `verify_code_math(code_snippet, concept_name)`
  • **For configs/hyperparameters:** `query_hyperparameter_priors(query)` with model size, task type, hardware, and framework context
  • **For full training configs:** `review_plan(proposal, goal)` with the complete config

Run whichever combination fits. When in doubt, run all applicable checks in parallel. Cite as `[PageID]`.

**Web mode:**

WebFetch the relevant documentation for each check:

  • **For code/math:** WebFetch the API docs for the framework. Verify function signatures, parameter names, and return types against the official docs.
  • **For configs/hyperparameters:** WebFetch the framework's config reference page and known-good example configs (e.g., Axolotl examples, HF training examples). Compare user values against documented defaults and recommendations.
  • **For full training configs:** WebFetch docs for each major config section (model, optimizer, data, distributed). Cross-check all values.

Cite as `[DocName: section](URL#anchor)` — never generic `[source]`. Start response with: `> Grounding: Web mode — citations from official docs.`

**Web mode hard gate:** You MUST call WebFetch on at least 3 URLs from the registry BEFORE writing ANY findings table row. Extract exact parameter defaults, API signatures, and recommended ranges from fetched content. Constructed URLs that were never fetched score 0 on grounding — the judge checks for actual page fetch evidence. Do NOT cite a URL you did not fetch.

**Extract-and-quote rule:** After each WebFetch, write down 2-3 exact values from the page (default LR, parameter type, version-specific behavior) as scratch notes. When writing findings rows, QUOTE these extracted values — e.g., "TRL 0.12 defaults SFTConfig.learning_rate to 2e-5" not just "typical LR is 2e-4". If the fetched page shows a value different from your prior belief, surface the discrepancy explicitly: "Note: docs say X, common advice says Y — using doc value."

**Version-specificity gate:** Every web-mode citation MUST include the framework version or doc date when available. E.g., `[HF PEFT v0.13: LoRA Conceptual Guide](URL)`. If the fetched page shows a version number, include it. If not, append `(undated)` to the citation.

**If BOTH KB and web are unavailable:** 1. First line: `⚠️ WARNING: This verification is ungrounded. All recommendations below are best-effort. Verify independently.` 2. Every row in the findings table ends with `**UNGROUNDED**` 3. Cite specific public sources where possible: arXiv IDs, doc URLs, framework doc sections

**Specificity rule**: Never recommend a range when you can recommend a value. Pick the single best value from your sources and cite why.

**Gate**: Every parameter and code path has been checked against documentation. If any check couldn't be verified, flag it in the findings table.

Phase 2: Dry Run Checklist

Before the real run, verify these can complete without error:

  • [ ] Model loads on target hardware (no OOM on init)
  • [ ] Data pipeline produces correctly shaped batches
  • [ ] Forward + backward pass completes (1 step, no crash)
  • [ ] Loss is a reasonable initial value (cross-entropy on vocab: expect `ln(vocab_size)` ≈ 10-11 for 32k vocab; flag if <1.0 or >15.0 or NaN)
  • [ ] Gradient norms are in expected range (0.1–10.0 for LLM fine-tuning; flag if >100 or exactly 0.0)
  • [ ] Checkpoint save/load works
  • [ ] Estimate total VRAM with exact formula:
  • [ ] Verify every FAIL/WARN fix is copy-paste ready (run the Verify command from Issues Found)
  • [ ] Cross-check every numerical claim in findings table against a fetched doc value — if you wrote "typical range is X" but docs say Y, fix or flag the discrepancy
  • QLoRA 4-bit: `(params × 0.5B) + (trainable_params × 2B × 3 for AdamW) + (batch × seq_len × hidden × n_layers × 2B for activations)`
  • Full FT bf16: `(params × 2B) + (params × 2B × 3 for AdamW) + activations`
  • Flag if >85% of GPU RAM. Show the
Read more
@leeroo-ai
Ships withsuperml

Give your AI coding agent ML engineering superpowers. Watch how SuperML works in 90 seconds: If SuperML helps you, give it a ⭐ it helps others find the project.

1967 skills1 agent1 MCP
Get the whole plugin, auto-invoked

Stars on GitHub

Momentum

stars in total
196
Star history of Leeroo-AI/superml on GitHub, a chart by star-history.com

Other skills on superml.

ml-debug
Auto-invoked

ml-debug

Use when something is failing in ML/AI work — OOM, NaN, divergence, crashes, bad throughput, wrong outputs, dependency conflicts

@leeroo-ai@leeroo-aiInstall Skill
ml-experiment
Auto-invoked

ml-experiment

Use when starting, logging, or reviewing ML experiments — maintains a persistent experiment journal with hypotheses, results, and…

@leeroo-ai@leeroo-aiInstall Skill
ml-iterate
Auto-invoked

ml-iterate

Use when the user is stuck, needs ranked next steps, or wants alternatives after initial experiments — "I tried X and got Y, what…

@leeroo-ai@leeroo-aiInstall Skill
ml-plan
Auto-invoked

ml-plan

Use when the user wants an implementation plan, architecture design, or multi-step ML pipeline — "build X", "implement X",…

@leeroo-ai@leeroo-aiInstall Skill
ml-research
Auto-invoked

ml-research

Use when the user wants to understand an ML/AI topic, compare approaches, or survey framework capabilities — "how does X work?",…

@leeroo-ai@leeroo-aiInstall Skill
using-superml
Auto-invoked

using-superml

Use when starting any conversation involving ML/AI — establishes how to use Leeroopedia KB tools and workflow skills

@leeroo-ai@leeroo-aiInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about ml-verify.

Which coding agents can use ml-verify?
ml-verify installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.