leakage-auditor

leakage-auditor is an agent for Claude Code from StamKavid/last-ds-mile. It costs 83 tokens per session (683 once invoked), scanned A, original, MIT.

A code reviewer for machine-learning data pipelines that looks for target leakage: training or validation data containing information that would not be available when making real predictions.

In plain words
What is it for?
Use it to inspect feature-engineering and data-splitting code before modeling or reporting results, especially when a metric seems too good to be true.
Why use it?
It helps catch falsely high validation scores caused by future data, target-derived fields, or related records appearing in both training and validation.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter.

Part of the last-ds-mile plugin — 29 skills, 17 commands, 3 agents, 4 hooks shipped together

Good fit Use it to inspect feature-engineering and data-splitting code before modeling or reporting results, especially when a metric seems too good to be true.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/stamkavid/last-ds-mile/leakage-auditor
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.

Clone the repo
git clone --depth 1 https://github.com/StamKavid/last-ds-mile

Made for: Claude Code.

Or install last-ds-mile, the plugin that ships this one along with the rest of its 29 skills, 17 commands, 3 agents, 4 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/stamkavid/last-ds-mile/leakage-auditor/github.svg)](https://agentmods.dev/agents/stamkavid/last-ds-mile/leakage-auditor)
Your own site
<a href="https://agentmods.dev/agents/stamkavid/last-ds-mile/leakage-auditor"><img src="https://agentmods.dev/badge/agents/stamkavid/last-ds-mile/leakage-auditor/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 leakage-auditor

Your own site · 80×15
<a href="https://agentmods.dev/agents/stamkavid/last-ds-mile/leakage-auditor"><img src="https://agentmods.dev/badge/agents/stamkavid/last-ds-mile/leakage-auditor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 83 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 683 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.00083 $0.00683
Opus 5 $0.00042 $0.00342
Sonnet 5 $0.00017 $0.00137
Haiku 4.5 $0.00008 $0.00068

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

Security

Grade A, and why

leakage-auditor 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 10d 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.

agents/leakage-auditor.md · 32 lines

What it actually says

You are a leakage-hunting specialist for a data science pipeline. Target leakage is the single highest-cost failure mode in applied ML: it produces a model that looks excellent in validation and fails in production, often silently, because it learned from information it will never have access to at prediction time.

Your job: adversarially inspect the feature engineering and validation code (and if given .last-ds-mile/stages/*.md, the stage notes) for every path leakage can enter:

  1. Target-derived features — a feature computed as a direct or near-direct function of the target (e.g. a log_price column when predicting price, a ratio computed using the target as a denominator/numerator).
  2. Temporal leakage — any feature using information that would not have existed at the point of prediction (future aggregates, post-outcome timestamps, "next event" fields).
  3. Validation-split leakage — preprocessing (scaling, imputation, target encoding, feature selection) fit on the full dataset before the train/validation split, rather than fit on train only and applied to validation.
  4. Group leakage — related rows (same user, same entity, repeated measurements) split across train and validation when they shouldn't be.
  5. Duplicate-row leakage — identical or near-identical rows appearing in both train and validation.

For each finding: name the exact feature/column or line of code, explain the leakage mechanism concretely (not "this might leak" — say what information reaches training that shouldn't), and state the fix. If a metric was reported, note whether this finding would explain an implausibly good number.

Tag every finding with exactly one confidence tier — pick the tier by what you actually verified, not by how severe the finding feels:

  • Confirmed — you traced the actual computation or data flow and it provably uses information unavailable at prediction time.
  • Likely — strong circumstantial evidence (an implausible correlation plus a plausible leakage mechanism) but you couldn't fully trace the exact computation from what you were given.
  • Worth checking — the pattern matches one of the five categories above in shape, but your evidence for it is thin.

Report every candidate finding at whatever tier it earns — your job here is coverage, not filtering. Do not omit a finding because it only reaches "worth checking"; the calling skill decides what to act on immediately versus flag for later.

If you find nothing after a genuine adversarial pass, say so explicitly and name what you checked — do not report "no leakage found" without listing the categories above and confirming each was inspected.

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. 10d ago First seen · 32 lines · 83 tokens per session scan A a56c4afeb272

Subscribe to this mod's changes

leakage-auditor is an agent published in the GitHub repository StamKavid/last-ds-mile (3 stars, last pushed 1mo ago), licensed MIT. It adds 83 tokens to every session and 683 once invoked, about $0.0004 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.

Related

Other agents, from other repositories

mlops-reviewer

MLOps / model lifecycle pre-implementation reviewer. Outputs threat model TM-{slug}.md and signs off training-pipeline + serving-strategy decisions before senior-dev claims tasks.

avelikiy/great_cto · 41 tokens

geo-routing-engineer

Geospatial and routing specialist for Product-Builder products with maps, scheduling-by-location, or vehicle routing (route-optimization in logistics, dispatch in home services, field-booking). Owns the routing contract — geocoding, the VRP/routing model (constraints, objective), maps/distance-matrix provider…

avelikiy/great_cto · 112 tokens

evolve-data-integrity-check

Data-pipeline integrity auditor for the Evolve Loop (Evaluate archetype). The advisor INSERTS this phase after Build whenever the cycle's scout.goaltype == "data-pipeline", to statically audit the changed batch/stream code for records it could silently corrupt, drop, duplicate, or reorder — and BLOCKS when a CRITICAL…

mickeyyaya/evolve-loop · 83 tokens

actor

Meta-agent that adopts external personalities and adapts them to LETS modes. Loads identity from personality text provided in prompt, then operates as that persona with LETS structured output.

restarter/lets-workflow · 37 tokens

prompt-reviewer

LLM prompt-engineering expert for the review-panel skill. Spawned when the diff touches LLM/API prompts, prompt templates, or inline model instructions in application code (system/user prompts, few-shot templates, prompt-string builders). Reviews prompting quality, output contracts, context economy, injection surface…

kbichave/skills · 92 tokens

ml-reviewer

Machine-learning expert for the review-panel skill. Spawned when the diff touches ML frameworks (torch, tensorflow, sklearn, xgboost, lightgbm, transformers), training/eval scripts, or notebooks. Hunts data leakage, evaluation flaws, reproducibility gaps, and tensor bugs. Outputs the shared panel JSON.

kbichave/skills · 67 tokens