ml-failfast-validation

ml-failfast-validation is a skill for Claude Code from terrylica/cc-skills. It costs 36 tokens per session (4,118 once invoked), scanned A, original, MIT.

A set of checks for validating a machine-learning proof of concept before starting an expensive experiment. Machine learning systems learn patterns from data to make predictions or decisions.

In plain words
What is it for?
Use it to check data schemas, model structure, gradient flow, and early training behavior before a full run.
Why use it?
It catches broken data pipelines, invalid model setups, and training problems early instead of after hours of computation.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the devops-tools plugin — 24 skills shipped together , and of cc-skills

Good fit Use it to check data schemas, model structure, gradient flow, and early training behavior before a full run.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/terrylica/cc-skills/ml-failfast-validation
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.

Any agent
npx skills add terrylica/cc-skills --skill ml-failfast-validation
Clone the repo
git clone --depth 1 https://github.com/terrylica/cc-skills

Made for: Claude Code.

Or install devops-tools, the plugin that ships this one along with the rest of its 24 skills.

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-failfast-validation

README.md
[![agentmods](https://agentmods.dev/badge/skills/terrylica/cc-skills/ml-failfast-validation/github.svg)](https://agentmods.dev/skills/terrylica/cc-skills/ml-failfast-validation)
Your own site
<a href="https://agentmods.dev/skills/terrylica/cc-skills/ml-failfast-validation"><img src="https://agentmods.dev/badge/skills/terrylica/cc-skills/ml-failfast-validation/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.

agentmods 80×15 button for ml-failfast-validation

Your own site · 80×15
<a href="https://agentmods.dev/skills/terrylica/cc-skills/ml-failfast-validation"><img src="https://agentmods.dev/badge/skills/terrylica/cc-skills/ml-failfast-validation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,118 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Rogue Agent · line 491
    Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
    Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
How audits are shown
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.00036 $0.04118
Opus 5 $0.00018 $0.02059
Sonnet 5 $0.00007 $0.00824
Haiku 4.5 $0.00004 $0.00412

Measured 9d ago against content hash 20c71b953996, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

ml-failfast-validation 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 9d 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.

plugins/devops-tools/skills/ml-failfast-validation/SKILL.md · 494 lines

How it starts

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

ML Fail-Fast Validation

POC validation patterns to catch issues before committing to long-running ML experiments.

Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.

When to Use This Skill

Use this skill when:

  • Starting a new ML experiment that will run for hours
  • Validating model architecture before full training
  • Checking gradient flow and data pipeline integrity
  • Implementing POC validation checklists
  • Debugging prediction collapse or gradient explosion issues

1. Why Fail-Fast?

Without Fail-Fast With Fail-Fast
Discover crash 4 hours in Catch in 30 seconds
Debug from cryptic error Clear error message
Lose GPU time Validate before commit
Silent data issues Explicit schema checks

Principle: Validate everything that can go wrong BEFORE the expensive computation.


2. POC Validation Checklist

Minimum Viable POC (5 Checks)

def run_poc_validation():
    """Fast validation before full experiment."""

    print("=" * 60)
    print("FAIL-FAST POC VALIDATION")
    print("=" * 60)

    # [1/5] Model instantiation
    print("\n[1/5] Model instantiation...")
    model = create_model(architecture, input_size=n_features)
    x = torch.randn(32, seq_len, n_features).to(device)
    out = model(x)
    assert out.shape == (32, 1), f"Output shape wrong: {out.shape}"
    print(f"   Input: (32, {seq_len}, {n_features}) -> Output: {out.shape}")
    print("   Status: PASS")

    # [2/5] Gradient flow
    print("\n[2/5] Gradient flow...")
    y = torch.randn(32, 1).to(device)
    loss = F.mse_loss(out, y)
    loss.backward()
    grad_norms = [p.grad.norm().item() for p in model.parameters() if p.grad is not None]
    assert len(grad_norms) > 0, "No gradients!"
    assert all(np.isfinite(g) for g in grad_norms), "NaN/Inf gradients!"
    print(f"   Max grad norm: {max(grad_norms):.4f}")
    print("   Status: PASS")

    # [3/5] NDJSON artifact validation
    print("\n[3/5] NDJSON artifact validation...")
    log_path = output_dir / "experiment.jsonl"
    with open(log_path, "a") as f:
        f.write(json.dumps({"phase": "poc_start", "timestamp": datetime.now().isoformat()}) + "\n")
    assert log_path.exists(), "Log file not created"
    print(f"   Log file: {log_path}")
    print("   Status: PASS")

    # [4/5] Epoch selector variation
    print("\n[4/5] Epoch selector variation...")
    epochs = []
    for seed in [1, 2, 3]:
        selector = create_selector()
        # Simulate different validation results
        for e in range(10, 201, 10):
            selector.record(epoch=e, sortino=np.random.randn() * 0.1, sparsity=np.random.rand())
        epochs.append(selector.select())
    print(f"   Selected epochs: {epochs}")
    assert len(set(epochs)) > 1 or all(e == epochs[0] for e in epochs), "Selector not varying"
    print("   Status: PASS")

    # [5/5] Mini training (10 epochs)
    print("\n[5/5] Mini training (10 epochs)...")
    model = create_model(architecture, input_size=n_features).to(device)
    optimizer = torch.optim.AdamW(model.parameters(), lr=0.0005)
    initial_loss = None
    for epoch in range(10):
        loss = train_one_epoch(model, train_loader, optimizer)
        if initial_loss is None:
            initial_loss = loss
    print(f"   Initial loss: {initial_loss:.4f}")
    print(f"   Final loss: {loss:.4f}")
    print("   Status: PASS")

    print("\n" + "=" * 60)
    print("POC RESULT: ALL 5 CHECKS PASSED")
    print("=" * 60)

Read the full file on GitHub · 494 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 9d ago First seen · 494 lines · 36 tokens per session scan A 20c71b953996

Subscribe to this mod's changes

ml-failfast-validation is a skill published in the GitHub repository terrylica/cc-skills (62 stars, last pushed yesterday), licensed MIT. It adds 36 tokens to every session and 4,118 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

ai-ml-development

AI and machine learning development with PyTorch, TensorFlow, and LLM integration. Use when building ML models, training pipelines, fine-tuning LLMs, or implementing AI features.

travisjneuman/.claude · 43 tokens

ai-policy-generator

AI governance policy creation for nonprofits and enterprises with frameworks, risk assessment, ethical guidelines, and compliance templates. Use when drafting AI usage policies, responsible AI frameworks, or organizational AI governance documents.

travisjneuman/.claude · 42 tokens

data-science

Data science and analytics expertise for statistical analysis, machine learning pipelines, data governance, business intelligence, predictive modeling, and analytics strategy. Use when building ML models, analyzing data, creating dashboards, or designing data architectures.

travisjneuman/.claude · 47 tokens

data-engineering

ETL/ELT pipelines, data warehousing (BigQuery, Snowflake, Redshift), stream processing (Kafka, Spark Streaming), orchestration (Airflow, Dagster, Prefect), dbt transformations, and data lake architecture. Use when building data pipelines, designing warehouse schemas, or implementing real-time data processing.

travisjneuman/.claude · 70 tokens

openrouter-models

Choose among the hosted models the shared router serves — discover current ids and prices from the public catalog, self-enforce a spend budget the router does not meter for you, respect the free-tier prompt-logging caveat, and request onboarding of a model the router does not serve yet.

dryvist/claude-code-plugins · 61 tokens

llm-router-ops

Operate a self-hosted OpenAI-compatible LLM router/proxy (e.g. LiteLLM) in front of one or more backends — the minimal client-wiring block for every client type, the context-window advertisement gotcha, the env-vs-persisted-config gotcha, and why an unauthenticated health probe should 401, not 200. Use when wiring a…

dryvist/claude-code-plugins · 112 tokens