Datasets
Arize-ai/phoenix
Understand what a Phoenix dataset is and reason well about its examples, outputs, splits, and how it feeds evaluators and experiments.
Derives an ADaM Subject-Level Analysis Dataset (ADSL) using the {admiral} R package and pharmaverse ecosystem.
$ npx skills add RConsortium/pharma-skills --skill admiral-adsl -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install RConsortium/pharma-skills admiral-adsl --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/RConsortium/pharma-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/admiral/admiral-adsl .claude/skills/admiral-adsl && rm -rf skills-srcUse ~/.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/
Install the "admiral-adsl" agent skill from https://github.com/RConsortium/pharma-skills/tree/main/admiral/admiral-adsl into .claude/skills/admiral-adsl/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "admiral-adsl", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/RConsortium/pharma-skills/tree/main/admiral/admiral-adslType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add RConsortium/pharma-skills --skill admiral-adsl -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install RConsortium/pharma-skills admiral-adsl --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/RConsortium/pharma-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/admiral/admiral-adsl .agents/skills/admiral-adsl && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "admiral-adsl" agent skill from https://github.com/RConsortium/pharma-skills/tree/main/admiral/admiral-adsl into .agents/skills/admiral-adsl/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "admiral-adsl", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add RConsortium/pharma-skills --skill admiral-adsl -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install RConsortium/pharma-skills admiral-adsl --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/RConsortium/pharma-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/admiral/admiral-adsl .cursor/skills/admiral-adsl && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "admiral-adsl" agent skill from https://github.com/RConsortium/pharma-skills/tree/main/admiral/admiral-adsl into .cursor/skills/admiral-adsl/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "admiral-adsl", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/RConsortium/pharma-skills.git --path admiral/admiral-adsl--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add RConsortium/pharma-skills --skill admiral-adsl -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install RConsortium/pharma-skills admiral-adsl --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/RConsortium/pharma-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/admiral/admiral-adsl .gemini/skills/admiral-adsl && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "admiral-adsl" agent skill from https://github.com/RConsortium/pharma-skills/tree/main/admiral/admiral-adsl into .gemini/skills/admiral-adsl/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "admiral-adsl", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install RConsortium/pharma-skills admiral-adslInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add RConsortium/pharma-skills --skill admiral-adsl -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/RConsortium/pharma-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/admiral/admiral-adsl .github/skills/admiral-adsl && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "admiral-adsl" agent skill from https://github.com/RConsortium/pharma-skills/tree/main/admiral/admiral-adsl into .github/skills/admiral-adsl/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "admiral-adsl", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add RConsortium/pharma-skills --skill admiral-adsl -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install RConsortium/pharma-skills admiral-adsl --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/RConsortium/pharma-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/admiral/admiral-adsl .opencode/skills/admiral-adsl && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "admiral-adsl" agent skill from https://github.com/RConsortium/pharma-skills/tree/main/admiral/admiral-adsl into .opencode/skills/admiral-adsl/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "admiral-adsl", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
admiral-adslDerives an ADaM Subject-Level Analysis Dataset (ADSL) using the {admiral} R package and pharmaverse ecosystem.
Admiral Adsl is an agent skill from RConsortium/pharma-skills. Derives an ADaM Subject-Level Analysis Dataset (ADSL) using the {admiral} R package and pharmaverse ecosystem. Use when a user needs to create ADSL from SDTM domains, derive standard subject-level variables (treatment dates, disposition, demographics, population flags), or generate QC-ready R code following CDISC ADaM conventions. Requires SDTM input data and an ADaM spec.
Its SKILL.md is about 4.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including reference files (for example `DESIGN.md`, `README.md` and `benchmarks/README.md`). Compatibility notes: Requires R with admiral, dplyr, lubridate, and pharmaversesdtm installed. Designed for use in a GxP-compliant environment with access to SDTM datasets and an…
The repository describes itself as: A collection of agent skills for BioPharma use cases GSDBench Intake https://rconsortium.github.io/pharma-skills/gsdbench-intake/. The licence is MIT.
12 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit ae5d83b. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are r).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Requires R with admiral, dplyr, lubridate, and pharmaversesdtm installed. Designed for use in a GxP-compliant environment with access to SDTM datasets and an ADaM ADSL specification.
From compatibility in the SKILL.md frontmatter.
Admiral Adsl loads about 4.4k tokens when it runs, and up to ~11k if it reads all its reference files. Until then it costs about 97 tokens; SKILL.md has 915 words of instructions outside code blocks.
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.
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.
The full file from RConsortium/pharma-skills at commit ae5d83b, republished under its MIT licence (© RConsortium). 915 words, ~4,423 tokens.
.claude/skills/admiral-adsl/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.Shared conventions (library setup, pipe style, date rules, flag convention,
# REVIEW:annotations,stopifnot()patterns) are defined in the parent../SKILL.md. The workflow below is ADSL-specific.
Derives a CDISC-conformant ADSL dataset using {admiral}. Outputs executable, QC-ready R code with derivation logic traceable to the ADaM specification.
See admiral-functions reference for function selection guidance. See adsl-conventions reference for CDISC variable conventions.
Before generating code, confirm the following are available or explicitly noted as absent:
| Input | Required | Notes |
|---|---|---|
| DM | Yes | Subject spine; one record per USUBJID |
| EX | Yes | Exposure; needed for treatment dates and SAFFL |
| DS | Yes | Disposition; needed for EOSSTT, DCSREAS |
| DV | No | Protocol deviations; needed for PPROTFL |
| MH | No | Medical history flags if protocol requires |
| VS | No | HEIGHTBL, WEIGHTBL, BMIBL if in scope |
| ADaM ADSL spec | Yes | Variable list, derivation rules, grouping cut-points |
| Study context | Yes | Treatment arm names, population flag definitions |
If required domains are absent, stop and request them. If optional domains are absent, omit the corresponding derivations and note this in code comments.
Follow these steps in order. Generate code section by section, not as a single block.
library(admiral)
library(dplyr)
library(lubridate)
library(pharmaversesdtm)
# Load SDTM domains
dm <- pharmaversesdtm::dm
ex <- pharmaversesdtm::ex
ds <- pharmaversesdtm::ds
# mh <- pharmaversesdtm::mh # uncomment if in scope
# Confirm one record per USUBJID in DM before proceeding
stopifnot(nrow(dm) == n_distinct(dm$USUBJID))Start from DM. One record per USUBJID is mandatory at this step and must be preserved throughout. Select only variables needed downstream.
adsl <- dm |>
select(
STUDYID, USUBJID, SUBJID, SITEID,
AGE, AGEU, SEX, RACE, ETHNIC, COUNTRY,
ARM, ARMCD, ACTARM, ACTARMCD,
DMDTC, RFSTDTC, RFENDTC,
DTHFL, DTHDTC
)Derive datetimes first, then extract date-only variables. Always include
time_imputation arguments and always retain imputation flags (TRTSTMF,
TRTETMF) in new_vars — setting flag_imputation = "auto" without capturing
the flag variables provides no traceability benefit.
Remove DOMAIN from EX before merging to avoid variable conflicts.
ex_dtm <- ex |>
select(-DOMAIN) |>
derive_vars_dtm(
dtc = EXSTDTC,
new_vars_prefix = "EXST",
date_imputation = "first",
time_imputation = "first",
flag_imputation = "auto"
) |>
derive_vars_dtm(
dtc = EXENDTC,
new_vars_prefix = "EXEN",
date_imputation = "last",
time_imputation = "last",
flag_imputation = "auto"
)
# TRTSDTM / TRTSTMF: first dose datetime and imputation flag
# REVIEW: The placebo filter (EXTRT == "PLACEBO") must be confirmed against the
# protocol. In some studies EXDOSE > 0 is sufficient; in others EXDOSE = 0
# for placebo and EXTRT must be used. Adjust condition per protocol definition.
adsl <- adsl |>
derive_vars_merged(
dataset_add = ex_dtm,
by_vars = exprs(STUDYID, USUBJID),
new_vars = exprs(TRTSDTM = EXSTDTM, TRTSTMF = EXSTTMF),
order = exprs(EXSTDTM),
mode = "first",
filter_add = (EXDOSE > 0 | EXTRT == "PLACEBO") & !is.na(EXSTDTM)
) |>
# TRTEDTM / TRTETMF: last dose datetime and imputation flag
# REVIEW: If subjects have non-contiguous EX records, TRTEDTM reflects the
# last administration date only. Flag for QC if exposure gaps exist.
derive_vars_merged(
dataset_add = ex_dtm,
by_vars = exprs(STUDYID, USUBJID),
new_vars = exprs(TRTEDTM = EXENDTM, TRTETMF = EXENTMF),
order = exprs(EXENDTM),
mode = "last",
filter_add = (EXDOSE > 0 | EXTRT == "PLACEBO") & !is.na(EXENDTM)
) |>
mutate(
TRTSDT = as.Date(TRTSDTM),
TRTEDT = as.Date(TRTEDTM)
)Use derive_vars_merged_lookup() with a treatment lookup tibble — this is the
idiomatic admiral approach for controlled terminology mapping and is preferred
over case_when() or mutate() for treatment arm coding.
TRT01P/TRT01PN: from DM.ARMCD (planned). TRT01A/TRT01AN: from DM.ACTARMCD (actual). These are distinct — derive independently.
# REVIEW: Confirm ARMCD values, treatment labels, and numeric codes against
# the randomisation schedule and ADaM spec before use.
arm_lookup <- tibble::tribble(
~ARMCD, ~TRT01P, ~TRT01PN,
"Pbo", "Placebo", 1L,
"Xan_Lo", "Xanomeline Low Dose", 2L,
"Xan_Hi", "Xanomeline High Dose", 3L
# Screen failure subjects (Scrnfail) are not in the lookup — they receive NA
)
adsl <- adsl |>
derive_vars_merged_lookup(
dataset_add = arm_lookup,
by_vars = exprs(ARMCD),
new_vars = exprs(TRT01P, TRT01PN)
) |>
derive_vars_merged_lookup(
dataset_add = arm_lookup |>
rename(ACTARMCD = ARMCD, TRT01A = TRT01P, TRT01AN = TRT01PN),
by_vars = exprs(ACTARMCD),
new_vars = exprs(TRT01A, TRT01AN)
)Use derive_vars_dt() for all date conversions from DM — never use
as.Date() directly on --DTC variables as this bypasses partial date
imputation handling.
adsl <- adsl |>
# RANDDT: date of randomisation from DM.DMDTC
# REVIEW: Confirm DMDTC is the randomisation date in this study. In some
# studies randomisation date comes from a separate SDTM domain (e.g. RS).
derive_vars_dt(
dtc = DMDTC,
new_vars_prefix = "RAND",
date_imputation = "first",
flag_imputation = "auto"
) |>
derive_vars_dt(
dtc = RFSTDTC,
new_vars_prefix = "RFST",
date_imputation = "first",
flag_imputation = "auto"
) |>
derive_vars_dt(
dtc = RFENDTC,
new_vars_prefix = "RFEND",
date_imputation = "last",
flag_imputation = "auto"
)adsl <- adsl |>
derive_vars_dt(
dtc = DTHDTC,
new_vars_prefix = "DTH",
date_imputation = "first",
flag_imputation = "auto"
) |>
mutate(
# Ensure CDISC flag convention: "Y" or NA — never "N"
DTHFL = if_else(DTHFL == "Y", "Y", NA_character_)
)Use derive_vars_dy() — do not compute manually with date subtraction.
adsl <- adsl |>
derive_vars_dy(
reference_date = TRTSDT,
source_vars = exprs(RANDDT)
)adsl <- adsl |>
derive_var_trtdurd()
# Requires TRTSDT and TRTEDT to be present. NA for untreated subjects.Filter DS to DSCAT == "DISPOSITION EVENT". Verify uniqueness before merging.
Categorise EOSSTT within the source dataset before the merge — never pass
DSDECOD through directly to EOSSTT, as DSDECOD contains reason values
("ADVERSE EVENT", "SCREEN FAILURE") not status values.
Derive DCSREAS in a separate derive_vars_merged() call filtered to
discontinued subjects only — this avoids a post-merge mutate() cleanup step.
ds_eos <- ds |>
select(-DOMAIN) |>
filter(DSCAT == "DISPOSITION EVENT") |>
derive_vars_dt(
dtc = DSDTC,
new_vars_prefix = "DS",
date_imputation = "last",
flag_imputation = "auto"
)
# Confirm one DISPOSITION EVENT record per subject
stopifnot(n_distinct(ds_eos$USUBJID) == nrow(ds_eos))
# EOSSTT: end of study status — "COMPLETED" or "DISCONTINUED" only
# REVIEW: Verify the COMPLETED/DISCONTINUED mapping covers all DSDECOD values
# in this study's DS domain. Some protocols require a third category for
# "STUDY TERMINATED BY SPONSOR". Confirm with the statistician.
adsl <- adsl |>
derive_vars_merged(
dataset_add = ds_eos |>
mutate(
EOSSTT = if_else(DSDECOD == "COMPLETED", "COMPLETED", "DISCONTINUED")
),
by_vars = exprs(STUDYID, USUBJID),
new_vars = exprs(EOSSTT, EOSDT = DSDT)
) |>
# DCSREAS: decoded discontinuation reason — NA for completers per CDISC convention
# REVIEW: DCSREAS is sourced from DS.DSDECOD (decoded value). DS.DSTERM
# (verbatim text) belongs in DCSREASP. Do not swap these.
derive_vars_merged(
dataset_add = ds_eos |>
filter(DSDECOD != "COMPLETED"),
by_vars = exprs(STUDYID, USUBJID),
new_vars = exprs(DCSREAS = DSDECOD, DCSREASP = DSTERM)
)Derive AGE groupings per the ADaM spec. The example cut-points below are placeholders only — always replace with the study-specific values from the ADaM spec. Do not use these defaults without explicit confirmation.
# REVIEW: Age cut-points must come from the ADaM spec — they are study-specific.
# The values below are placeholders. Replace before use.
adsl <- adsl |>
mutate(
AGEGR1 = case_when(
AGE < 65 ~ "<65", # PLACEHOLDER — confirm from spec
AGE >= 65 & AGE <= 80 ~ "65-80", # PLACEHOLDER — confirm from spec
AGE > 80 ~ ">80" # PLACEHOLDER — confirm from spec
),
AGEGR1N = case_when(
AGEGR1 == "<65" ~ 1L,
AGEGR1 == "65-80" ~ 2L,
AGEGR1 == ">80" ~ 3L
)
)If VS is in scope, derive HEIGHTBL, WEIGHTBL, BMIBL using
derive_vars_merged() from the baseline VS records (VSBLFL == "Y").
Critical: population flag definitions are protocol-specific. The derivations
below implement standard logic but must be reviewed against the protocol and SAP
before use. Flag is "Y" or NA only — never "N".
# SAFFL: received at least one dose
# REVIEW: SAFFL definition is protocol-specific. The condition below includes
# placebo subjects (EXTRT == "PLACEBO") who have EXDOSE = 0 in some studies.
# Verify EXTRT values in EX exhaustively and confirm with the statistician.
adsl <- adsl |>
derive_var_merged_exist_flag(
dataset_add = ex,
by_vars = exprs(STUDYID, USUBJID),
new_var = SAFFL,
condition = (EXDOSE > 0 | EXTRT == "PLACEBO") & !is.na(EXSTDTC),
true_value = "Y",
false_value = NA_character_,
missing_value = NA_character_
) |>
# ITTFL: randomised subjects — ARMCD != "Scrnfail" AND ARM != "Screen Failure"
# REVIEW: Confirm ITTFL exclusion criteria with the statistician. The ARMCD
# condition is more reliable than ARM text matching — use both as a safeguard.
mutate(
ITTFL = if_else(
ARMCD != "Scrnfail" & ARM != "Screen Failure",
"Y",
NA_character_
)
)
# ITTFL pipe chain ends here; PPROTFL is derived separately below.
# PPROTFL: per-protocol — ITT subjects with no major protocol deviations.
# Uses derive_vars_merged() + filter_add (not derive_var_merged_exist_flag) because
# the exclusion criterion belongs in filter_add, and NA absence of a match is the
# natural signal that no major deviation record was found for the subject.
#
# Guard: DV-absent and DV-present-but-no-major-deviations are different states
# and must not produce the same PPROTFL output. If DV is not loaded, halt so the
# analyst can decide explicitly — do not silently set NA.
# REVIEW: DVCAT values must match the protocol deviation management plan (PDMP).
# Some studies categorise by DVCAT == "MAJOR"; others use DVSCAT or a study-
# specific flag. Confirm the filter_add condition with the statistician before use.
if (!exists("dv")) {
stop(
"DV domain is required for PPROTFL derivation but is not loaded. ",
"Load DV, or set adsl$PPROTFL <- NA_character_ explicitly if the study ",
"has no protocol deviation records and this has been confirmed with the statistician."
)
}
dv_major <- dv |>
select(-DOMAIN) |>
mutate(MAJDVFL = "Y")
adsl <- adsl |>
derive_vars_merged(
dataset_add = dv_major,
by_vars = exprs(STUDYID, USUBJID),
new_vars = exprs(MAJDVFL),
filter_add = DVCAT == "MAJOR",
mode = "first" # subjects may have >1 major deviation record; any match suffices
) |>
mutate(
PPROTFL = if_else(ITTFL == "Y" & is.na(MAJDVFL), "Y", NA_character_)
) |>
select(-MAJDVFL) # intermediate exclusion flag; not an ADSL output variable# One record per USUBJID — non-negotiable per ADaMIG; FDA will reject if violated
stopifnot(nrow(adsl) == n_distinct(adsl$USUBJID))
# Check required variables are present
required_vars <- c(
"STUDYID", "USUBJID", "TRTSDT", "TRTEDT",
"TRT01P", "TRT01PN", "TRT01A", "TRT01AN",
"TRTSDTM", "TRTSTMF", "TRTEDTM", "TRTETMF",
"EOSSTT", "SAFFL", "ITTFL"
)
missing_vars <- setdiff(required_vars, names(adsl))
if (length(missing_vars) > 0) {
stop("Missing required ADSL variables: ", paste(missing_vars, collapse = ", "))
}
# Apply variable labels — use xportr for submission context
# adsl <- adsl |>
# xportr_label(metacore_obj, domain = "ADSL") |>
# xportr_type(metacore_obj, domain = "ADSL") |>
# xportr_length(metacore_obj, domain = "ADSL") |>
# xportr_order(metacore_obj, domain = "ADSL")
# xportr_write(adsl, "adsl.xpt", label = "Subject-Level Analysis Dataset")
#
# For non-submission contexts:
# Hmisc::label(adsl$TRTSDT) <- "Date of First Study Treatment"
# Hmisc::label(adsl$SAFFL) <- "Safety Population Flag"Generated code must meet these standards for QC-readiness:
# TRTSDT: first dose date from EX.EXSTDTC per ADaM spec §4.2)# REVIEW: comments where protocol-specific
decisions are required (population flags, disposition record selection,
cut-points, treatment arm coding)stopifnot() for critical assertions (one record
per subject at DM load, DS uniqueness before merge, required variables present)|> and exprs() for admiral verb argumentsslice(), slice_min(), slice_max(), or manual group_by/summarise
instead of derive_vars_merged() with modeas.Date(), as.POSIXct(), convert_dtc_to_date(), or
convert_dtc_to_datetime() directly on --DTC variables — always use
derive_vars_dt() or derive_vars_dtm()flag_imputation = "date" instead of "auto" — "date" only
generates a date imputation flag and silently drops the time imputation flagflag_imputation = "auto" without including the generated flag
variables (e.g. TRTSTMF, TRTETMF) in new_vars — the flags must be
explicitly requested to appear in the outputdate_imputation = "none" for reference or death dates — partial
dates will return NA silently; use "first" for start dates and "last"
for end datesDSDECOD directly to EOSSTT without categorisation — DSDECOD
contains reason values ("ADVERSE EVENT", "SCREEN FAILURE") not status
values; EOSSTT must be "COMPLETED" or "DISCONTINUED" onlyDSTERM (verbatim) instead of DSDECOD (decoded) —
DCSREAS = decoded value, DCSREASP = verbatim textcase_when() for treatment arm coding when derive_vars_merged_lookup()
is available — the lookup function is more idiomatic and spec-drivenDOMAIN from source datasets before derive_vars_merged() calls"N" for flag variables — CDISC convention is "Y" or NA, never "N"# REVIEW: annotation — these are
always study-specific and must come from the ADaM specBefore returning code, verify:
stopifnot() at loadstopifnot() before disposition mergestopifnot() at endnew_vars# REVIEW: comments placed at protocol-specific decision pointsdate_imputation and time_imputation arguments explicitly setflag_imputation = "auto" used — not "date" or "none""COMPLETED" or "DISCONTINUED"NA for all completers© RConsortium, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 6 other files (references) in admiral/admiral-adsl of RConsortium/pharma-skills.
Open the folder on GitHubat commit ae5d83b
Admiral Adsl 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Admiral Adsl this skillRConsortium/pharma-skills | 120 | — | ~4.4k | Automated safety check: Pass | MIT | |
| DatasetsArize-ai/phoenix | 12k | — | ~1.6k | Automated safety check: Pass | Custom licence | |
| Longbridge Derivativessickn33/agentic-awesome-skills | 47k | 1 repos | ~1.1k | Automated safety check: Pass | MIT | |
| Dataset Curationwshobson/agents | 40k | — | ~2k | Automated safety check: Pass | MIT | |
| Arize Datasetgithub/awesome-copilot | 40k | 1 repos | ~3.9k | Automated safety check: Notes | MIT | |
| Crypto Derivatives StrategiesHKUDS/Vibe-Trading | 35k | — | ~2.4k | Automated safety check: Pass | MIT |
Arize-ai/phoenix
Understand what a Phoenix dataset is and reason well about its examples, outputs, splits, and how it feeds evaluators and experiments.
sickn33/agentic-awesome-skills
Curated upstream guidance for Longbridge Derivatives; use when the workflow matches the user goal.
wshobson/agents
Prepare, format, and validate datasets for supervised fine-tuning and preference training.
github/awesome-copilot
Creates, manages, and queries Arize datasets and examples. An agent skill from github/awesome-copilot.
HKUDS/Vibe-Trading
Covers three crypto-derivatives approaches: perpetual funding-rate arbitrage, futures term-structure trading in contango and backwardation, and options volatility and Greeks analysis.
ClickHouse/ClickHouse
Create test datasets (hits, visits, tpcds, tpch) from standard scripts.
RConsortium/pharma-skills
Audit R code that prepares CSR/TLF statistics for SAS-compatible rounding compliance (ties away from zero, round-once-at-display, fixed trailing-zero precision).
RConsortium/pharma-skills
Converts one or more GitHub Issues into standardized benchmark data using automated scripts.
RConsortium/pharma-skills
Generate a concise weekly progress summary for the pharmaskills repository.
RConsortium/pharma-skills
Derives an ADaM Adverse Events Analysis Dataset (ADAE) using the {admiral} R package and pharmaverse ecosystem.
RConsortium/pharma-skills
Derives ADaM Basic Data Structure (BDS) datasets using the {admiral} R package.
RConsortium/pharma-skills
Derives CDISC SDTM domains from raw clinical (EDC/eCRF) data using the {sdtm.oak} R package.
Derives an ADaM Subject-Level Analysis Dataset (ADSL) using the {admiral} R package and pharmaverse ecosystem. Admiral Adsl is an agent skill from RConsortium/pharma-skills. Derives an ADaM Subject-Level Analysis Dataset (ADSL) using the {admiral} R package and pharmaverse ecosystem.
Admiral Adsl fits situations like: A user needs to create ADSL from SDTM domains; derive standard subject-level variables (treatment dates; population flags); generate QC-ready R code following CDISC ADaM conventions.
Run `npx skills add RConsortium/pharma-skills --skill admiral-adsl -a claude-code`. Or copy the skill folder (admiral/admiral-adsl in RConsortium/pharma-skills) into .claude/skills/admiral-adsl in your project. Claude Code loads it when a task matches its description.
Run `npx skills add RConsortium/pharma-skills --skill admiral-adsl -a codex`. Or copy the skill folder (admiral/admiral-adsl in RConsortium/pharma-skills) into .agents/skills/admiral-adsl in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add RConsortium/pharma-skills --skill admiral-adsl -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/admiral-adsl, .gemini/skills/admiral-adsl, .github/skills/admiral-adsl and .opencode/skills/admiral-adsl in your project.
SKILL.md names no scripts, command-line tools or credentials: Admiral Adsl is instructions for the agent only. Compatibility (from SKILL.md): Requires R with admiral, dplyr, lubridate, and pharmaversesdtm installed. Designed for use in a GxP-compliant environment with access to SDTM datasets and an ADaM ADSL specification. .
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.
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.
Admiral Adsl is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 4.4k tokens (SKILL.md is roughly 18k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.5k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Admiral Adsl: Datasets (Arize-ai/phoenix, 12k stars), Longbridge Derivatives (sickn33/agentic-awesome-skills, 47k stars), Dataset Curation (wshobson/agents, 40k stars) and Arize Dataset (github/awesome-copilot, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
RConsortium (a GitHub organization) maintains it in RConsortium/pharma-skills, which has 120 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on October 4, 2026.
Source: RConsortium/pharma-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.