exp-review
Installation
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_stateorseedfixed 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
float32instead offloat64, orcategoryinstead ofobjectin Pandas)? Will the code break if data volume doubles? - Vectorization: Flag any iterative loops (like
forloops oriterrows) 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)?