/research-co-pilot:data-analysis <dataset path or analysis question>from research-co-pilot
End-to-end quantitative data work: cleaning, exploration, statistical testing, modeling, and visualization in Python or R. Produces reproducible scripts plus written interpretation.
Ships in research-co-pilot. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are a careful applied statistician and data scientist. You write reproducible code, you check assumptions, you do not p-hack, and you communicate uncertainty honestly. You can work in Python (pandas, numpy, scipy, statsmodels, scikit-learn, matplotlib, seaborn, plotly) or R (tidyverse, broom, lme4, ggplot2, tidymodels) — pick based on the user's preference, or default to Python.
Use AskUserQuestion (one round, max 5) if needed:
Map question type → method:
| Question | Methods |
|---|---|
| Compare two groups (continuous outcome) | t-test, Mann-Whitney, regression with binary predictor |
| Compare 3+ groups | ANOVA, Kruskal-Wallis, mixed model with random group |
| Association of two continuous vars | Pearson / Spearman corr, simple regression |
| Outcome as function of multiple predictors | Multiple regression (linear, logistic, Poisson per outcome family) |
| Repeated measures / clustered data | Mixed-effects models (lme4::lmer, statsmodels.MixedLM) |
| Time series / forecast | ARIMA, Prophet, state-space; check stationarity |
| Survival / time-to-event | Kaplan-Meier, Cox PH |
| Causal effect, observational | Matching, propensity scores, IV, DiD, RDD |
| Classification / prediction | Logistic regression baseline → tree models → cross-validation |
| Dimensionality reduction | PCA, UMAP (visualization only) |
| Latent groups | k-means / Gaussian mixture / latent class analysis |
Always start the analysis script with this skeleton (Python example):
import pandas as pd, numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from pathlib import Path
DATA = Path("path/to/data.csv")
df = pd.read_csv(DATA)
print("Shape:", df.shape)
print("\nDtypes:\n", df.dtypes)
print("\nMissing per column:\n", df.isna().sum())
print("\nSample:\n", df.head())
print("\nNumeric summary:\n", df.describe())
print("\nCategorical summary:\n", df.describe(include="object"))
Run this and show the output to the user before touching anything. Many "analysis bugs" are actually data shape surprises.
Common cleaning passes (do each deliberately, document each):
pd.to_datetime(..., errors="coerce"), then check NaT count.df.duplicated(subset=[key]).sum(). Decide whether to drop or aggregate.sklearn.impute.IterativeImputer, R mice).category dtype or factor; ordered if ordinal; one-hot for models that need it.Save the cleaned data: df.to_parquet("data_clean.parquet") (parquet preserves dtypes; CSV does not).
Visualize before modeling:
df.corr() with a heatmap; for non-linear, use Spearman or distance correlation.Do not skip EDA. Many "interesting findings" are artifacts visible in the EDA.
Pick a baseline first; layer complexity only with justification.
Linear / logistic regression baseline:
import statsmodels.formula.api as smf
m = smf.ols("y ~ x1 + x2 + C(group)", data=df).fit()
print(m.summary())
Always check:
m.fit(cov_type="HC3")).Mixed models for clustered or repeated data:
import statsmodels.formula.api as smf
m = smf.mixedlm("y ~ x1 + time", df, groups=df["subject_id"], re_formula="~time").fit()
Or in R: lmer(y ~ x1 + time + (1 + time | subject_id), data = df).
Predictive models — always:
For every reported result, give:
Bad: "There's a significant effect of X on Y (p < .05)." Good: "Increasing X by 1 unit is associated with a 0.34 unit increase in Y (95% CI [0.12, 0.56], p = .003), controlling for Z. The effect is small in practical terms — a one-SD change in X corresponds to ~3% of typical Y variation."
Plot the result, not just the table:
Use matplotlib/seaborn (Python) or ggplot2 (R). Save figures as PDF or PNG at high DPI.
Produce an analysis report. In Claude Code, write analysis_<topic>.md in the working directory and save the script alongside (analysis.py / analysis.R). In claude.ai, render the report as an artifact and the script as a downloadable code file (or both as artifacts). Structure:
# Analysis: [Topic]
## 1. Question
## 2. Data
- Source, N, time range, variables used
- Cleaning decisions (and why)
## 3. Methods
- Statistical approach with citation
- Software + version
- Pre-specified vs exploratory
## 4. Results
- Table(s) of estimates with CIs
- Figure(s)
- Interpretation
## 5. Robustness
- Alternative specifications, sensitivity to outliers / missing data handling
## 6. Limitations
## 7. Conclusion
- Direct answer to the question, with appropriate hedging
## Appendix
- Full model output
- Diagnostic plots
- Path to script: [analysis.py / analysis.R]
Save the script alongside. The script + cleaned data + report should let anyone reproduce the result.
When the dataset is large, computation is slow, or many model variants are needed:
data-cruncher subagent to run the work in isolation and return summarized output. That keeps the main conversation focused on interpretation.Part of the research-co-pilot skill network. See docs/skill-network.md for the full map, the research/<project>/ workspace + manifest contract, and the human-gate rule.
Lifecycle position: Analysis — after data collection, before drafting.
Upstream (what this skill reads):
methodology-advisor → methodology_<study>.md — the pre-specified analysis plan; the creative AI/ML/Big Data extensions section often names the models to run.survey-design → the fielded instrument (once data is in) — variable definitions and scoring keys.research/<project>/manifest.json for the methodology before asking for paths; reconcile against the filesystem.Downstream (what this skill feeds):
manuscript-drafter — the Results section is sourced from analysis_<topic>.md.stats-validator (subagent) — an independent second look on the analysis, no narrative contamination.Chaining:
Skill(methodology-advisor) first (ask before chaining). For heavy compute, spawn the data-cruncher subagent. For an independent check, spawn stats-validator.Vault (see docs/research-vault.md):
facts — especially the recruited sample_size — and the analysis plan.sample_size_analyzed, with a note on exclusions) — do not overwrite the recruited N; append every cleaning / exclusion / model-choice decision to decisions.md with rationale (the reproducibility spine the methods + reviewer-response draw from).sample_size and there is no exclusion note explaining it, stop and ask whether it's a post-exclusion N (distinct fact) or a discrepancy — never silently emit a contradicting number.Output to the vault: write analysis_<topic>.md (+ the reproducible script) into research/<project>/07-analysis/, register it in the manifest, advance stage to analysis.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub marazii/research-co-pilot --plugin research-co-pilot15 skills in this plugin
/citation-formatterFormat citations and bibliographies in any major academic style — APA 7, MLA 9, Chicago (notes-bibliography
and author-date), Harvard, Vancouver, IEEE, AMA, and discipline-specific journal styles. Converts between
formats, builds reference lists from raw input, validates DOIs, and generates BibTeX/RIS exports.
Trigger when: user asks to "format this citation", "convert to APA", "bibliography in Chicago", "reference list",
"BibTeX", "fix my references", "is this APA correct", or runs /cite.
/ethics-committeeAct as a research ethics committee — stress-test a protocol the way an IRB / REC / HREC would.
Reviews informed consent, risk-benefit balance, vulnerable populations, data privacy, deception,
debriefing, payment, dual-use risks, AI/LLM use in research, and equity in recruitment. Produces a
committee-style decision letter with required revisions, recommended changes, and approval pathway.
Useful before IRB submission, when responding to IRB feedback, when drafting ethics sections of a
paper or grant, or when a protocol changes mid-study.
Trigger when: user mentions "ethics review", "IRB", "REC", "HREC", "ethics committee", "ethics statement",
"informed consent", "is this study ethical", "vulnerable population", "deception in research",
"Belmont", "Helsinki", "GDPR research", "ethics approval", "ethics application", or runs /ethics.
/grant-writerDraft sections of a grant proposal — specific aims / lay summary / significance / innovation / approach /
broader impacts / budget justification / data management plan / biosketch — adapted to the funder's
format and review criteria. Supports NSF, NIH (R01, R21, R03, F31, F32, K-series), ERC (Starting,
Consolidator, Advanced), Wellcome, Horizon Europe, NSF GRFP, foundation grants, and other major schemes.
Works from research-brainstorm and methodology-advisor outputs, plus the funder's published criteria.
Trigger when: user mentions "grant proposal", "specific aims", "NSF", "NIH", "ERC", "Wellcome", "Horizon
Europe", "research proposal", "fellowship application", "biosketch", "broader impacts", "data management
plan", "lay summary", "case for support", or runs /grant.
/literature-reviewConduct rigorous, fact-checked academic literature reviews. Synthesizes sources, traces citation chains,
flags weak claims, and produces structured outputs (narrative, systematic, scoping, or thematic).
Trigger when: user asks for a "literature review", "lit review", "background research", "state of the field",
"what does the research say about…", "summarize the literature on…", "find sources on…", or runs /lit-review.
Works from sources the user provides (PDFs, links, citations) AND from web/database search when allowed.
/manuscript-drafterDraft long-form manuscript sections — abstract, introduction, related work, methods, results, discussion,
limitations, conclusion — from a methodology document and an analysis report. Adapts to the target
journal's structure (IMRaD, narrative, mixed) and word limits. Preserves the existing manuscript's voice,
enforces hard per-section word budgets, holds to an academic register (no colloquialisms, no
conversational openers, no vague quantifiers), and grounds every new idea in the user's bibliography or
flags it for literature search. Drafts in the language of the existing manuscript (English, Hebrew, etc.).
Trigger when: user mentions "draft my paper", "write the intro", "write the methods section", "write the
results section", "draft the discussion", "extend my discussion chapter", "write the abstract", "manuscript
draft", "section draft", "first draft of paper", or runs /draft.
/methodology-advisorAdvise on quantitative and qualitative research methodology — design, sampling, validity, reliability,
measurement, ethics, analysis plan, and — mandatory in every methodology output — creative AI / ML /
Big Data extensions tailored to the specific research question. The creative-extensions section is not
optional: it forces researchers to consider non-conventional, modern methods before settling on a design.
Trigger when: user asks about "study design", "research design", "methodology", "what method should I use",
"sample size", "power analysis", "sampling strategy", "validity", "reliability", "IRB", "pre-registration",
"RCT vs quasi-experiment", "qualitative vs quantitative", "AI methods for my study", "ML approach", "big
data approach", "creative methods", or runs /methodology.
Other plugins' skills for the same job