batch-cohort

batch-cohort is a skill for Claude Code from Aperivue/medsci-skills. It costs 47 tokens per session (2,928 once invoked), scanned A, original, MIT.

A batch analysis helper for medical research that creates many R or Python scripts from one validated method, changing only the exposure and outcome variables.

In plain words
What is it for?
It is for running the same cohort or survey analysis across many exposure–outcome pairs and collecting the results in a summary table.
Why use it?
It avoids rewriting the same analysis for every variable combination and keeps the comparisons consistent.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the medsci-analysis plugin — 6 skills shipped together

Good fit It is for running the same cohort or survey analysis across many exposure–outcome pairs and collecting the results in a summary table.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aperivue/medsci-skills/batch-cohort
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Aperivue/medsci-skills --skill batch-cohort
Clone the repo
git clone --depth 1 https://github.com/Aperivue/medsci-skills

Made for: Claude Code.

Or install medsci-analysis, the plugin that ships this one along with the rest of its 6 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for batch-cohort

README.md
[![agentmods](https://agentmods.dev/badge/skills/aperivue/medsci-skills/batch-cohort/github.svg)](https://agentmods.dev/skills/aperivue/medsci-skills/batch-cohort)
Your own site
<a href="https://agentmods.dev/skills/aperivue/medsci-skills/batch-cohort"><img src="https://agentmods.dev/badge/skills/aperivue/medsci-skills/batch-cohort/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for batch-cohort

Your own site · 80×15
<a href="https://agentmods.dev/skills/aperivue/medsci-skills/batch-cohort"><img src="https://agentmods.dev/badge/skills/aperivue/medsci-skills/batch-cohort.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,928 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 6
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.02928
Opus 5 $0.00023 $0.01464
Sonnet 5 $0.00009 $0.00586
Haiku 4.5 $0.00005 $0.00293

Measured 11d ago against content hash a344f46fa0da, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

batch-cohort scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/batch-cohort/SKILL.md · 224 lines

How it starts

The opening of the file, as written. The whole thing — 224 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 template's set)
  • Subgroup variables: Variables to stratify by (default: sex, age group)
  • Output format: code_only (just scripts) | execute (run + collect results) | full (code + results + summary)
  • Cross-national mode: If TRUE, generates paired scripts for both countries per combination

Workflow

Phase 1: Template Validation

  1. Read the methodology template (R script or paper type reference).
  2. Identify the slot variables — parts that change per combination:
    • EXPOSURE_VAR: raw variable name in the database
    • EXPOSURE_LABEL: human-readable label for tables/figures
    • EXPOSURE_CODING: how to derive binary/categorical exposure
    • OUTCOME_VAR: raw variable name
    • OUTCOME_LABEL: human-readable label
    • OUTCOME_CODING: how to derive binary outcome
  3. Verify the template runs successfully on at least one combination before batch generation.
  4. Output: template summary with identified slots → user approval.

Read the full file on GitHub · 224 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 224 lines · 47 tokens per session scan A a344f46fa0da

Subscribe to this mod's changes

batch-cohort is a skill published in the GitHub repository Aperivue/medsci-skills (292 stars, last pushed 3d ago), licensed MIT. It adds 47 tokens to every session and 2,928 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.