Hands-On AI Skills for Clinical Programming & Biostatistics
Associate Director, Clinical Reporting · Navitas Data Sciences
Senior Director, Biostatistics · Eikon Therapeutics
October 1, 2026
Hands-On AI Skills for Clinical Programming & Biostatistics
R/Pharma Virtual 2026 · Thursday, October 1, 2026 · 8:00–11:00 AM CDT · Virtual
Presenters:
No prior AI-skills experience required.
Pick the exercises closest to your work — the ADaM thread, the group sequential design thread, or both.
Three hours, one break near the midpoint.
A skill is a reusable, model-agnostic workflow an AI coding agent loads on demand:
SKILL.md file — step-by-step instructions for one class of taskThe agent reads the skill only when your request matches it, then follows it instead of improvising.
Clinical programming is high-stakes, convention-heavy, and traceability-driven. A skill lets you encode, once:
"Y"/NA flags, study-day rules, date imputation direction)derive_vars_merged() vs derive_vars_merged_lookup())stopifnot() assertions, # REVIEW: markers at every protocol-specific decision)The agent then reproduces that discipline on every run.
group-sequential-design skill — 21 trial-design scenarios, 3 models (Claude Sonnet / Opus, Gemini Flash), May 2026:
| With skill | Without skill | |
|---|---|---|
| Avg score across scenarios | 90% | 62% |
| Scenario wins | 16 | 1 |
| Ties | 4 | 4 |
Community A/B benchmarks — same task, agent with vs without the skill, scored against a methodology rubric:
| Skill / task | With skill | Without skill |
|---|---|---|
| ADSL derivation (34-point rubric) | 100% | 62% |
| ADSL safety flags — SAFFL / ITTFL / PPROTFL | 83% | 46% |
| ADAE derivation | 94% | 33% |
| ADLB derivation | 94% | 48% |
| ADVS (BDS) derivation | 88% | 36% |
The gap is mostly admiral-idiom compliance + QC annotations, not whether the numbers come out right.
These skills come from the R Consortium pharma-skills project (Submissions Working Group, Pilot 7; with the BBSW AI committee).
https://github.com/RConsortium/pharma-skills/tree/main
The full catalog also includes sdtm-oak, clinical-trial-simulation, statistical-reviewer, rounding, and more, plus a skill development lifecycle and community benchmarking.
Design a survival trial with gsDesign / gsDesign2 / lrstat:
Derive analysis datasets from SDTM with {admiral}:
admiral (parent)admiral-adsl → admiral-adae → admiral-bdsThe workshop runs in a preconfigured environment with:
You do not need to install anything or configure anything in advance.
Go to https://workshop.posit.team/ and sign in.
Want to keep your Section C work after today? Fork jeffreyad/rpharma-2026-workshop to your own GitHub account.
In Workbench, start the session and choose the Positron IDE.
Why Positron? One IDE, both R and Python — Section A’s report generator is Python (python-docx), Section B is R (admiral), and Section C touches both. One session covers everything.
Then open the Claude Code panel — you’ll use it for the next step.
Copy this prompt (button at top right of the box) and paste it into Claude Code:
Set up the R/Pharma 2026 workshop repo for me:
1. If rpharma-2026-workshop is already in my workspace, use that copy.
Otherwise clone it into my home directory from my fork, if I pasted
its URL here: ______
or else from https://github.com/jeffreyad/rpharma-2026-workshop
2. Find Rscript on this machine and put its path on the "Rscript path:"
line in the repo's CLAUDE.md.
3. From the repo root, run `Rscript check_setup.R` and show me the report.
4. If any R package shows [FAIL] or [WARN], run
`Rscript install_packages.R`, then re-run check_setup.R.
5. Do not install R or Python yourself. If either is missing, stop and
tell me.
Finish with one line: READY, or what is still failing.When it says READY: in Positron, File → Open Folder → rpharma-2026-workshop, then start a new Claude Code session there so it picks up the repo’s CLAUDE.md and skills.
Claude Code ran this for you in step 4. To run it yourself, from the repo root:
Prints [ OK ] / [WARN] / [FAIL] per line for:
admiral ≥ 1.2.0, dplyr, lubridate, pharmaversesdtm, pharmaverseadam, metacore, xportr)gsDesign, gsDesign2, lrstat, graphicalMCP, jsonlite)python-docxIn the preconfigured environment every line should be [ OK ]. Any [FAIL] prints the exact fix — usually:
Tip
Ready-state checklist
check_setup.R shows all checks passed (no red)Drive the group-sequential-design skill to design a survival trial:
lrstat simulation to verify the analytic designgsd_report.py)gsd_results.json; the report reads from there (no hardcoded values)Let’s design a Phase 3 Oncology trial
Drive the admiral skill family to derive ADaM datasets from SDTM:
| Skill | Produces | Depends on |
|---|---|---|
admiral (parent) |
Shared conventions — no output | — |
admiral-adsl |
ADSL (subject-level) | SDTM DM, EX, DS |
admiral-adae |
ADAE (adverse events, TEAE flag) | ADSL + SDTM AE |
admiral-bds |
ADVS / ADLB (BDS findings) | ADSL + SDTM VS / LB |
ADSL must be derived first — its treatment vars and population flags feed every downstream dataset.
When you ask for a derivation, the skilled agent will:
|> and exprs() for admiral verb argumentsas.Date() on --DTC)"Y"/NA flags — never "N"# REVIEW: comment at every protocol-specific decisionstopifnot() assertions (one row per USUBJID, source uniqueness, …)Step 1 — everyone: derive ADSL
Prompt to give the agent (verbatim, in chat — not typed as code):
“Using the admiral-adsl skill, derive ADSL from the pharmaversesdtm DM, EX, and DS domains. Include TRT01P/TRT01A, treatment start/end dates, and the SAFFL population flag.”
Watch for: the skill should ask you to confirm the treatment variable mapping and the SAFFL definition before it writes any code — if it doesn’t ask, that’s worth flagging in debrief.
Step 2 — pick a track
Both tracks depend on the ADSL from Step 1 — point people to their own output, not a shared copy, so the exercise mirrors a real pipeline.
"Y"/NA, never "N"; stopifnot() guard for row uniqueness passes# REVIEW: comment on the TEAE window definitionIf your output is missing a # REVIEW: comment somewhere you’d expect one (TEAE window, baseline definition, population flag edge case), that’s the thing to raise in debrief — not a bug to fix silently.
Finished early? Two options:
skills/admiral/admiral-adae/SKILL.md (or skills/admiral/admiral-bds/SKILL.md) and find the section defining the TEAE window / baseline rule — see whether the agent’s # REVIEW: placement matches what the skill actually says to flag# REVIEW: markers, and were they the right places?Try one of today’s skills on something from your own work:
admiral-adsl / admiral-adae / admiral-bds) — point it at a dataset you work withJust describe the task in plain language and see what the agent produces. Forked the repo? Commit anything you want to keep to your fork. We’re here to help if you get stuck.
All driven by describing the task in natural language — the skill supplied the discipline.
Install into your own project:
Running the workshop repo itself on your own machine (rather than the cloud environment)? The repo has install_packages.R + check_setup.R and a full troubleshooting guide in INSTALL.md — or paste the step 4 setup prompt into Claude Code.
These skills produce drafting aids, not validated deliverables.
LLM output can be wrong or vary between runs. Independently verify all generated code and results against your own QC process before they inform any regulatory, clinical, safety, or GxP-regulated activity, and comply with your organization’s policies.
The skills bundle scripts that execute in your environment — review a skill’s contents before running it, and only supply data you are permitted to use.
Jeff Dickinson, PhD
Associate Director, Clinical Reporting · Navitas Data Sciences
jeff.dickinson@navitaslifesciences.com · github.com/jeffreyad
Eric Zhang, PhD
Senior Director, Biostatistics · Eikon Therapeutics
zhangp@eikontx.com · github.com/eric-zhang16
Questions?
Pharma Skills Workshop · R/Pharma Virtual 2026