agentleFS
samuhssamuhs/mad-science/skills/exp-review/SKILL.md

exp-review

Skill1 starsChanged 14 days agoMITView on GitHub

Review experiment code and Jupyter notebooks on two axes in parallel sub-agents: standards (does the code follow the repo's documented coding standards?) and quality (reproducibility, fixed seeds, data leakage, security, scalability, error handling). Use when the user wants to review an experiment, notebook or ML pipeline before moving on.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check whether the code follows the quality rules.

    line 6
  2. Distinctive:

    Query Sanitization: If the code dynamically queries databases, is it protected against SQL injection?

    line 17
  3. Distinctive:

    Standards & Typing: Ensure the code follows standard styling conventions (PEP8) and encourage the use of type hints for better …

    line 27

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Check whether the code follows the quality rules.

1. Reproducibility

  • Clean Execution: Can the code run end-to-end without failing if the kernel is restarted?
  • Dependency Management: Are the libraries and exact versions documented (e.g., requirements.txt, Pipfile)?
  • Artifact & Data Versioning: Are data paths and model artifacts versioned (e.g., DVC, MLflow, immutable S3 URIs) rather than relying on local, hardcoded paths (C:/user/data.csv)?
  • Fixed Seeds: Is the random_state or seed fixed for all stochastic processes (data splits, weight initializations, ML algorithms) to guarantee deterministic results?

2. Security

  • Credential Leakage: Are there any hardcoded passwords, API keys, access tokens, or DB URIs? Instruct the user to move these to environment variables or secret managers.
  • Sensitive Data (PII): Is the model exposing or directly logging Personally Identifiable Information (e.g., SSN, names, emails)? Ensure data is anonymized or hashed.
  • Query Sanitization: If the code dynamically queries databases, is it protected against SQL injection?

3. Scalability

  • Memory Optimization: Are data types optimized (e.g., using float32 instead of float64, or category instead of object in Pandas)? Will the code break if data volume doubles?
  • Vectorization: Flag any iterative loops (like for loops or iterrows) over datasets. Suggest vectorized operations using NumPy/Pandas.
  • Framework Suitability: Does the data volume require distributed processing (e.g., Spark/Dask) instead of in-memory processing (e.g., Pandas/Scikit-learn)?

4. Code Quality & Refactoring

  • Modularization: Identify feature engineering and training steps that should be extracted into modular .py scripts.
  • Dead Code Removal: Point out and request the removal of scratchpad cells, raw Exploratory Data Analysis (EDA) plots, and stray prints (df.head(), df.describe()) that do not belong in a final pipeline.
  • Standards & Typing: Ensure the code follows standard styling conventions (PEP8) and encourage the use of type hints for better maintainability.

5. Robustness & Error Handling

  • Edge Cases & Exceptions: Does the inference pipeline have clear rules to handle null values (NaN), infinite values, or new categorical levels not seen during training?
  • Logging vs. Printing: Flag any loose print() statements. Suggest replacing them with a properly configured logging module (INFO, WARNING, ERROR) for traceability.

6. Model Efficiency

  • Artifact Size: Is the saved model file (.pkl, .joblib, .onnx) optimized for the deployment environment?
  • Inference Latency: Does the prediction function contain unnecessary overhead that would bottleneck real-time API requirements?

Output Format: For every code review, structure your response using the following sections:

  1. Executive Summary: A brief assessment of the code's production readiness.
  2. Critical Issues (Blockers): Security flaws, data leakage, or major reproducibility issues.
  3. Refactoring Suggestions: Specific recommendations for scalability, code quality, and robustness, including code examples.
  4. Approval Status: State clearly whether the code is "Approved for Production", "Requires Minor Revisions", or "Needs Major Refactoring".

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.