progressive-verification-debugging

progressive-verification-debugging is a skill for Claude Code, Codex from topprismdata/cultivating-ml-agent. It costs 91 tokens per session (1,702 once invoked), scanned A, original, MIT.

A step-by-step debugging method that tests a complex system from its simplest parts to its most complicated parts. It separates environment problems, code bugs, data issues, and model or integration failures.

In plain words
What is it for?
Use it to debug machine-learning training, distributed systems, and integrations by checking infrastructure, software configuration, code, data, and full application behavior in sequence.
Why use it?
It prevents you from guessing which component is broken or trying complicated fixes before locating the failing layer. This is useful when a process crashes silently, behaves differently across machines, or runs without doing useful work.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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/topprismdata/cultivating-ml-agent/progressive-verification-debugging
Any agent
npx skills add topprismdata/cultivating-ml-agent --skill progressive-verification-debugging
Clone the repo
git clone --depth 1 https://github.com/topprismdata/cultivating-ml-agent

Made for: Claude Code, Codex.

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 progressive-verification-debugging

README.md
[![agentmods](https://agentmods.dev/badge/skills/topprismdata/cultivating-ml-agent/progressive-verification-debugging.svg)](https://agentmods.dev/skills/topprismdata/cultivating-ml-agent/progressive-verification-debugging)
Your own site
<a href="https://agentmods.dev/skills/topprismdata/cultivating-ml-agent/progressive-verification-debugging"><img src="https://agentmods.dev/badge/skills/topprismdata/cultivating-ml-agent/progressive-verification-debugging.svg" alt="Measured on agentmods" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,702 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.1 $0.00091 $0.01702
Opus 5 $0.00046 $0.00851
Sonnet 5 $0.00018 $0.00340
Haiku 4.5 $0.00009 $0.00170

Measured 6d ago against content hash d098499513ae, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

progressive-verification-debugging 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 6d 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.

skills/examples/progressive-verification-debugging/SKILL.md · 237 lines

How it starts

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

Progressive Verification Methodology

Problem

When debugging complex systems (ML training, distributed systems, integrations), it's easy to:

  • Waste time checking logs without a strategy
  • Assume the wrong component is broken
  • Try complex solutions before understanding root cause
  • Get overwhelmed by multiple potential failure points

Context / Trigger Conditions

Use this methodology when:

  • Silent crashes with no error messages
  • "Works on my machine" but fails elsewhere
  • Multiple layers: environment → code → data → model
  • Version compatibility issues suspected
  • Need to isolate environment vs code issues

Classic symptoms:

  • Process exits silently after starting
  • GPU utilization 0-1% despite training script running
  • Empty log files despite process being active
  • Different behavior across platforms (Mac vs WSL2 vs Linux)

Solution

Core Principle

"先要用简单代码验证环境,然后判断是不是配置问题"

Always start with the simplest test, gradually increase complexity.

Progressive Verification Steps

Create a test ladder from simplest to most complex:

Level 1: Basic Infrastructure
├── Test: torch.randn(2, 3).cuda()
└── Validates: CUDA driver, GPU access

Level 2: Core Components
├── Test: nn.Linear(10, 5).cuda()
└── Validates: Model creation, CUDA memory allocation

Level 3: Real Models
├── Test: ResNet50(weights=None).cuda()
└── Validates: Complex model architecture

Level 4: Data Pipeline (Synthetic)
├── Test: DataLoader with random tensors
└── Validates: DataLoader, multiprocessing

Level 5: Data Pipeline (Real)
├── Test: PIL.Image.open + transforms
└── Validates: File I/O, image decoding

Level 6: Training Loop
├── Test: Single forward + backward pass
└── Validates: Optimization, gradient flow

Decision Tree

Does Level N pass?
├── Yes: Proceed to Level N+1
└── No: Issue is at Level N
    └── Fix before proceeding

Example Test Script

import torch
import torch.nn as nn
from torch.utils.data import Dataset, DataLoader
from torchvision.models import resnet50
from PIL import Image

print("=== Progressive Verification ===")

# Level 1: Basic CUDA
print("Level 1: Basic CUDA")
x = torch.randn(10, 10).cuda()
print("  PASSED")

# Level 2: Model on CUDA
print("Level 2: Model on CUDA")
model = nn.Linear(10, 5).cuda()
y = model(x)
print("  PASSED")

# Level 3: ResNet50 on CUDA
print("Level 3: ResNet50 on CUDA")
resnet = resnet50(weights=None).cuda()
print("  PASSED")

# Level 4: DataLoader (synthetic)
print("Level 4: DataLoader (synthetic)")
class DummyDataset(Dataset):
    def __len__(self): return 10
    def __getitem__(self, i): return torch.randn(3, 224, 224), 0

ds = DummyDataset()
loader = DataLoader(ds, batch_size=4, num_workers=0)
for x, y in loader:
    x, y = x.cuda(), y.cuda()
    output = resnet(x)
    break
print("  PASSED")

# Level 5: Real data loading
print("Level 5: Real data loading")
# Test actual file loading here
print("  PASSED")

print("All levels passed!")

Read the full file on GitHub · 237 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. 6d ago First seen · 237 lines · 91 tokens per session scan A d098499513ae

Subscribe to this mod's changes

progressive-verification-debugging is a skill published in the GitHub repository topprismdata/cultivating-ml-agent (4 stars, last pushed 8d ago), licensed MIT. It adds 91 tokens to every session and 1,702 once invoked, about $0.0005 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-31.