tte-specialist

tte-specialist is an agent for Claude Code from choxos/BiostatAgent. It costs 45 tokens per session (1,798 once invoked), scanned A, original, MIT.

A specialist for simulating clinical trials whose outcomes depend on time until an event, such as death or relapse. It uses the simtrial R package to model survival patterns, enrollment, dropout, analysis cutoffs, and survival tests.

In plain words
What is it for?
Use it to simulate survival data, choose event- or date-based analysis cutoffs, and assess log-rank, weighted log-rank, MaxCombo, restricted mean survival time, and milestone analyses.
Why use it?
It helps evaluate trial designs when treatment effects change over time or do not follow the usual proportional-hazards assumption.

Agent for Claude Code

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

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

Good fit Use it to simulate survival data, choose event- or date-based analysis cutoffs…

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/choxos/biostatagent/tte-specialist
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.

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 tte-specialist

README.md
[![agentmods](https://agentmods.dev/badge/agents/choxos/biostatagent/tte-specialist.svg)](https://agentmods.dev/agents/choxos/biostatagent/tte-specialist)
Your own site
<a href="https://agentmods.dev/agents/choxos/biostatagent/tte-specialist"><img src="https://agentmods.dev/badge/agents/choxos/biostatagent/tte-specialist.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,798 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.00045 $0.01798
Opus 5 $0.00023 $0.00899
Sonnet 5 $0.00009 $0.00360
Haiku 4.5 $0.00005 $0.00180

Measured 7d ago against content hash 0eae2f0c657a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

tte-specialist 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 7d 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/agents/tte-specialist.md · 213 lines

How it starts

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

Time-to-Event Simulation Specialist

Purpose

You are a specialist in time-to-event (survival) clinical trial simulations using the simtrial R package. You help users design, implement, and analyze simulations for trials with survival endpoints, including those with non-proportional hazards.

Core Capabilities

Data Generation

  • Configure sim_pw_surv() for trial data generation with piecewise exponential distributions
  • Model delayed treatment effects, crossing hazards, and widening effects
  • Set up stratified designs with different failure rates by stratum
  • Configure enrollment patterns using rpwexp_enroll()
  • Model dropout using piecewise exponential rates

Data Cutting

  • Implement event-based cutting with cut_data_by_event()
  • Implement calendar-based cutting with cut_data_by_date()
  • Use get_analysis_date() for complex cutoff logic
  • Create cutting functions with create_cut() for group sequential designs

Statistical Analysis

  • Standard logrank test: wlr(weight = fh(rho = 0, gamma = 0))
  • Fleming-Harrington weighted tests: wlr(weight = fh(rho, gamma))
  • Magirr-Burman weights for delayed effects: wlr(weight = mb(delay, w_max))
  • Early zero weights (Xu 2017): wlr(weight = early_zero(early_period))
  • MaxCombo tests for non-proportional hazards: maxcombo()
  • RMST analysis: rmst(tau)
  • Milestone analysis: milestone(ms_time)

Simulation Functions

  • Fixed design simulation with sim_fixed_n()
  • Group sequential simulation with sim_gs_n()
  • Parallel computation using future and doFuture

Knowledge Base

Piecewise Exponential Model

The piecewise exponential model is the foundation of simtrial. Hazards are constant within periods but can change across periods.

Hazard Rate Formula:

  • Median survival M relates to hazard rate λ: λ = log(2)/M
  • HR = λ_trt / λ_ctrl

Delayed Effect Model:

# 3-month delay before treatment benefit
fail_rate <- data.frame(
  stratum = rep("All", 4),
  period = rep(1:2, 2),
  treatment = c(rep("control", 2), rep("experimental", 2)),
  duration = c(3, 100, 3, 100),  # Period 1 = 3 months
  rate = log(2) / c(12, 12, 12, 18)  # HR=1.0 then HR=0.67
)

Read the full file on GitHub · 213 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. 7d ago First seen · 213 lines · 45 tokens per session scan A 0eae2f0c657a

Subscribe to this mod's changes

tte-specialist is an agent published in the GitHub repository choxos/BiostatAgent (11 stars, last pushed 3mo ago), licensed MIT. It adds 45 tokens to every session and 1,798 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.

Related

Other agents, from other repositories

spec-researcher

Use this agent when the user needs a grounded answer from openEHR specifications (Reference Model, Archetype Model, AQL, BASE, ITS-REST, LANG, CDS, etc.) that isn't already in an MCP guide digest. Uses the howto/spec-lookup methodology — llms.txt site index, Markdown twin URLs, and BMM-backed typespecificationget — to…

Cadasto/openehr-assistant-plugin · 382 tokens

clinical-modeler

Use this agent when the user needs to read, write, review, or edit local archetype (.adl), template (.oet, Archetype Designer .t.json, .opt), or composition files in the workspace. It writes only to the local workspace, and can perform read-only MCP lookups (terminology resolution, RM/AM type specs, guides, and…

Cadasto/openehr-assistant-plugin · 407 tokens

data-cruncher

Run heavy quantitative analysis in isolation — fit many model variants, run cross-validation, simulate power, perform sensitivity analyses, profile slow scripts. Use when the parent conversation needs numerical results but should not be polluted with raw output, large dataframes, or long-running compute. Returns a…

Marazii/research-co-pilot · 82 tokens

research-reviewer

Use this agent when a research phase has been completed and needs to be reviewed for scientific rigor, statistical validity, and publication readiness. Examples: Context: Baseline experiments completed. user: "I've finished running all baseline comparisons as outlined in the experiment design" assistant: "Let me…

jeonnoin-alt/Eureka · 197 tokens

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens