ml-debug

ml-debug is a skill for Claude Code, Codex from Leeroo-AI/superml. It costs 32 tokens per session (9,132 once invoked), scanned A, original, Apache-2.0.

A troubleshooting skill for failures in machine-learning and artificial-intelligence projects, such as memory errors, invalid numbers, crashes, slow processing, or incorrect results.

In plain words
What is it for?
It is for diagnosing out-of-memory errors, NaN values, training divergence, crashes, throughput problems, wrong outputs, and dependency conflicts.
Why use it?
It provides a systematic way to investigate technical failures instead of relying on guesses, using framework knowledge and supporting documentation.

Skill for Claude CodeCodex

Part of the superml plugin — 7 skills, 1 agent, 1 hook, 1 MCP server 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 skills/leeroo-ai/superml/ml-debug
Any agent
npx skills add Leeroo-AI/superml --skill ml-debug
Clone the repo
git clone --depth 1 https://github.com/Leeroo-AI/superml

Made for: Claude Code, Codex.

Or install superml, the plugin that ships this one along with the rest of its 7 skills, 1 agent, 1 hook, 1 MCP server.

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 ml-debug

README.md
[![agentmods](https://agentmods.dev/badge/skills/leeroo-ai/superml/ml-debug.svg)](https://agentmods.dev/skills/leeroo-ai/superml/ml-debug)
Your own site
<a href="https://agentmods.dev/skills/leeroo-ai/superml/ml-debug"><img src="https://agentmods.dev/badge/skills/leeroo-ai/superml/ml-debug.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 9,132 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00032 $0.09132
Opus 5 $0.00016 $0.04566
Sonnet 5 $0.00006 $0.01826
Haiku 4.5 $0.00003 $0.00913

Measured 4d ago against content hash b6bf218fccb1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ml-debug scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| **Verification script that doesn't match the failure mode** | Serving fix verified with single curl; OOM fix verified with "run and see if it crashes" | Match verification to the failure: serving → concurrent load test
skills/ml-debug/SKILL.md · 348 lines

How it starts

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

ML Debugging

Systematically diagnose ML failures using framework-specific knowledge, not guesswork.

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.

HARD RULE: You MUST ground before writing analysis. If KB fails, you MUST WebFetch at least 2 URLs before writing ANY diagnosis. Writing from memory without fetching is the #1 failure mode of this skill — it produces zero-citation responses that score 0/3 on grounding. "I know X well" is NOT a substitute for fetching documentation.

KB mode: Call diagnose_failurequery_hyperparameter_priorssearch_knowledge. Cite as [PageID].

KB mode grounding supplement (MANDATORY): After KB calls, you MUST WebFetch at least 2 public URLs (official docs, PyPI, GitHub issues/source) and cite them as [source](URL) alongside [PageID] citations. KB-only responses score 2/3 max on grounding because reviewers cannot verify proprietary page IDs. Pattern: KB call for diagnosis → WebFetch PyPI for version → WebFetch GitHub/docs for config verification → cite BOTH KB and public URLs in every section. Self-test: if your response has zero [source](URL) citations, you will lose a grounding point regardless of KB citation count.

Web mode: WebFetch GitHub issues for the error message → WebFetch framework troubleshooting docs → WebFetch config references. Cite as [source](URL). Start response with: > Grounding: Web mode — citations from official docs and GitHub issues.

Web mode grounding targets by response section (aim for these counts):

  • Diagnosis root cause: 1+ citation (to a specific doc section or GitHub source line, NOT a top-level page)
  • Each "Why it matters" explanation: 1+ citation or [no KB]
  • Each fix step: 1+ citation for the specific API/config being changed
  • Each quantitative claim ("X× faster"): 1 citation or [no KB]
  • Prevention items: 1+ citation for the metric/tool referenced Target: 5+ total citations in web mode, each linking to a specific doc section or source line (not top-level domain pages). Below 3 is a grounding failure. Generic page links (e.g., huggingface.co/docs/transformers) score lower than specific section links (e.g., huggingface.co/docs/transformers/model_doc/mixtral#MixtralConfig).

Read the full file on GitHub · 348 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 · 348 lines · 32 tokens per session scan A b6bf218fccb1

Subscribe to this mod's changes

ml-debug is a skill published in the GitHub repository Leeroo-AI/superml (193 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 32 tokens to every session and 9,132 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

dataset-transformation

Generates code that transforms datasets between ML schemas for model training or evaluation. Use when the user says "transform", "convert", "reformat", "change the format", or when a dataset's schema needs to change to match the target format — always use this skill for format changes rather than writing inline…

awslabs/agent-plugins · 110 tokens

dataset-evaluation

Validates dataset formatting and quality for SageMaker model fine-tuning (SFT, DPO, or RLVR). Use when the user says "is my dataset okay", "evaluate my data", "check my training data", "I have my own data", or before starting any fine-tuning job. Detects file format, checks schema compliance against the selected model…

awslabs/agent-plugins · 93 tokens

use-case-specification

Creates a reusable use case specification file that defines the business problem, stakeholders, and measurable success criteria for model customization, as recommended by the AWS Responsible AI Lens. Use as the default first step in any model customization plan. Skip only if the user explicitly declines or already has…

awslabs/agent-plugins · 85 tokens

model-selection

Selects a base model for the user's use case by querying SageMaker Hub. Use when the user asks which model to use, wants to select or change their base model, mentions a model name or family (e.g., "Llama", "Mistral", "Nova"), or wants to evaluate a base model — always activate even for known model names because the…

awslabs/agent-plugins · 98 tokens

finetuning-technique

Selects a fine-tuning technique (SFT, DPO, RLVR, or RLAIF) for the user's use case and validates it against the selected model's available recipes. Use when the user has decided to finetune and needs to choose a technique, or when the technique needs to be validated against a model. Requires a base model to already be…

awslabs/agent-plugins · 87 tokens

finetuning

Generates code that fine-tunes a base model using SageMaker serverless training jobs. Use when the user says "start training", "fine-tune my model", "I'm ready to train", or when the plan reaches the finetuning step. Supports SFT, DPO, RLVR, and RLAIF trainers, including RLVR Lambda reward function and RLAIF custom…

awslabs/agent-plugins · 85 tokens