Agent skill

Clinical Trial Design Guide

by wentorai in wentorai/research-plugins

Clinical trial methodology, biostatistics, and study design guidance

MITAuto-check passedResearch & Science

Install Clinical Trial Design Guide

skills CLI
$ npx skills add wentorai/research-plugins --skill clinical-trial-design-guide -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install wentorai/research-plugins clinical-trial-design-guide --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/wentorai/research-plugins.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/domains/pharma/clinical-trial-design-guide .claude/skills/clinical-trial-design-guide && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
clinical-trial-design-guide
GitHub stars
298
Used in
1 other repo
Token cost
~2.2k tokens
SKILL.md length
266 words
Files
1
Skills in repo
405
Repo updated
First seen
Licence
MIT

At a glance

Clinical trial methodology, biostatistics, and study design guidance

  • Tasks that involve Experimental design
  • SKILL.md covers Clinical Trial Phases, Study Design Selection, Sample Size Calculation and Randomization Methods, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tasks that involve Clinical and healthcare research

What it does

Clinical Trial Design Guide is an agent skill from wentorai/research-plugins. Clinical trial methodology, biostatistics, and study design guidance

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Research & Science, covering Experimental design and Clinical and healthcare research. The repository describes itself as: 350+ academic research skills, MCP configs, and plugins for Research-Claw and AI agents. The licence is MIT.

When your agent uses it

  • Tasks that involve Experimental design
  • Tasks that involve Clinical and healthcare research

Example prompts

  • “/clinical-trial-design-guide”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit bf44b3c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Clinical Trial Design Guide loads about 2.2k tokens when it runs. Until then it costs about 24 tokens; SKILL.md has 266 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~24
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from wentorai/research-plugins at commit bf44b3c, republished under its MIT licence (© wentorai). 266 words, ~2,222 tokens.

Download SKILL.mdSave it as .claude/skills/clinical-trial-design-guide/SKILL.md (or your agent's skills folder).
name
clinical-trial-design-guide
description
Clinical trial methodology, biostatistics, and study design guidance

Clinical Trial Design Guide

A skill for designing and analyzing clinical trials, covering study design selection, sample size calculation, randomization methods, interim analysis, survival endpoints, and regulatory considerations. Essential for pharmaceutical researchers, biostatisticians, and clinical scientists.

Clinical Trial Phases

Phase Overview
PhaseObjectiveTypical NDurationPrimary Endpoints
Phase ISafety, dose-finding20-80MonthsMTD, DLT, PK profile
Phase IIEfficacy signal, dosing100-3001-2 yearsResponse rate, biomarker
Phase IIIConfirmatory efficacy300-3,000+2-4 yearsOS, PFS, clinical outcome
Phase IVPost-marketing surveillance1,000+OngoingSafety, real-world effectiveness

Study Design Selection

Common Designs
Parallel Group (most common Phase III):
  R --> Treatment A --> Outcome assessment
  R --> Treatment B --> Outcome assessment

Crossover:
  R --> Treatment A --> Washout --> Treatment B --> Outcome
  R --> Treatment B --> Washout --> Treatment A --> Outcome

Factorial (2x2):
  R --> Drug A + Drug B
  R --> Drug A + Placebo B
  R --> Placebo A + Drug B
  R --> Placebo A + Placebo B

Adaptive:
  Stage 1: Enroll n1 patients --> Interim analysis
  Stage 2: Modify design (dose, sample size, arm dropping) --> Continue
Design Selection Criteria
FactorRecommended Design
Chronic disease, stable conditionCrossover (within-subject comparison)
Acute condition, one-time treatmentParallel group
Multiple drugs to evaluateFactorial or multi-arm
High uncertainty in effect sizeAdaptive (sample size re-estimation)
Rare disease, limited patientsBayesian adaptive, single-arm with historical control

Sample Size Calculation

Two-Sample Comparison of Means
python
from scipy.stats import norm
import numpy as np

def sample_size_two_means(delta: float, sigma: float,
                           alpha: float = 0.05, power: float = 0.80,
                           ratio: float = 1.0) -> dict:
    """
    Sample size for comparing two group means (two-sided test).
    delta: minimum clinically important difference
    sigma: pooled standard deviation
    alpha: type I error rate
    power: desired power (1 - beta)
    ratio: allocation ratio (n2/n1)
    """
    z_alpha = norm.ppf(1 - alpha / 2)
    z_beta = norm.ppf(power)
    effect = delta / sigma

    n1 = ((z_alpha + z_beta) ** 2 * (1 + 1 / ratio)) / effect ** 2
    n2 = ratio * n1

    return {
        "n_per_group_1": int(np.ceil(n1)),
        "n_per_group_2": int(np.ceil(n2)),
        "total": int(np.ceil(n1) + np.ceil(n2)),
        "effect_size": round(effect, 3),
    }

# Example: detect 5-point difference, SD=15, 80% power
result = sample_size_two_means(delta=5, sigma=15)
print(f"Required: {result['total']} total patients")
Sample Size for Survival Endpoints
python
def sample_size_logrank(hazard_ratio: float, alpha: float = 0.05,
                         power: float = 0.80, ratio: float = 1.0,
                         median_control: float = 12.0,
                         accrual_time: float = 24.0,
                         followup_time: float = 12.0) -> dict:
    """
    Sample size for log-rank test comparing two survival curves.
    hazard_ratio: expected HR (treatment/control), <1 means treatment better
    median_control: median survival in control arm (months)
    """
    z_alpha = norm.ppf(1 - alpha / 2)
    z_beta = norm.ppf(power)

    # Required number of events (Schoenfeld formula)
    d = ((z_alpha + z_beta) ** 2 * (1 + ratio) ** 2) / (
        ratio * (np.log(hazard_ratio)) ** 2
    )
    d = int(np.ceil(d))

    # Estimate probability of event during study
    lambda_c = np.log(2) / median_control
    lambda_t = lambda_c * hazard_ratio

    # Average probability of event (simplified uniform accrual)
    p_event_c = 1 - np.exp(-lambda_c * followup_time)
    p_event_t = 1 - np.exp(-lambda_t * followup_time)
    p_event_avg = (p_event_c + ratio * p_event_t) / (1 + ratio)

    n_total = int(np.ceil(d / p_event_avg))

    return {
        "events_required": d,
        "total_patients": n_total,
        "hazard_ratio": hazard_ratio,
        "p_event_avg": round(p_event_avg, 3),
    }

Randomization Methods

Implementation
python
import random

def stratified_block_randomization(strata: list[str],
                                     block_sizes: list[int] = [4, 6],
                                     ratio: tuple = (1, 1),
                                     seed: int = 42) -> list[str]:
    """
    Stratified permuted block randomization.
    strata: list of stratum labels for each patient (in enrollment order)
    block_sizes: list of possible block sizes (randomly selected)
    ratio: allocation ratio (e.g., (1,1) for 1:1, (2,1) for 2:1)
    Returns list of treatment assignments ('A' or 'B').
    """
    rng = random.Random(seed)
    stratum_queues = {}
    assignments = []

    for stratum in strata:
        if stratum not in stratum_queues:
            stratum_queues[stratum] = []

        if not stratum_queues[stratum]:
            # Generate new block
            block_size = rng.choice(block_sizes)
            n_a = block_size * ratio[0] // sum(ratio)
            n_b = block_size - n_a
            block = ["A"] * n_a + ["B"] * n_b
            rng.shuffle(block)
            stratum_queues[stratum] = block

        assignments.append(stratum_queues[stratum].pop(0))

    return assignments

Interim Analysis and Monitoring

Group Sequential Design
python
def obrien_fleming_boundary(n_looks: int, alpha: float = 0.05) -> list[float]:
    """
    Compute O'Brien-Fleming spending function boundaries.
    Provides very conservative early stopping with near-nominal final alpha.
    """
    from scipy.stats import norm
    boundaries = []
    for k in range(1, n_looks + 1):
        info_fraction = k / n_looks
        z_boundary = norm.ppf(1 - alpha / 2) / np.sqrt(info_fraction)
        p_boundary = 2 * (1 - norm.cdf(z_boundary))
        boundaries.append({
            "look": k,
            "info_fraction": round(info_fraction, 3),
            "z_boundary": round(z_boundary, 4),
            "p_boundary": round(p_boundary, 6),
        })
    return boundaries

# Example: 3 interim looks + 1 final
boundaries = obrien_fleming_boundary(4)
for b in boundaries:
    print(f"Look {b['look']}: Z={b['z_boundary']}, p={b['p_boundary']}")

Survival Analysis

Kaplan-Meier and Log-Rank Test
python
from lifelines import KaplanMeierFitter
from lifelines.statistics import logrank_test

def analyze_survival(time: pd.Series, event: pd.Series,
                      group: pd.Series) -> dict:
    """
    Perform Kaplan-Meier estimation and log-rank test.
    time: follow-up duration
    event: 1=event occurred, 0=censored
    group: treatment group labels
    """
    groups = group.unique()
    kmf_results = {}

    for g in groups:
        mask = group == g
        kmf = KaplanMeierFitter()
        kmf.fit(time[mask], event[mask], label=str(g))
        kmf_results[g] = {
            "median_survival": kmf.median_survival_time_,
            "survival_at_12m": kmf.predict(12),
        }

    # Log-rank test
    mask_a = group == groups[0]
    lr = logrank_test(
        time[mask_a], time[~mask_a],
        event[mask_a], event[~mask_a],
    )

    return {
        "group_results": kmf_results,
        "logrank_statistic": lr.test_statistic,
        "logrank_p_value": lr.p_value,
    }

Regulatory Considerations

Key regulatory documents for clinical trial design:

  • ICH E6 (R2): Good Clinical Practice guidelines
  • ICH E9 (R1): Statistical Principles, estimands framework
  • ICH E8 (R1): General Considerations for Clinical Studies
  • FDA 21 CFR Part 312: Investigational New Drug regulations
  • EMA Scientific Guidelines: Disease-specific guidance documents

Tools and Software

  • R survival package: Kaplan-Meier, Cox regression, log-rank test
  • lifelines (Python): Survival analysis library
  • gsDesign (R): Group sequential design and monitoring boundaries
  • PASS / nQuery: Commercial sample size software
  • EAST (Cytel): Adaptive and group sequential design software
  • REDCap: Electronic data capture for clinical research
  • ClinicalTrials.gov API: Trial registry search and data access

© wentorai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/domains/pharma/clinical-trial-design-guide of wentorai/research-plugins.

Open the folder on GitHubat commit bf44b3c

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in wentorai/research-plugins, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Clinical Trial Design Guide next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Clinical Trial Design Guide compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Clinical Trial Design Guide this skillwentorai/research-plugins2981 repos~2.2kAutomated safety check: PassMIT
Clinical Protocol Draftingaws-samples/amazon-bedrock-agents-healthcare-lifesciences274—~1.4kAutomated safety check: PassMIT-0
Clinical Researchalirezarezvani/claude-skills28k—~2.7kAutomated safety check: PassMIT
Bio Clinical Biostatistics Adaptive DesignsGPTomics/bioSkills1.2k2 repos~7.7kAutomated safety check: PassMIT
Bio Clinical Biostatistics Power Sample SizeGPTomics/bioSkills1.2k2 repos~7.9kAutomated safety check: PassMIT
Adaptive Trial Simulatoraipoch/medical-research-skills1.9k—~3kAutomated safety check: PassMIT

Similar skills

  • Clinical Protocol Drafting

    aws-samples/amazon-bedrock-agents-healthcare-lifesciences

    Official

    A skill your agent uses when drafting clinical trial protocol sections (objectives, background, study design) grounded in ICH guidelines (E6, E8, E9) and FDA regulations (21 CFR Part 312).

    274 GitHub stars~1.4k tokensUpdated 9 days ago
    Research & ScienceAuto-check passed
  • Clinical Research

    alirezarezvani/claude-skills

    A skill your agent uses when designing a prospective clinical study before submission — selecting and classifying endpoints (primary / key-secondary / exploratory, with surrogate-endpoint flagging)…

    28k GitHub stars~2.7k tokensUpdated 1 mo ago
    Research & ScienceAuto-check passed
  • Designs adaptive clinical trials including group-sequential (O'Brien-Fleming, Pocock, Lan-DeMets spending), sample-size re-estimation (blinded Friede-Kieser, unblinded Cui-Hung-Wang, Mehta-Pocock…

    1.2k GitHub starsUsed in 2 repos~7.7k tokens
    Research & ScienceAuto-check passed
  • Computes sample size and power for clinical trials including continuous, binary, and time-to-event endpoints; superiority, non-inferiority, and equivalence designs; FDA 2016 non-inferiority margin…

    1.2k GitHub starsUsed in 2 repos~7.9k tokens
    Research & ScienceAuto-check passed
  • Adaptive Trial Simulator

    aipoch/medical-research-skills

    Design and simulate adaptive clinical trials with interim analyses, decision rules, and operating-characteristic summaries; use when planning adaptive designs or comparing stopping, enrichment, or…

    1.9k GitHub stars~3k tokensUpdated 24 days ago
    Research & ScienceAuto-check passed
  • Clinical Research

    borghei/Claude-Skills

    Clinical study operations — protocol structure, endpoint selection, eligibility design, sample-size and power planning, site feasibility, and documentation readiness.

    891 GitHub stars~3.6k tokensUpdated 4 days ago
    Research & ScienceAuto-check passed

More from wentorai/research-plugins

All 405 skills in this repo
  • Abstract Writing Guide

    wentorai/research-plugins

    Craft structured research abstracts that maximize clarity and journal acceptance

    298 GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • Academic Citation Manager

    wentorai/research-plugins

    Manage academic citations across BibTeX, APA, MLA, and Chicago formats

    298 GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed
  • Academic Paper Summarizer

    wentorai/research-plugins

    Summarize academic papers with structured extraction of key elements

    298 GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed
  • Academic Study Methods

    wentorai/research-plugins

    Evidence-based study techniques for academic learning and retention

    298 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Academic Tone Guide

    wentorai/research-plugins

    Adjust writing tone and register for academic audiences and venues

    298 GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Academic Translation Guide

    wentorai/research-plugins

    Academic translation, post-editing, and Chinglish correction guide

    298 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed

Questions about Clinical Trial Design Guide

What does Clinical Trial Design Guide do?

Clinical trial methodology, biostatistics, and study design guidance. Clinical Trial Design Guide is an agent skill from wentorai/research-plugins.

When should I use Clinical Trial Design Guide?

Clinical Trial Design Guide fits situations like: tasks that involve Experimental design; tasks that involve Clinical and healthcare research.

How do I install Clinical Trial Design Guide in Claude Code?

Run `npx skills add wentorai/research-plugins --skill clinical-trial-design-guide -a claude-code`. Or copy the skill folder (skills/domains/pharma/clinical-trial-design-guide in wentorai/research-plugins) into .claude/skills/clinical-trial-design-guide in your project. Claude Code loads it when a task matches its description.

How do I install Clinical Trial Design Guide in Codex?

Run `npx skills add wentorai/research-plugins --skill clinical-trial-design-guide -a codex`. Or copy the skill folder (skills/domains/pharma/clinical-trial-design-guide in wentorai/research-plugins) into .agents/skills/clinical-trial-design-guide in your project. Codex loads it when a task matches its description.

Can I use Clinical Trial Design Guide in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add wentorai/research-plugins --skill clinical-trial-design-guide -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/clinical-trial-design-guide, .gemini/skills/clinical-trial-design-guide, .github/skills/clinical-trial-design-guide and .opencode/skills/clinical-trial-design-guide in your project.

What does Clinical Trial Design Guide need to run?

SKILL.md names no scripts, command-line tools or credentials: Clinical Trial Design Guide is instructions for the agent only. Our summary lists: Python 3.

Does Clinical Trial Design Guide access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Clinical Trial Design Guide safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Clinical Trial Design Guide use?

Clinical Trial Design Guide is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Clinical Trial Design Guide use?

About 2.2k tokens (SKILL.md is roughly 8.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Clinical Trial Design Guide?

Skills that share tags, products or a category with Clinical Trial Design Guide: Clinical Protocol Drafting (aws-samples/amazon-bedrock-agents-healthcare-lifesciences, 274 stars), Clinical Research (alirezarezvani/claude-skills, 28k stars), Bio Clinical Biostatistics Adaptive Designs (GPTomics/bioSkills, 1.2k stars) and Bio Clinical Biostatistics Power Sample Size (GPTomics/bioSkills, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Clinical Trial Design Guide?

wentorai (a GitHub user) maintains it in wentorai/research-plugins, which has 298 GitHub stars. The repository holds 405 skills in this directory. The repository was last updated on June 19, 2026.

Source: wentorai/research-plugins on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.