Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generate N analysis scripts from a single methodology template × multiple exposure/outcome combinations. The "80-person team" pattern — same validated method, swap variables only. Produces batch R/Python code + summary matrix.
.claude/skills/aperivue-batch-cohort/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 1772% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 79% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 140% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 68% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 91% | 0% |
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.
nhis_cohort, cross_national, survey_weightedexposures: [depression, obesity, smoking]; outcomes: [diabetes, hypertension, CVD]exposure, outcome, (optional) subgroup_vars"all" keyword: generates all pairwise combinations from the listscode_only (just scripts) | execute (run + collect results) | full (code + results + summary)EXPOSURE_VAR: raw variable name in the databaseEXPOSURE_LABEL: human-readable label for tables/figuresEXPOSURE_CODING: how to derive binary/categorical exposureOUTCOME_VAR: raw variable nameOUTCOME_LABEL: human-readable labelOUTCOME_CODING: how to derive binary outcomeFor each exposure and outcome in the combination spec:
HE_glu >= 126 → diabetes = 1)smoking: current/former/never)| # | Exposure | Exposure Coding | Outcome | Outcome Coding | Covariates (adjusted) | Notes |
|---|----------|-----------------|---------|----------------|----------------------|-------|
| 1 | Depression (PHQ≥10) | BP_PHQ sum ≥10 | Diabetes | HE_glu≥126|HbA1c≥6.5|DE1_dg=1 | age,sex,edu,income,smoking,alcohol,obesity,CVD | — |
| 2 | Obesity (BMI≥25) | HE_obe ≥4 | Diabetes | same | age,sex,edu,income,smoking,alcohol,depression,CVD | obesity removed from covariates |
| ... | | | | | | |For each combination in the matrix:
run_all.R or run_all.sh) that:future/parallel)execute or full mode)Aggregate all results into a single summary:
Main Results Matrix (summary_matrix.csv):
| Exposure | Outcome | N | Events | Model 1 OR (95% CI) | Model 2 OR (95% CI) | Model 3 OR (95% CI) | p-value | Significant | |----------|---------|---|--------|---------------------|---------------------|---------------------|---------|-------------| | Depression | Diabetes | 5,811 | 487 | 2.14 (1.52–3.01) | 1.89 (1.33–2.69) | 1.36 (0.91–2.05) | 0.137 | No | | Obesity | Diabetes | 5,811 | 487 | 3.45 (2.71–4.39) | 3.38 (2.65–4.32) | 3.12 (2.42–4.02) | <0.001 | Yes | | ... | | | | | | | | |
Subgroup Summary (subgroup_matrix.csv): Same format, stratified by subgroup variables.
Heatmap (optional): Visual matrix of effect sizes × significance, exposure on Y-axis, outcome on X-axis.
{working_dir}/batch_{timestamp}/
├── README.md — Batch run summary (N combinations, template used, date)
├── combination_matrix.csv — All exposure/outcome specs with coding
├── template/
│ └── base_template.R — The validated template (frozen copy)
├── scripts/
│ ├── 01_depression_diabetes.R
│ ├── 02_obesity_diabetes.R
│ ├── ...
│ └── run_all.R — Master execution script
├── results/
│ ├── 01_depression_diabetes/
│ │ ├── table1.csv
│ │ ├── main_results.csv
│ │ └── subgroup_results.csv
│ ├── 02_obesity_diabetes/
│ │ └── ...
│ └── ...
├── summary/
│ ├── summary_matrix.csv — Main results across all combinations
│ ├── subgroup_matrix.csv — Subgroup results across all combinations
│ ├── failed_runs.csv — Combinations that failed + error messages
│ └── heatmap.png — Optional effect size × significance visual
└── logs/
└── batch_execution.log — Timing + error log/analyze-stats code-quality gate (check_generated_code.py --code-dir {batch_dir} --strict) and clear every Major (MISSING_SEED, HARDCODED_DATA_LITERAL, HARDCODED_ABS_PATH, INPLACE_SOURCE_OVERWRITE) before batch execution.When cross_national: true:
| Need | Skill | |------|-------| | Variable coding lookup | analyze-stats survey_weighted guide | | Template creation from paper | /replicate-study Phase 1–3 | | Cross-national paired analysis | /cross-national | | ICD-10 claims algorithms | analyze-stats nhis_icd10_mapping guide | | Write manuscript from results | /write-paper (nhis_cohort or cross_national type) | | Figure generation | /make-figures (forest plot of all combinations) |
/batch-cohort
DB: /path/to/knhanes/HN18.csv
Template: /path/to/validated_analysis.R
Exposures: [depression, obesity, smoking, heavy_drinking, low_income, low_education]
Outcome: diabetes
Mode: full/batch-cohort
DB Korea: /path/to/knhanes/HN18.csv
DB US: /path/to/nhanes/
Template: cross_national
Exposures: [depression, obesity, smoking]
Outcomes: [diabetes, hypertension, metabolic_syndrome]
cross_national: true
Mode: execute/batch-cohort
DB: /path/to/nhis_sample_cohort.csv
Template: nhis_cohort
Exposures: [atrial_fibrillation, heart_failure, COPD, CKD]
Outcomes: [all_cause_mortality, cardiovascular_death, stroke]
Mode: code_only[VERIFY: variable_name] and ask the user to confirm against the data dictionary./search-lit for all citations.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 17,829 | 17,202 | -4% | 1 | 1 | 0% | 3,961 | 3,317 | -16% | 0 | 0 | — |
case-02 | fail→pass | 4,642 | 26,094 | +462% | 1 | 1 | 0% | 480 | 8,986 | +1772% | 0 | 0 | — |
case-03 | fail→fail | 24,321 | 25,000 | +3% | 1 | 1 | 0% | 6,247 | 9,181 | +47% | 0 | 0 | — |
case-04 | pass→pass | 10,751 | 11,012 | +2% | 1 | 1 | 0% | 2,162 | 5,079 | +135% | 0 | 0 | — |
case-05 | pass→pass | 18,000 | 14,506 | -19% | 1 | 1 | 0% | 3,740 | 5,914 | +58% | 0 | 0 | — |
case-06 | pass→pass | 10,784 | 9,747 | -10% | 1 | 1 | 0% | 1,897 | 4,504 | +137% | 0 | 0 | — |
case-07 | fail→pass | 13,960 | 9,943 | -29% | 1 | 1 | 0% | 2,717 | 4,859 | +79% | 0 | 0 | — |
case-08 | fail→pass | 12,278 | 7,247 | -41% | 1 | 1 | 0% | 1,753 | 4,199 | +140% | 0 | 0 | — |
case-09 | pass→pass | 13,225 | 8,842 | -33% | 1 | 1 | 0% | 2,270 | 4,529 | +100% | 0 | 0 | — |
case-10 | pass→pass | 13,875 | 14,212 | +2% | 1 | 1 | 0% | 2,264 | 5,177 | +129% | 0 | 0 | — |
case-11 | fail→pass | 15,019 | 5,395 | -64% | 1 | 1 | 0% | 2,322 | 3,896 | +68% | 0 | 0 | — |
case-12 | pass→pass | 14,519 | 9,713 | -33% | 1 | 1 | 0% | 2,481 | 4,662 | +88% | 0 | 0 | — |
case-13 | pass→pass | 10,290 | 5,498 | -47% | 1 | 1 | 0% | 1,800 | 3,759 | +109% | 0 | 0 | — |
case-14 | pass→pass | 10,216 | 9,206 | -10% | 1 | 1 | 0% | 1,637 | 4,454 | +172% | 0 | 0 | — |
case-15 | fail→pass | 13,188 | 6,303 | -52% | 1 | 1 | 0% | 2,064 | 3,948 | +91% | 0 | 0 | — |
case-16 | pass→pass | 13,269 | 2,417 | -82% | 1 | 1 | 0% | 2,059 | 3,308 | +61% | 0 | 0 | — |
case-17 | fail→pass | 13,268 | 10,570 | -20% | 1 | 1 | 0% | 2,136 | 4,910 | +130% | 0 | 0 | — |
case-18 | pass→pass | 21,323 | 20,599 | -3% | 1 | 1 | 0% | 3,722 | 6,741 | +81% | 0 | 0 | — |
case-19 | fail→pass | 15,763 | 10,174 | -35% | 1 | 1 | 0% | 2,562 | 4,868 | +90% | 0 | 0 | — |
case-20 | fail→pass | 12,068 | 5,357 | -56% | 1 | 1 | 0% | 2,089 | 3,749 | +79% | 0 | 0 | — |
case-21 | pass→pass | 16,095 | 12,854 | -20% | 1 | 1 | 0% | 2,765 | 5,310 | +92% | 0 | 0 | — |
case-22 | fail→pass | 7,250 | 2,794 | -61% | 1 | 1 | 0% | 1,130 | 3,411 | +202% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 20 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +41 percentage points is the difference between those two pass rates over the 20 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.