replicate-study

replicate-study is a skill for Claude Code from Aperivue/medsci-skills. It costs 49 tokens per session (1,618 once invoked), scanned A, original, MIT.

A workflow for repeating a published cohort study with a different database. A cohort study follows a defined group of people to compare exposures, treatments, or characteristics with outcomes.

In plain words
What is it for?
Use it to extract a study method from a paper, map its variables to another database, generate analysis code, and produce a report of replication differences.
Why use it?
It makes differences between the original study and the new data explicit instead of assuming the databases match. This helps preserve the original method while showing what changed.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_SKILL_DIR} variable. Also seen: model in frontmatter.

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

Good fit Use it to extract a study method from a paper, map its variables to another database, generate analysis code, and produce a report of replication differences.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aperivue/medsci-skills/replicate-study
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 replicate-study
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 replicate-study

README.md
[![agentmods](https://agentmods.dev/badge/skills/aperivue/medsci-skills/replicate-study/github.svg)](https://agentmods.dev/skills/aperivue/medsci-skills/replicate-study)
Your own site
<a href="https://agentmods.dev/skills/aperivue/medsci-skills/replicate-study"><img src="https://agentmods.dev/badge/skills/aperivue/medsci-skills/replicate-study/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 replicate-study

Your own site · 80×15
<a href="https://agentmods.dev/skills/aperivue/medsci-skills/replicate-study"><img src="https://agentmods.dev/badge/skills/aperivue/medsci-skills/replicate-study.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,618 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.00049 $0.01618
Opus 5.5 $0.00020 $0.00647
Sonnet 5.5 $0.00010 $0.00324
Haiku 4.5 $0.00005 $0.00162

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

Security

Grade A, and why

replicate-study 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 24d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (tests/test_alcohol_harmonization.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/replicate-study/SKILL.md · 126 lines

How it starts

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

Replicate Study Skill

Apply a published study's methodology to a different database and report every place the target database forced a deviation.

Inputs

  1. Source paper: PDF, DOI, or markdown of the paper to replicate
  2. Target database path: CSV/SAS data file(s) to use
  3. Harmonization table (optional): CSV mapping source → target variables
    • Default: ${CLAUDE_SKILL_DIR}/references/harmonization_knhanes_nhanes.csv (if KNHANES↔NHANES)

Reference Files

  • ${CLAUDE_SKILL_DIR}/references/methodology_extraction_template.md — checklist for extracting study design
  • ${CLAUDE_SKILL_DIR}/references/harmonization_knhanes_nhanes.csv — KNHANES↔NHANES variable mapping (67 rows)
  • ${CLAUDE_SKILL_DIR}/references/harmonization_3country.csv — KNHANES+NHANES+CHNS 3-country mapping (46 rows)
  • Upstream templates (read on demand):
    • ${CLAUDE_SKILL_DIR}/../write-paper/references/paper_types/nhis_cohort.md
    • ${CLAUDE_SKILL_DIR}/../write-paper/references/paper_types/cross_national.md
    • ${CLAUDE_SKILL_DIR}/../analyze-stats/references/analysis_guides/survey_weighted.md
    • ${CLAUDE_SKILL_DIR}/../analyze-stats/references/analysis_guides/propensity_score.md

Workflow

Phase 1: Source Paper Analysis

  1. Read the source paper (PDF → text, or markdown).
  2. Extract the methodology by filling methodology_extraction_template.md: study design, database (name, country, years, N), population (inclusion/exclusion, age range), exposure and outcome (variable, definition, coding), covariates with definitions, statistical methods (regression type, adjustment models, subgroup analyses), survey design (weights, strata, PSU), and every sensitivity analysis.
  3. Outdated source definitions: if the source used a pre-2023 definition that has since been superseded (e.g., NAFLD → MASLD 2023, CKD-EPI 2009 → 2021 race-free), call /define-variables to cross-check whether to mirror the legacy definition (pure replication) or upgrade to the current one (extension). Record the choice in the difference report.
  4. Output: structured extraction summary for user review.

Read the full file on GitHub · 126 lines

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. 24d ago Changed · -25 lines · +1 tokens per session b1f3d1b6092f
  2. 1mo ago First seen · 151 lines · 48 tokens per session scan A dde8b68fa33c

Subscribe to this mod's changes

replicate-study is a skill published in the GitHub repository Aperivue/medsci-skills (349 stars, last pushed 3d ago), licensed MIT. It adds 49 tokens to every session and 1,618 once invoked, about $0.0002 per session on Opus 5.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.

Related

Other skills, from other repositories