From medsci-project
Replicates an existing cohort study's methodology on a different database by extracting study design from a source paper, mapping variables via harmonization table, generating analysis code, and producing a replication difference report.
How this skill is triggered — by the user, by Claude, or both
Slash command
/medsci-project:replicate-studyopusThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are assisting a medical researcher in replicating an existing published study's methodology
You are assisting a medical researcher in replicating an existing published study's methodology on a different database. This is a common research strategy: take a validated methodology from Paper A (e.g., NHIS cohort study) and apply it to Database B (e.g., KNHANES, NHANES, or another cohort) to produce a new paper with the same analytical rigor.
${SKILL_DIR}/references/harmonization_knhanes_nhanes.csv (if KNHANES↔NHANES)${SKILL_DIR}/references/methodology_extraction_template.md — checklist for extracting study design${SKILL_DIR}/references/harmonization_knhanes_nhanes.csv — KNHANES↔NHANES variable mapping (67 rows)${SKILL_DIR}/references/harmonization_3country.csv — KNHANES+NHANES+CHNS 3-country mapping (45 rows, if available)medsci-skills/skills/write-paper/references/paper_types/nhis_cohort.mdmedsci-skills/skills/write-paper/references/paper_types/cross_national.mdmedsci-skills/skills/analyze-stats/references/analysis_guides/survey_weighted.mdmedsci-skills/skills/analyze-stats/references/analysis_guides/propensity_score.mdpandas + R via subprocess for survey-weighted):
a. Data loading & cleaning: read target DB, apply inclusion/exclusion
b. Variable derivation: recode variables per mapping table
c. Survey design setup: define svydesign object (strata, PSU, weights)
d. Table 1: demographics by exposure group (weighted)
e. Main analysis: replicate the primary model (logistic/Cox/linear regression)
f. Subgroup analyses: if specified in source paper
g. Sensitivity analyses: replicate all listed in source paper/analyze-stats templates where available (survey_weighted, propensity_score).Generate a structured difference report documenting:
| Section | Content |
|---|---|
| Study Design | Same / Modified (explain) |
| Database | Source DB → Target DB (N, years, country) |
| Population | Inclusion/exclusion differences |
| Variable Mapping | Full mapping table with match status |
| Unavailable Variables | What's missing and how handled |
| Methodological Differences | Any forced changes (e.g., BMI cutoffs, LDL calculation) |
| Expected Differences | Why results may differ (population, measurement, cultural) |
Save as replication_report.md in the working directory.
Before reporting completion, verify:
/define-variables to cross-check whether to mirror the legacy definition (pure replication) or upgrade to current (extension). Document the choice explicitly in the difference report.{working_dir}/
├── replication_report.md — Structured difference report
├── variable_mapping.csv — Variable mapping table with match status
├── analysis_code.py — Main analysis script (Python + R calls)
├── analysis_code.R — R script for survey-weighted analysis
└── results/
├── table1.csv — Demographics table
├── main_results.csv — Primary analysis results
└── subgroup_results.csv — Subgroup analysis results (if applicable)
/replicate-study
Source paper: Joo 2026 (Psychiatry Research) — depression/diabetes cross-national
Target DB: /path/to/knhanes/HN18.csv
Harmonization: /path/to/harmonization_knhanes_nhanes.csv
[VERIFY: variable_name] and ask the user to confirm against the data dictionary./search-lit for all citations.npx claudepluginhub aperivue/medsci-skills --plugin medsci-projectGenerates batch analysis scripts from a validated methodology template by swapping exposure/outcome variables for cohort studies. Produces R/Python code + summary matrix.
Guides epidemiological study analysis from PECO question design through statistical modeling and publication-ready reporting. Runs Python code for NHANES/UK-Biobank-style cohort, case-control, and cross-sectional analyses.
Runs replication, robustness, and specification-sensitivity workflows for Stata projects. Reproduces results, reruns pipelines, compares specifications, audits do-files, and checks claim stability.