Scan
Statically scan Python source for data-leakage patterns such as fitting a scaler, imputer, or feature selector on the full dataset before the train/test split. Use when the user wants to check a codebase or script for leakage without running it, or to wire leakage checks into pre-commit or CI.From its SKILL.md
npx -y skills add OfficialBishal/research-leakproof --skill scanAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 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.
SKILL.md
1.2 KB, as published. Nobody here has run it
Scan code for leakage patterns
Run the static scanner over the target (default to the project if $ARGUMENTS is empty):
PYTHONPATH="${CLAUDE_PLUGIN_ROOT}" python -m research_leakproof scan "$ARGUMENTS"
Add --json for structured output, or --fail-on error to only fail CI on errors. The scanner reads source with Python's ast and never executes it, so it is safe to run anywhere.
For each finding, show the file:line, explain why the pattern leaks (fitting preprocessing on all the data lets test-set statistics into training), and propose the fix: split first, fit the transform on X_train, then transform X_test.
If the user wants this enforced automatically, offer to add the bundled pre-commit hook (.pre-commit-hooks.yaml) or the GitHub Actions workflow (.github/workflows/ci.yml) to their project.