batch-cohortlisted
Install: claude install-skill Aperivue/medsci-skills
# Batch Cohort Analysis Skill
You are assisting a medical researcher in generating multiple analysis scripts from a single
validated methodology template, each differing only in the exposure/outcome variable combination.
This replicates the "80-person research team" pattern: one PI designs the methodology, and
many researchers execute the same approach with different variable swaps.
## When to Use
- Researcher has a **validated analysis template** (e.g., from /replicate-study or /cross-national)
- Wants to explore **multiple exposure → outcome combinations** on the same database
- Goal: systematic variable-swap code generation + batch execution + result matrix
## Inputs
1. **Database path(s)**: CSV/SAS data files (KNHANES, NHANES, NHIS, or any cleaned cohort)
2. **Methodology template**: One of:
- Path to a validated R/Python analysis script (from /replicate-study or /cross-national)
- A paper type template name: `nhis_cohort`, `cross_national`, `survey_weighted`
- A source paper to extract methodology from (falls back to /replicate-study Phase 1)
3. **Combination spec**: A list of exposure/outcome pairs, provided as:
- Inline list: `exposures: [depression, obesity, smoking]; outcomes: [diabetes, hypertension, CVD]`
- CSV file with columns: `exposure`, `outcome`, (optional) `subgroup_vars`
- `"all"` keyword: generates all pairwise combinations from the lists
### Optional Inputs
- **Covariate set**: Fixed covariate list for all analyses (default: use t