simtrial-fundamentals

simtrial-fundamentals is a skill for Claude Code from choxos/BiostatAgent. It costs 38 tokens per session (3,274 once invoked), scanned A, original, MIT.

Instructions for using the simtrial package to simulate time-to-event clinical trial data and analyse survival-related results. Time-to-event data records how long it takes for an event, such as disease progression, to occur.

In plain words
What is it for?
Use it to generate survival data, model failure and dropout times, run weighted log-rank and MaxCombo tests, calculate restricted mean survival time, and simulate group-sequential trials.
Why use it?
It helps model trials where treatment effects may change over time or do not follow the usual proportional-hazards assumption.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the clinical-trial-simulation plugin — 7 skills, 5 commands, 7 agents shipped together

Good fit Use it to generate survival data, model failure and dropout times, run weighted log-rank and MaxCombo tests, calculate restricted mean survival time, and simulate group-sequential trials.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/choxos/biostatagent/simtrial-fundamentals
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 choxos/BiostatAgent --skill simtrial-fundamentals
Clone the repo
git clone --depth 1 https://github.com/choxos/BiostatAgent

Made for: Claude Code.

Or install clinical-trial-simulation, the plugin that ships this one along with the rest of its 7 skills, 5 commands, 7 agents.

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 simtrial-fundamentals

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/choxos/biostatagent/simtrial-fundamentals"><img src="https://agentmods.dev/badge/skills/choxos/biostatagent/simtrial-fundamentals.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,274 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.
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.00038 $0.03274
Opus 5.5 $0.00015 $0.01310
Sonnet 5.5 $0.00008 $0.00655
Haiku 4.5 $0.00004 $0.00327

Measured 2mo ago against content hash 40925e34986e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

simtrial-fundamentals 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 2mo 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.

plugins/clinical-trial-simulation/skills/simtrial-fundamentals/SKILL.md · 465 lines

How it starts

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

simtrial Fundamentals

When to Use This Skill

  • Simulating time-to-event (survival) clinical trial data
  • Generating piecewise exponential failure/dropout times
  • Modeling delayed treatment effects or non-proportional hazards
  • Performing weighted logrank tests (Fleming-Harrington, Magirr-Burman)
  • Running MaxCombo tests for non-proportional hazards
  • Simulating group sequential designs
  • Calculating RMST or milestone endpoints

Package Overview

simtrial by Merck provides fast, extensible clinical trial simulation for time-to-event endpoints. Key features:

  • Piecewise exponential distributions for flexible hazard modeling
  • Built-in support for non-proportional hazards scenarios
  • Integration with gsDesign2 for group sequential designs
  • Parallel computation via doFuture/foreach
  • Pipe-friendly API using data.table for performance

Core Data Generation Functions

sim_pw_surv() - Main Simulation Function

Generates stratified time-to-event outcome randomized trial data.

sim_pw_surv(
  n = 100,                    # Total sample size
  stratum = data.frame(       # Stratum definitions
    stratum = "All",
    p = 1                     # Prevalence/probability
  ),
  block = c(rep("control", 2), rep("experimental", 2)),  # Randomization block
  enroll_rate = data.frame(   # Enrollment rates by period
    rate = 9,
    duration = 1
  ),
  fail_rate = data.frame(     # Failure rates by stratum/treatment/period
    stratum = rep("All", 4),
    period = rep(1:2, 2),
    treatment = c(rep("control", 2), rep("experimental", 2)),
    duration = rep(c(3, 1), 2),
    rate = log(2) / c(9, 9, 9, 18)  # Hazard rates
  ),
  dropout_rate = data.frame(  # Dropout rates
    stratum = rep("All", 2),
    period = rep(1, 2),
    treatment = c("control", "experimental"),
    duration = rep(100, 2),
    rate = rep(0.001, 2)
  )
)

Returns: Data frame with columns:

  • stratum: Patient stratum
  • enroll_time: Calendar time of enrollment
  • treatment: Treatment assignment ("control" or "experimental")
  • fail_time: Time from enrollment to event
  • dropout_time: Time from enrollment to dropout
  • cte: Calendar time of event (enroll_time + min(fail_time, dropout_time))
  • fail: Event indicator (1 = event, 0 = censored)

Read the full file on GitHub · 465 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. 2mo ago First seen · 465 lines · 38 tokens per session scan A 40925e34986e

Subscribe to this mod's changes

simtrial-fundamentals is a skill published in the GitHub repository choxos/BiostatAgent (12 stars, last pushed 5mo ago), licensed MIT. It adds 38 tokens to every session and 3,274 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

imaging-data-commons

Queries and downloads public cancer imaging data from NCI Imaging Data Commons. Supports IDC collection discovery, DICOM access, radiology (CT, MR, PET) and pathology AI datasets, metadata SQL, visualization, licensing, and citations. Uses public metadata and download routes without authentication; optional BigQuery…

K-Dense-AI/scientific-agent-skills · 73 tokens

lab-hardware-cad

Designs custom laboratory hardware as parametric build123d models and exports fabrication artifacts as STEP, STL, and DXF files - microfluidic chips and molds, optomechanical mounts and breadboard adapters, cuvette and microplate holders, tube racks, animal-behavior rigs, and 3D-printed instrument fixtures. Use when a…

K-Dense-AI/scientific-agent-skills · 108 tokens

onekgpd

Queries the 1000 Genomes Project dataset (3,202 whole-genome-sequenced individuals, GRCh38) at the level of individual participants. Use when a question is about individuals or variants in the 1000 Genomes Project cohort: which individuals carry variants matching specific criteria in a gene or region, which…

K-Dense-AI/scientific-agent-skills · 143 tokens

statistical-analysis

Guided statistical analysis for research data - test selection, assumption checking, effect sizes, power analysis, Bayesian alternatives, and APA-formatted reporting. Use whenever a user wants to compare groups, test a hypothesis, analyze experimental or survey data, check statistical assumptions, compute required…

K-Dense-AI/scientific-agent-skills · 111 tokens

experimental-design

Designs experiments and studies BEFORE data is collected — choosing a design, randomizing, blocking, and laying out treatment combinations so results are interpretable. Use whenever someone is planning a study, asks how to assign subjects/samples to groups, mentions randomization, blocking, stratification, controls…

K-Dense-AI/scientific-agent-skills · 201 tokens

hypothesis-generation

Formulates evidence-bounded scientific questions, candidate hypotheses, rival explanations, causal or associational claims, discriminating predictions, measurements, and preregistration-ready analysis plans. Used when turning observations or preliminary findings into transparent, testable research plans without…

K-Dense-AI/scientific-agent-skills · 58 tokens