review-data-analysis
Review a data analysis for quality, correctness, and reproducibility. Covers data quality assessment, assumption checking, model validation, data leakage detection, and reproducibility verification. Use when reviewing a colleague's analysis before publication, validating an ML pipeline before production deployment, auditing a report for regulatory or business decision-making, or performing a second-analyst review in a regulated environment.
Best use case
review-data-analysis is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Review a data analysis for quality, correctness, and reproducibility. Covers data quality assessment, assumption checking, model validation, data leakage detection, and reproducibility verification. Use when reviewing a colleague's analysis before publication, validating an ML pipeline before production deployment, auditing a report for regulatory or business decision-making, or performing a second-analyst review in a regulated environment.
Teams using review-data-analysis should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/review-data-analysis/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How review-data-analysis Compares
| Feature / Agent | review-data-analysis | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Review a data analysis for quality, correctness, and reproducibility. Covers data quality assessment, assumption checking, model validation, data leakage detection, and reproducibility verification. Use when reviewing a colleague's analysis before publication, validating an ML pipeline before production deployment, auditing a report for regulatory or business decision-making, or performing a second-analyst review in a regulated environment.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
AI Agent for Product Research
Browse AI agent skills for product research, competitive analysis, customer discovery, and structured product decision support.
AI Agent for SaaS Idea Validation
Use AI agent skills for SaaS idea validation, market research, customer discovery, competitor analysis, and documenting startup hypotheses.
SKILL.md Source
# Review Data Analysis Evaluate a data analysis pipeline for correctness, robustness, and reproducibility. ## When to Use - Reviewing a colleague's analysis notebook or script before publication - Validating a machine learning pipeline before production deployment - Auditing an analytical report for regulatory or business decision-making - Assessing whether an analysis supports its stated conclusions - Performing a second-analyst review in a regulated environment ## Inputs - **Required**: Analysis code (scripts, notebooks, or pipeline definitions) - **Required**: Analysis output (results, tables, figures, model metrics) - **Optional**: Raw data or data dictionary - **Optional**: Analysis plan or protocol (pre-registered or ad-hoc) - **Optional**: Target audience and decision context ## Procedure ### Step 1: Assess Data Quality Review the input data before evaluating the analysis: ```markdown ## Data Quality Assessment ### Completeness - [ ] Missing data quantified (% by column and by row) - [ ] Missing data mechanism considered (MCAR, MAR, MNAR) - [ ] Imputation method appropriate (if used) or complete-case analysis justified ### Consistency - [ ] Data types match expectations (dates are dates, numbers are numbers) - [ ] Value ranges are plausible (no negative ages, future dates in historical data) - [ ] Categorical variables have expected levels (no misspellings, consistent coding) - [ ] Units are consistent across records ### Uniqueness - [ ] Duplicate records identified and handled - [ ] Primary keys are unique where expected - [ ] Join operations produce expected row counts (no fan-out or drop) ### Timeliness - [ ] Data vintage appropriate for the analysis question - [ ] Temporal coverage matches the study period - [ ] No look-ahead bias in time-series data ### Provenance - [ ] Data source documented - [ ] Extraction date/version recorded - [ ] Any transformations between source and analysis input documented ``` **Got:** Data quality issues documented with their potential impact on results. **If fail:** If data is not accessible for review, assess quality from the code (what checks and transformations are applied). ### Step 2: Check Assumptions For each statistical method or model used: | Method | Key Assumptions | How to Check | |--------|----------------|-------------| | Linear regression | Linearity, independence, normality of residuals, homoscedasticity | Residual plots, Q-Q plot, Durbin-Watson, Breusch-Pagan | | Logistic regression | Independence, no multicollinearity, linear logit | VIF, Box-Tidwell, residual diagnostics | | t-test | Independence, normality (or large n), equal variance | Shapiro-Wilk, Levene's test, visual inspection | | ANOVA | Independence, normality, homogeneity of variance | Shapiro-Wilk per group, Levene's test | | Chi-squared | Independence, expected frequency ≥ 5 | Expected frequency table | | Random forest | Sufficient training data, feature relevance | OOB error, feature importance, learning curves | | Neural network | Sufficient data, appropriate architecture, no data leakage | Validation curves, overfitting checks | ```markdown ## Assumption Check Results | Analysis Step | Method | Assumption | Checked? | Result | |---------------|--------|------------|----------|--------| | Primary model | Linear regression | Normality of residuals | Yes | Q-Q plot shows mild deviation — acceptable for n>100 | | Primary model | Linear regression | Homoscedasticity | No | Not checked — recommend adding Breusch-Pagan test | ``` **Got:** Every statistical method has its assumptions explicitly checked or acknowledged. **If fail:** If assumptions are violated, check whether the authors addressed this (robust methods, transformations, sensitivity analysis). ### Step 3: Detect Data Leakage Data leakage occurs when information from outside the training set influences the model, leading to over-optimistic performance: #### Common leakage patterns: - [ ] **Target leakage**: Feature that directly encodes the target variable (e.g., "treatment_outcome" used to predict "treatment_success") - [ ] **Temporal leakage**: Future information used to predict the past (features computed from data that wouldn't be available at prediction time) - [ ] **Train-test contamination**: Preprocessing (scaling, imputation, feature selection) fitted on full dataset before splitting - [ ] **Group leakage**: Related observations (same patient, same device) split across train and test sets - [ ] **Feature engineering leakage**: Aggregates computed across the entire dataset rather than within the training fold ```markdown ## Leakage Assessment | Check | Status | Evidence | |-------|--------|----------| | Target leakage | Clear | No features derived from target | | Temporal leakage | CONCERN | Feature X uses 30-day forward average | | Train-test contamination | Clear | StandardScaler fit on train only | | Group leakage | CONCERN | Patient IDs not used for stratified split | ``` **Got:** All common leakage patterns checked with clear/concern status. **If fail:** If leakage is found, estimate its impact by re-running without the leaked feature (if possible) or flag for the analyst to investigate. ### Step 4: Validate Model Performance #### For predictive models: - [ ] Appropriate metrics for the problem (not just accuracy — consider precision, recall, F1, AUC, RMSE, MAE) - [ ] Cross-validation or holdout strategy described and appropriate - [ ] Performance on training vs. test/validation set compared (overfitting check) - [ ] Baseline comparison provided (naive model, random chance, previous approach) - [ ] Confidence intervals or standard errors on performance metrics - [ ] Performance evaluated on relevant subgroups (fairness, edge cases) #### For inferential/explanatory models: - [ ] Model fit statistics reported (R², AIC, BIC, deviance) - [ ] Coefficients interpreted correctly (direction, magnitude, significance) - [ ] Multicollinearity assessed (VIF < 5–10) - [ ] Influential observations identified (Cook's distance, leverage) - [ ] Model comparison if multiple specifications tested **Got:** Model validation appropriate for the use case (prediction vs. inference). **If fail:** If test set performance is suspiciously close to training performance, flag potential leakage. ### Step 5: Assess Reproducibility ```markdown ## Reproducibility Checklist | Item | Status | Notes | |------|--------|-------| | Code runs without errors | [Yes/No] | Tested on [environment description] | | Random seeds set | [Yes/No] | Line [N] in [file] | | Dependencies documented | [Yes/No] | requirements.txt / renv.lock present | | Data loading reproducible | [Yes/No] | Path is [relative/absolute/URL] | | Results match reported values | [Yes/No] | Verified: Table 1 ✓, Figure 2 ✗ (minor discrepancy) | | Environment documented | [Yes/No] | Python 3.11 / R 4.5.0 specified | ``` **Got:** Reproducibility verified by re-running the analysis (or assessing from code if data is unavailable). **If fail:** If results don't reproduce exactly, determine if differences are within floating-point tolerance or indicate a problem. ### Step 6: Write the Review ```markdown ## Data Analysis Review ### Overall Assessment [1-2 sentences: Is the analysis sound? Does it support the conclusions?] ### Data Quality [Summary of data quality findings, impact on results] ### Methodological Concerns 1. **[Title]**: [Description, location in code/report, suggestion] 2. ... ### Strengths 1. [What was done well] 2. ... ### Reproducibility [Tier assessment: Gold/Silver/Bronze/Opaque with justification] ### Recommendations - [ ] [Specific action items for the analyst] ``` **Got:** Review provides actionable feedback with specific references to code locations. **If fail:** If time-constrained, prioritize data quality and leakage checks over style issues. ## Validation - [ ] Data quality assessed across completeness, consistency, uniqueness, timeliness, provenance - [ ] Statistical assumptions checked for each method used - [ ] Data leakage systematically assessed - [ ] Model performance validated with appropriate metrics and baselines - [ ] Reproducibility evaluated (code runs, results match) - [ ] Feedback is specific, referencing code lines or report sections - [ ] Tone is constructive and collaborative ## Pitfalls - **Reviewing only the code**: The analysis plan and conclusions matter as much as the implementation. - **Ignoring data quality**: Sophisticated models on bad data produce confident wrong answers. - **Assuming correctness from complexity**: A random forest with 95% accuracy might have data leakage; a simple t-test might be the correct approach. - **Not running the code**: If at all possible, execute the code to verify reproducibility. Reading code is not sufficient. - **Missing the forest for the trees**: Don't get lost in code style issues while missing a fundamental analytical error. ## Related Skills - `review-research` — broader research methodology and manuscript review - `validate-statistical-output` — double-programming verification methodology - `generate-statistical-tables` — publication-ready statistical tables - `review-software-architecture` — code structure and design review
Related Skills
version-ml-data
Version machine learning datasets using DVC (Data Version Control) with remote storage backends, build reproducible data pipelines with dependency tracking, integrate with Git workflows, and ensure data lineage for model reproducibility. Use when versioning large datasets that do not fit in Git, tracking data changes alongside code changes, ensuring ML experiment reproducibility, sharing datasets across team members, or auditing data lineage for compliance requirements.
serialize-data-formats
Serialize and deserialize data across common formats: JSON, XML, YAML, Protocol Buffers, MessagePack, Apache Arrow/Parquet. Covers format selection criteria, encoding/decoding patterns, performance tradeoffs, and interoperability. Use when choosing a wire format for API communication, persisting structured data to disk, exchanging data between systems in different languages, optimizing transfer size or parsing speed, or migrating from one serialization format to another.
review-web-design
Review web design for layout, typography, colour, spacing, responsive behaviour, brand consistency, and visual hierarchy. Covers design principles and improvement recommendations. Use for mockup review before development, implemented site assessment, design review feedback, brand consistency check, or responsive behaviour at breakpoints.
review-ux-ui
Review UX and UI design with Nielsen heuristics, WCAG 2.1 accessibility, keyboard and screen reader audit, user flow analysis, cognitive load assessment, and form usability. Use for usability review before release, WCAG 2.1 audit, user flow evaluation, form review, or heuristic evaluation of an existing interface.
review-software-architecture
Review software architecture for coupling, cohesion, SOLID principles, API design, scalability, and technical debt. Covers system-level evaluation, architecture decision record review, and improvement recommendations. Use when evaluating a proposed architecture before implementation, assessing an existing system for scalability or security, reviewing ADRs, performing a technical debt assessment, or evaluating readiness for significant scale-up.
review-skill-format
Review a SKILL.md file for compliance with the agentskills.io standard. Checks YAML frontmatter fields, required sections, line count limits, procedure step format, and registry synchronization. Use when a new skill needs format validation before merge, an existing skill has been modified and requires re-validation, performing a batch audit of all skills in a domain, or reviewing a contributor's skill submission in a pull request.
review-research
Conduct a peer review of research methodology, experimental design, and manuscript quality. Covers methodology evaluation, statistical appropriateness, reproducibility assessment, bias identification, and constructive feedback. Use when reviewing a manuscript, preprint, or internal research report, evaluating a research proposal or study protocol, assessing evidence quality behind a claim, or reviewing a thesis chapter or dissertation section.
review-pull-request
Review a pull request end-to-end using GitHub CLI. Covers diff analysis, commit history review, CI/CD check verification, severity-leveled feedback (blocking/suggestion/nit/praise), and gh pr review submission. Use when a pull request is assigned for review, performing a self-review before requesting others' input, conducting a second review after feedback is addressed, or auditing a merged PR for post-merge quality assessment.
review-codebase
Multi-phase deep codebase review with severity ratings and structured output. Covers architecture, security, code quality, and UX/accessibility in a single coordinated pass. Produces a prioritized findings table suitable for direct conversion to GitHub issues via the create-github-issues skill.
plan-spectroscopic-analysis
Plan a comprehensive spectroscopic analysis campaign by defining the analytical question, assessing sample characteristics, selecting appropriate techniques using a decision matrix, planning sample preparation for each technique, sequencing analyses from non-destructive to destructive, and defining success criteria with a cross-validation strategy.
monitor-data-integrity
Design and operate a data integrity monitoring programme based on ALCOA+ principles. Covers detective controls, audit trail review schedules, anomaly detection patterns (off-hours activity, sequential modifications, bulk changes), metrics dashboards, investigation triggers, and escalation matrix definition. Use when establishing a data integrity monitoring programme for GxP systems, preparing for inspections where data integrity is a focus area, after a data integrity incident requiring enhanced monitoring, or when implementing MHRA, WHO, or PIC/S guidance.
label-training-data
Set up systematic data labeling workflows using Label Studio or similar tools. Implement quality controls, measure inter-annotator agreement, manage labeler teams, and integrate labeled data into ML training pipelines. Use when starting a supervised ML project that requires labeled training data, when model performance is limited by insufficient labeled examples, when labeling text, images, audio, or video, or when implementing active learning to prioritize the most valuable examples.