Works with the AI Agents you already use

    ML Experiment Reviewer

    by MUHAMMAD WAQAS

    1

    A deterministic rule engine (19 checks, Python standard library only) parses your code.

    Free

    Security scanned
    ML Experiment Reviewer

    ML Experiment Reviewer

    Example session with this skill installed

    Review examples/leaky_churn.py for data leakage and anything else that makes the scores unreliable.

    • Read your context and instructions
    • Compiled the ml experiment reviewer

    ML Experiment Review: leaky_churn.py

    Verdict: FAIL - the reported 1.000 accuracy and ROC AUC are not trustworthy until the 2 critical issues are fixed.

    CriticalHighMediumLow
    2022

    1. [CRITICAL] Target column left inside the features (ML003, line 24)

    X = df.drop(columns=["f11"])
    Why it matters: X is built from df, but the target 'churn' is never removed, so the model reads the answer directly. That is why every score is a perfect 1.000.
    Fix: X = df.drop(columns=["churn"])

    2. [CRITICAL] Preprocessing fitted before the train/test split (ML001, line 27)

    X = scaler.fit_transform(X)
    Why it matters: StandardScaler learns mean and scale from all rows, including future test rows.
    Fix: split first and fit inside a pipeline: pipe = make_pipeline(StandardScaler(), model); pipe.fit(X_train, y_train)

    3. [MEDIUM] Missing values filled with statistics from all rows (ML011, line 21)

    df = df.fillna(df.mean()) → use SimpleImputer inside the pipeline.

    4. [MEDIUM] ROC AUC computed from hard predictions (ML013, line 36)

    roc_auc_score(y_test, model.predict(X_test)) → use model.predict_proba(X_test)[:, 1].

    5. [LOW] Random seeds not set (ML018, line 29): train_test_split and RandomForestClassifier have no random_state.

    6. [LOW] Classification split without stratify (ML019, line 29): add stratify=y. Only 5% of customers churn.

    AI review (second pass)

    • [MEDIUM] Class imbalance ignored by the model (line 31): 5% churners and no class_weight, so the model will rarely predict churn once the leak is fixed. Fix: RandomForestClassifier(class_weight="balanced", random_state=42).

    What static review cannot confirm

    Duplicate customers across splits, and data prepared in other files or SQL.

    Next step: I can apply these fixes now. After fixing, the same data gives a realistic ROC AUC of about 0.83, and the model catches about half of the churners instead of a fake 100%.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Your model scores 0.99, but is it real? This skill reviews ML training code (.py scripts and Jupyter notebooks) for the bugs that silently inflate results, and returns a report ranked by severity with a concrete fix for every finding.

    What it catches

    • Data leakage: scalers, imputers, encoders, PCA or feature selection fitted before the split; target left in the features; target encoding on all rows; SMOTE before the split
    • Train/test contamination: fitting on test data, test set used for early stopping or tuning, model trained on the full dataset then scored on test
    • Misleading metrics: accuracy-only on imbalanced data, ROC AUC from hard predictions, training-only scores
    • Wrong splits: random splits on time series or on data with repeated users/patients
    • Reproducibility and PyTorch: missing seeds, missing zero_grad(), missing model.eval()

    How it works

    1. A deterministic rule engine (19 checks, Python standard library only) parses your code. It never executes it, and your code never leaves your machine.
    2. Your agent then reads the code itself to confirm each finding and catch what rules cannot see: features only known after the outcome, ID columns used as features, unused fitted vectorizers.
    3. You get a verdict (FAIL / WARNING / PASS), findings ranked critical to low with exact line or notebook-cell locations, and the fix for each.

    Why this beats prompting it yourself

    Generic code review misses leakage because the code runs without errors. The rule engine tracks how data flows to the split, cross-validation and evaluation calls, so it gives the same answer every time and points to the exact line. It was tested on scikit-learn's 282 official examples with no crashes.

    Supports Python only. Static analysis follows variables within one file; cannot detect leakage in external SQL or data exports. Variable naming influences rule detection.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 9 days ago

    • Free with an Agensi account

    Software
    python 3.9+

    Permissions

    Terminal / Shell
    Read Files
    Write Files

    File Scopes

    **/*.py
    **/*.ipynb

    Runs scripts/mlreview.py on the files you choose. It parses code and never executes it. No network access, no API keys. Write access is only for the temporary copy of the script and, if you ask, saving the report or applying fixes.

    Listed9 days ago

    What's inside

    Frequently Asked Questions

    No. It only reads and parses the code.

    No. Your own agent reviews it locally.

    No.

    The ones in the compatibility note. It works on Python code only.

    New in Code Quality & Review

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.

    Free