clinical-trials-database
Skill0 starsChanged 25 days agoApache-2.0View on GitHub
Query ClinicalTrials.gov via APIv2. Use when you want to search for trials by condition, drug, location, status, or phase; retrieve trial details by NCT ID; check eligibility/inclusion criteria; count trials across conditions or time periods; identify a sponsor's trial portfolio; find recruiting trials for patient matching.
3 other projects use a version of this, 2 of them edited.
Adopted by
Most recently taken up by
- 1stANUNNAKI/majlisedited, first seen Nov 8, 2026
- google-deepmind/science-skillsword for word, first seen Jul 1, 2026
- uppifyagency/boilerplate-saas-2026edited, first seen Jun 2, 2026
Other versions3 projects use a version of this.
Word for word · 1
- google-deepmind/science-skills★ 3.4k100% same
Edited · 2
- 1stANUNNAKI/majlis★ 298% same
- uppifyagency/boilerplate-saas-2026★ 199% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository40 other files it gives its agents.
- vector-geneSkill
- alphafold-database-fetch-and-analyzeSkill
- alphagenome-atlas-website-linksSkill
- alphagenome-single-variant-analysisSkill
- alphagenome-variant-impact-scoreSkill
- chembl-databaseSkill
- clinvar-databaseSkill
- credentialsSkill
- dbsnp-databaseSkill
- embl-ebi-olsSkill
- encode-ccres-databaseSkill
- ensembl-databaseSkill
- foldseek-structural-searchSkill
- gnomad-databaseSkill
- gtex-databaseSkill
- human-protein-atlas-databaseSkill
- interpro-databaseSkill
- jaspar-databaseSkill
- literature-search-arxivSkill
- literature-search-biorxivSkill
- literature-search-europepmcSkill
- literature-search-openalexSkill
- ncbi-sequence-fetchSkill
- openfda-databaseSkill
- opentargets-databaseSkill
- pdb-databaseSkill
- predictingthepastSkill
- protein-sequence-msaSkill
- protein-sequence-similarity-searchSkill
- pubchem-databaseSkill
- pubmed-databaseSkill
- pymolSkill
- quickgo-databaseSkill
- reactome-databaseSkill
- string-databaseSkill
- ucsc-conservation-and-tfbsSkill
- unibind-databaseSkill
- uniprot-databaseSkill
- uvSkill
- workflow-skill-creatorSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. About 0 are common, 13 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
uv: Read the uv skill and follow its Setup instructions to ensure uv is installed and on PATH. - Very specific: line 17
User Notification: If .licenses/clinical_trials_database_LICENSE.txt does not already exist in the workspace root directory then (1) …
- Distinctive: line 31
Use the Wrapper: ALWAYS execute the provided helper scripts to query the database rather than accessing the database directly.
- Distinctive: line 40
Trust Search Filters: Do not manually re-filter results unless explicitly asked to verify detailed eligibility.
- Distinctive: line 42
Notification: If this skill is used, ensure this is mentioned in the output.
- Distinctive: line 96
Use for: finding trials by disease, drug, phase, status, age group, or any combination of these filters.
- Distinctive: line 117
All flags are optional and combine via AND logic.
- Distinctive: line 184
Use for: fetching full details of a specific trial when you already have the NCT identifier.
- Distinctive: line 228
Use for: pulling inclusion/exclusion rules, age ranges, and sex requirements for patient-matching tasks.
- Distinctive: line 250
Use for: exploring the trial landscape — checking how many trials exist for a condition, phase, or status before fetching full records.
- Distinctive: line 265
Use for: narrowing trials to a specific country, state, or city.
- Very specific: line 267
Use --advanced with AREA[LocationCountry] or AREA[LocationCity] to restrict results by geography:
- Distinctive: line 282
Use for: identifying a sponsor's or institution's trial portfolio.
- Very specific: line 284
Use --sponsor to find trials run by a specific institution or company:
- Distinctive: line 296
Use for: complex queries that layer multiple filters (condition and drug and phase and geography and sponsor, etc.).
- Distinctive: line 299
All flags combine via AND, so you can layer conditions, interventions, status, phase, geography, and sponsor in a single query:
- Distinctive: line 316
Use for: uncommon endpoints or parameter combinations not covered by the dedicated flags.
- Very specific: line 328
When results exceed --limit, the response includes a nextPageToken.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Clinical Trials Database
Prerequisites
uv: Read theuvskill and follow its Setup instructions to ensureuvis installed and on PATH.- User Notification: If .licenses/clinical_trials_database_LICENSE.txt does not already exist in the workspace root directory then (1) prominently notify the user to check the terms at https://clinicaltrials.gov/, then (2) create the file recording the notification text and timestamp.
Overview
Access worldwide clinical trial data from ClinicalTrials.gov via the REST API
v2. The CLI script at scripts/clinical_trials_api.py wraps the API with
dedicated flags for common filters (phase, age group, status, intervention,
sponsor, etc.) so you rarely need to construct raw queries.
Core Rules
- Use the Wrapper: ALWAYS execute the provided helper scripts to query the database rather than accessing the database directly. The scripts automatically enforce the required rate limit gracefully.
- Always use
--fields— trial JSON records can be very large; restrict to the data points you need. - Use
--count-totalfirst — check result volume before fetching all records. - Paginate large result sets — use
--limitwith--page-tokento iterate. - Trust Search Filters: Do not manually re-filter results unless explicitly asked to verify detailed eligibility.
- Notification: If this skill is used, ensure this is mentioned in the output.
Context Efficiency Warning
Trial JSON records can be very large. Always use the --fields parameter to
restrict the response to only the data points you need. After writing to file,
read only the fields you need rather than the entire file.
[!TIP] Use
references/studies_schema.mdto identify exact field paths for--fields.
Response Layout Summary
API responses contain a list of studies (usually in a studies[] array). Each
study is split into protocolSection and optional resultsSection.
[!Tip] Use the shorthand aliases below with the
--fieldsparameter to request specific data and keep responses small.
Top-Level Fields
totalCount— Total studies matching query (integer)studies[]— Array of study objectsnextPageToken— cursor string for pagination
Common Study Fields (and shorthand alias)
- Identification
protocolSection.identificationModule.nctId(NCTId) — Unique trial IDprotocolSection.identificationModule.briefTitle(BriefTitle) — Short title
- Status
protocolSection.statusModule.overallStatus(OverallStatus) — Recruitment status
- Description
protocolSection.descriptionModule.briefSummary(BriefSummary) — Short description
- Arms & Interventions
protocolSection.armsInterventionsModule.interventions(ArmsInterventionsModule)
- Eligibility
protocolSection.eligibilityModule.eligibilityCriteria(EligibilityCriteria) — Inclusion/ExclusionprotocolSection.eligibilityModule.stdAges(StdAge) — CHILD, ADULT, etc.
Consult references/studies_schema.md for full paths (Locations, Outcomes,
Results) and common --fields recipes.
Commands
Search for studies
Use for: finding trials by disease, drug, phase, status, age group, or any combination of these filters.
uv run scripts/clinical_trials_api.py search \
--condition "<disease>" \
--intervention "<drug_or_treatment>" \
--status "<status>" \
--phase "<phase>" \
--age-group "<age_group>" \
--study-type "<study_type>" \
--sponsor "<sponsor_name>" \
--has-results \
--sort "<field>:<asc|desc>" \
--fields "<fields>" \
--limit <N> \
--count-total \
--page-token "<token>" \
--output /tmp/search_results.jsonAll flags are optional and combine via AND logic.
Flag reference:
--condition— Disease or condition to search for (e.g."cystic fibrosis").--intervention— Drug, device, or treatment name (e.g."pembrolizumab").--status— Recruitment status filter. Values: RECRUITING, COMPLETED, NOT_YET_RECRUITING, ACTIVE_NOT_RECRUITING, ENROLLING_BY_INVITATION, TERMINATED, SUSPENDED, WITHDRAWN.--phase— Trial phase filter. Values: PHASE1, PHASE2, PHASE3, PHASE4, EARLY_PHASE1, NA.--age-group— Patient age group filter. Values: CHILD (0–17), ADULT (18–64), OLDER_ADULT (65+).--study-type— Type of study. Values: INTERVENTIONAL, OBSERVATIONAL, EXPANDED_ACCESS.--sponsor— Lead sponsor or institution name (e.g."National Cancer Institute").--has-results— Boolean flag (no value needed). When present, filters for studies that have results available on ClinicalTrials.gov.--sort— Sort order asFieldName:ascorFieldName:desc. Common fields:LastUpdatePostDate,EnrollmentCount,StudyFirstPostDate,StartDate.--fields— Comma-separated list of JSON field names to include in the response. Use this to keep responses small (e.g."NCTId,BriefTitle,OverallStatus,Phase"). Seereferences/studies_schema.mdfor available field paths.--limit— Maximum number of studies to return per request (1–1000, default 10).--count-total— Boolean flag (no value needed). When present, the response includes atotalCountfield showing the total number of matching studies across all pages.--page-token— An opaque cursor string used to fetch the next page of results. Obtain this value from thenextPageTokenfield in a previous search response. Do not construct this string yourself; always copy it verbatim from the API response. See the Pagination section below.--advanced— Raw Essie filter expression for structured queries beyond the dedicated flags (e.g."AREA[LocationCountry]United States"). Combined with other flags via AND. Seereferences/clinical_trials_api.mdfor syntax.--output— (Required) File path where the JSON response is written.
Example — actively recruiting Phase 3 pediatric cystic fibrosis trials:
uv run scripts/clinical_trials_api.py search \
--condition "cystic fibrosis" \
--status RECRUITING \
--phase PHASE3 \
--age-group CHILD \
--fields "NCTId,BriefTitle,OverallStatus,Phase" \
--limit 10 \
--output /tmp/cf_trials.jsonExample — recruiting atezolizumab trials for esophageal cancer:
uv run scripts/clinical_trials_api.py search \
--condition "esophageal cancer" \
--intervention "Atezolizumab" \
--status RECRUITING \
--fields "NCTId,BriefTitle,Phase" \
--limit 10 \
--output /tmp/atezolizumab_trials.jsonRetrieve a study by NCT ID
Use for: fetching full details of a specific trial when you already have the NCT identifier.
uv run scripts/clinical_trials_api.py get-study \
<nct_id> [--fields "<fields>"] \
--output /tmp/study.jsonReturns a useful default set of fields if --fields is omitted:
NCTId,BriefTitle,OverallStatus,Phase,BriefSummary,
ConditionsModule,ArmsInterventionsModule,EligibilityModule
Structure of the default response:
{
"protocolSection": {
"identificationModule": {
"nctId": "NCT00000000",
"briefTitle": "Study Title"
},
"statusModule": {
"overallStatus": "RECRUITING"
},
"descriptionModule": {
"briefSummary": "This study is about..."
},
"conditionsModule": {
"conditions": [ "Condition Name" ]
},
"armsInterventionsModule": {
"interventions": [ { "type": "DRUG", "name": "Drug Name" } ]
},
"eligibilityModule": {
"eligibilityCriteria": "Inclusion:\n- ...",
"stdAges": [ "ADULT" ]
}
}
}Get eligibility / inclusion criteria
Use for: pulling inclusion/exclusion rules, age ranges, and sex requirements for patient-matching tasks.
uv run scripts/clinical_trials_api.py \
get-eligibility <nct_id> \
--output /tmp/eligibility.jsonShortcut that returns title and the full eligibility module (inclusion/exclusion criteria, age range, sex).
Example — inclusion criteria for NCT04886804:
uv run scripts/clinical_trials_api.py \
get-eligibility NCT04886804 \
--output /tmp/eligibility_NCT04886804.jsonCount matching studies
Use for: exploring the trial landscape — checking how many trials exist for a condition, phase, or status before fetching full records.
uv run scripts/clinical_trials_api.py count \
--condition "<disease>" \
[--status "<status>"] [--phase "<phase>"] ... \
--output /tmp/count.jsonReturns only the total count of clinical trials matching the search criteria
without fetching study records. Accepts the same filter flags as search.
Search by location / geography
Use for: narrowing trials to a specific country, state, or city.
Use --advanced with AREA[LocationCountry] or AREA[LocationCity] to
restrict results by geography:
uv run scripts/clinical_trials_api.py search \
--condition "cystic fibrosis" \
--status RECRUITING \
--advanced "AREA[LocationCity]New York" \
--fields "NCTId,BriefTitle" \
--limit 20 \
--output /tmp/nyc_cf_trials.jsonSearch by sponsor / organization
Use for: identifying a sponsor's or institution's trial portfolio.
Use --sponsor to find trials run by a specific institution or company:
uv run scripts/clinical_trials_api.py search \
--sponsor "National Cancer Institute" \
--fields "NCTId,BriefTitle,LeadSponsorName" \
--limit 20 \
--output /tmp/nci_trials.jsonCombined multi-criteria search
Use for: complex queries that layer multiple filters (condition and drug and phase and geography and sponsor, etc.).
All flags combine via AND, so you can layer conditions, interventions, status, phase, geography, and sponsor in a single query:
uv run scripts/clinical_trials_api.py search \
--condition "pancreatic cancer" \
--intervention "immunotherapy" \
--status RECRUITING \
--phase PHASE3 \
--advanced "AREA[LocationCountry]United States" \
--fields "NCTId,BriefTitle,Phase,LeadSponsorName" \
--limit 20 \
--output /tmp/panc_trials.jsonRaw API query (escape hatch)
Use for: uncommon endpoints or parameter combinations not covered by the dedicated flags.
uv run scripts/clinical_trials_api.py raw-query \
--endpoint <path> \
--params '<json_dict>' \
--output /tmp/raw_result.jsonPagination
When results exceed --limit, the response includes a nextPageToken. Pass it
with --page-token to fetch the next page:
uv run scripts/clinical_trials_api.py search \
--condition "breast cancer" \
--status RECRUITING \
--limit 50 --count-total \
--output /tmp/breast_cancer_p1.json
uv run scripts/clinical_trials_api.py search \
--condition "breast cancer" \
--status RECRUITING \
--limit 50 --page-token "CAo=" \
--output /tmp/breast_cancer_p2.jsonAdvanced Querying
For complex filtering beyond the dedicated flags, use --advanced with an Essie
expression.
What is an Essie Expression? Essie is the search engine powering ClinicalTrials.gov. An Essie expression is a structured query that targets specific fields (e.g., country, phase) rather than doing general keyword searches.
AREA[Field]Value: Targets a specific field.AREA[LocationCountry]United StatesAREA[Phase]PHASE3
- Boolean operators: Combine with
AND,OR,NOT. RANGE[min, max]: For numeric/date fields (e.g.RANGE[500, MAX]).
See references/clinical_trials_api.md for syntax and available fields.
It is combined with other flags via AND:
uv run scripts/clinical_trials_api.py search \
--condition "diabetes" \
--advanced "AREA[LocationCountry]United States \
AND AREA[EnrollmentCount]RANGE[500, MAX]" \
--fields "NCTId,BriefTitle,EnrollmentCount" \
--output /tmp/diabetes_us_large.jsonReferences
- API parameters, enum values, and Essie syntax:
references/clinical_trials_api.md - JSON field paths and
--fieldsrecipes:references/studies_schema.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

