ml-leakage-check

ml-leakage-check is a skill for Claude Code from yeaight7/agent-powerups. It costs 40 tokens per session (439 once invoked), scanned A, original, Apache-2.0.

A checklist for finding target leakage in machine-learning data preparation. Target leakage happens when training uses information that would not be available when the model makes a real prediction.

In plain words
What is it for?
Use it to review data splitting, scaling and imputation, feature creation, future-value use, and ID-like columns before approving a training pipeline.
Why use it?
It catches misleadingly high validation results caused by using future information, test-set statistics, or identifier clues during training.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the machine-learning-ops plugin — 7 skills, 4 commands, 3 agents shipped together

Good fit Use it to review data splitting, scaling and imputation, feature creation, future-value use, and ID-like columns before approving a training pipeline.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yeaight7/agent-powerups/ml-leakage-check
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 yeaight7/agent-powerups --skill ml-leakage-check
Clone the repo
git clone --depth 1 https://github.com/yeaight7/agent-powerups

Made for: Claude Code.

Or install machine-learning-ops, the plugin that ships this one along with the rest of its 7 skills, 4 commands, 3 agents.

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-leakage-check

README.md
[![agentmods](https://agentmods.dev/badge/skills/yeaight7/agent-powerups/ml-leakage-check/github.svg)](https://agentmods.dev/skills/yeaight7/agent-powerups/ml-leakage-check)
Your own site
<a href="https://agentmods.dev/skills/yeaight7/agent-powerups/ml-leakage-check"><img src="https://agentmods.dev/badge/skills/yeaight7/agent-powerups/ml-leakage-check/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-leakage-check

Your own site · 80×15
<a href="https://agentmods.dev/skills/yeaight7/agent-powerups/ml-leakage-check"><img src="https://agentmods.dev/badge/skills/yeaight7/agent-powerups/ml-leakage-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 439 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.
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.00040 $0.00439
Opus 5.5 $0.00016 $0.00176
Sonnet 5.5 $0.00008 $0.00088
Haiku 4.5 $0.00004 $0.00044

Measured 1mo ago against content hash 20deb9f3b8db, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ml-leakage-check 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 1mo 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/machine-learning-ops/skills/ml-leakage-check/SKILL.md · 43 lines

What it actually says

Purpose

Target leakage is the most common and dangerous error in applied ML. It creates models that look perfect in validation but fail instantly in production. This check inspects the pipeline for the standard leakage vectors.

When to Use

  • Reviewing preprocessing or feature-engineering code before training sign-off
  • Validation metrics look too good to be true
  • A model performed far worse in production than in validation

Inputs

  • The preprocessing/feature pipeline code and the train/test split logic

Workflow

  1. Global scaling/imputation: was any statistic (mean, std, encoder vocabulary) computed on the entire dataset before splitting? That leaks the test distribution into training.
  2. Future features: is any training feature unavailable at the moment of prediction in real life? (e.g., using "surgery_outcome" to predict "hospital_admission_length")
  3. ID proxies: are database IDs or row numbers included as features? They often correlate with time or order of entry.
  4. Enforce the order: Split FIRST, then fit transformers on Train ONLY, then transform Train/Val/Test.

Output

  • A leakage verdict per vector (global statistics, future features, ID proxies), citing the offending lines and the fix for each

Verification

  • All fit/fit_transform calls occur after the split and only on training data
  • Every feature audited for availability at prediction time
  • No raw IDs or row numbers among the features
  • Findings cite specific code lines

Failure Modes

  • Pipeline blindness — leakage hidden inside helper functions or composed pipelines; trace where fitting actually happens.
  • "It's just scaling" — dismissing global scaling as harmless; it still leaks distribution information.
  • Fixing one vector only — re-running after one fix while the other vectors remain unchecked; audit all three every time.
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. 1mo ago First seen · 43 lines · 40 tokens per session scan A 20deb9f3b8db

Subscribe to this mod's changes

ml-leakage-check is a skill published in the GitHub repository yeaight7/agent-powerups (6 stars, last pushed 19d ago), licensed Apache-2.0. It adds 40 tokens to every session and 439 once invoked, about $0.0002 per session on Opus 5.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-09-14.