agentsclimarketplace

Ml leakage check

Skill yeaight7/agent-powerups/plugins/machine-learning-ops/skills/ml-leakage-check

Curated power-ups for coding agents: skills, slash commands, MCP configs, hooks, AGENTS.md templates, and workflows for serious software engineering. Claude Code, Codex, Antigravity CLI, Cursor and more

Install
npx -y skills add yeaight7/agent-powerups --skill ml-leakage-check

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 6 stars6 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use when reviewing ML preprocessing or feature pipelines for target leakage -- validation metrics look suspiciously good, transformers are fitted before splitting, or features may not exist at prediction time.

SKILL.md

2.1 KB, 393 tokens by cl100k_base, as published. Nobody here has run it

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.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,984. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.