trial-feasibility¶
Assess feasibility from comparable completed trials on ClinicalTrials.gov with enrolment rate per site-month where inputs exist, country footprint and common exclusion criteria. Use when planning a trial or sizing sites and recruitment time.
| Stage | Clinical development |
| Tier | 1 (deterministic tool) |
| Standards | ClinicalTrials.gov API v2, ICH E8(R1), ICH E6(R3) |
Minimum pharmaskills |
0.3.0 |
| Inputs | indication, phase, key eligibility, countries, optional studies json |
| Outputs | feasibility md, comparators csv, feasibility json |
| Verified by | connectors clinicaltrials search, trials feasibility |
Draft for qualified review. Not a validated system and not 21 CFR Part 11 compliant.
Install only this skill: pharmaskills skills install --agent claude-code --skill trial-feasibility (see Install).
Purpose¶
Give a clinical operations or clinical development reader evidence-based planning numbers from
comparable completed trials: how many participants per site per month they enrolled, in which
countries they ran, and which exclusion criteria were common. Calculation is done by the
deterministic pharmaskills trials feasibility tool; you select comparators, explain the
numbers and state their limits. The output feeds protocol-m11 and sample-size discussions.
When to use / when not to use¶
Use when asked for enrolment-rate benchmarks, a country or site footprint, "how long did similar trials take", or common exclusion criteria for an indication.
Do not use for: a competitor map (use competitive-landscape), site selection by named
investigator, budget or cost-per-patient estimates, patient-count epidemiology, or any claim that
a planned trial will enrol at a given rate. Benchmarks inform a plan; they do not predict it.
Inputs¶
Required: indication, phase, and key eligibility features of the planned trial. Ask once for
anything missing, then proceed with stated assumptions and [DATA NEEDED: ...] placeholders.
Optional: target countries, planned number of sites, a studies JSON the user already has.
If pharmaskills is not installed, tell the user to run uv tool install pharmaskills and
produce a template-only feasibility.md (from templates/feasibility.md) marked unverified,
with no numbers. With no network use a studies JSON supplied by the user (the tool is offline).
Check pharmaskills --version is at least min_pharmaskills.
Workflow¶
- Define comparators. Same indication, same phase, completed, similar population. Write the
selection rule down; read
references/rate-method.md. - Search.
pharmaskills connectors clinicaltrials search "<terms>" -p condition=<indication> -p phase=3 -p status=completed -n 100 --json > studies.json. The tool also reads raw ClinicalTrials.gov API v2 JSON (which carries locations and eligibility text), which gives the fullest result. Note that connector search output may lack site counts and eligibility text; say so when it does. - Compute.
pharmaskills trials feasibility --input studies.json --out out/feasibility.json --csv out/comparators.csv. Exit 2 means no trial had every input: report that, do not estimate. Trials without site counts or dates are excluded with a reason in the output. - Interpret. Median and quartiles, the excluded list, outliers (very few sites or very long duration), country footprint (trials and sites per country) and exclusion themes.
- Write
out/feasibility.mdfromtemplates/feasibility.md. Include the excluded trials and the reason for each, a comparators table, and explicit limitations. Every NCT id comes from the input and is linked ashttps://clinicaltrials.gov/study/NCT########. - Banner and provenance.
pharmaskills docs banner --apply out/feasibility.mdand edit the provenance block to name inputs and verification. - Hand off.
comparators.csvandfeasibility.jsonare the documented interface thatprotocol-m11reads for its comparable-trials section.
Output contract¶
Under out/:
| File | Content |
|---|---|
feasibility.md |
Rate summary, excluded trials with reasons, countries, exclusions, limits |
comparators.csv |
One row per trial: NCT link, enrolment, sites, months, rate, included flag, reason |
feasibility.json |
Tool report: rate summary, countries, exclusion themes and phrases, notes |
Rates are in participants per site per month and are always reported with the number of
evaluable trials (n). State the region assumed and the retrieval date.
Verification¶
Report pass or fail: tool exit code; rate computed only for trials where start date, completion
date, enrolment count and site count exist (check included in comparators.csv); every
excluded trial listed with a reason in feasibility.md; every NCT id in the document present in
the input and in the NCT plus 8 digit format; banner present. Fix and rerun up to three times,
then report what remains.
Guardrails¶
- Insert the draft banner and a provenance block; do not describe benchmarks as forecasts.
- Never fabricate NCT ids, enrolment counts, site counts, dates or rates, and never fill a missing site count with an assumed value. Missing input means the trial is excluded and noted.
- Never present a planning rate as certain; give the range and say which trials drive it.
- Months run from start to completion date, so the rate is a lower bound on enrolment speed; say so every time a rate is quoted.
- State the region assumed (default: global comparators) and that registry locations may list planned rather than enrolling sites.
- Exclusion themes are keyword matches; quote criteria wording only from the supplied records.
References¶
references/rate-method.md- rate definition, exclusion reasons, interpretation limitsreferences/guidance-notes.md- citations for feasibility and enrolment planning context- Public sources: ClinicalTrials.gov API v2, ICH E8(R1) section 3 (quality by design, critical to quality factors), ICH E6(R3) (Good Clinical Practice).
Templates: templates/feasibility.md. Scripts: scripts/run_feasibility.sh (thin wrapper around
pharmaskills trials feasibility).
Examples¶
Worked example with real recorded records: examples/clinical/trial-feasibility/. Inputs for
trying the workflow: skills/trial-feasibility/evals/fixtures/studies.json.
Worked example¶
Committed example with inputs and outputs: examples/clinical/trial-feasibility/.
Indication: adult obesity. Comparators: completed Phase 3 trials with GLP-1 based interventions.
Inputs¶
skills/trial-feasibility/evals/fixtures/studies.json: 27 ClinicalTrials.gov API v2 records,
trimmed to identification, status, sponsor, conditions, design, interventions, location countries
and eligibility text. Recorded once on 2026-10-14 from https://clinicaltrials.gov/api/v2/studies:
25 records with query.cond=obesity, query.intr=semaglutide OR tirzepatide OR liraglutide,
filter.overallStatus=COMPLETED, filter.advanced=AREA[Phase]PHASE3, plus 2 completed Phase 3
obesity records (NCT00231660, NCT00677391) that lack a site count or a completion date, kept to
exercise the exclusion rule. studies_no_sites.json holds only those two records.
No personal data.
Outputs (out/)¶
| File | How it was made |
|---|---|
feasibility.json, comparators.csv |
Real output of pharmaskills trials feasibility |
feasibility.md |
Drafted from those outputs following templates/feasibility.md |
feasibility_no_rate.md |
Sample correct response when no trial has a site count |
refusal_invent_rate.md |
Sample correct response to a request to invent a rate |
Reproduce¶
pharmaskills trials feasibility --input skills/trial-feasibility/evals/fixtures/studies.json \
--out examples/clinical/trial-feasibility/out/feasibility.json
Skill source: skills/trial-feasibility/SKILL.md