clinical-trials-database
Query ClinicalTrials.gov via APIv2.
Skill by hanyanphysics
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/hanyanphysics-clinical-trials-database
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/clinical-trials-database
What's inside
- Skill name
clinical-trials-database- Description
- 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.
- License
- Apache-2.0
- Instructions
- 370 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Agent Skills spec issues
- name: "clinical-trials-database" does not match folder "clinical_trials_database"
Files (4)
- SKILL.md
- clinical_trials_api.md · references/
- studies_schema.md · references/
- clinical_trials_api.py · scripts/
SKILL.md (first lines)
# Clinical Trials Database
## Prerequisites
1. **`uv`**: Read the `uv` skill and follow its Setup instructions to ensure
`uv` is installed and on PATH.
2. **User Notification**: If LICENSE_NOTIFICATION.txt does not already exist in
this skill 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-total` first** — check result volume before fetching all
records.
- **Paginate large result sets** — use `--limit` with `--page-token` to
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.md` to 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 `--fields` parameter to
> request specific data and keep responses small.
### Top-Level Fields
- `totalCount` — Total studies matching query (integer)
- `studies[]` — Array of study objects
- `nextPageToken` — cursor string for pagination
### Common Study Fields (and shorthand alias)
- **Identification**
- `protocolSection.identificationModule.nctId` (`NCTId`) — Unique trial ID
- `protocolSection.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/Exclusion
- `protocolSection.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.
```bash
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.json
```
All 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), ADULTFrom hanyanphysics/AI-for-Physics, Apache-2.0.
More from hanyanphysics/AI-for-Physics
- 0.530score
alphafold-database-fetch-and-analyze
hanyanphysics
Retrieve and analyze AlphaFold predicted structures for a protein.
SkillCFreshness: C★ 5Claude Code +9 - 0.530score
dbsnp-database
hanyanphysics
Use when you want to look up, map, and search for short genetic variants (SNPs, indels) in NCBI's dbSNP database.
SkillCFreshness: C★ 5Claude Code +9 - 0.530score
ensembl-database
hanyanphysics
Query the Ensembl database to resolve gene, transcript, and protein IDs, fetch genomic or protein sequences, retrieve gene structures (exons), and get variant…
SkillCFreshness: C★ 5Claude Code +9 - 0.530score
gnomad-database
hanyanphysics
Query the Genome Aggregation Database (gnomAD).
SkillCFreshness: C★ 5Claude Code +9 - 0.530score
gtex-database
hanyanphysics
Use when you want to retrieve quantitative RNA expression data and variant eQTL information from the GTEx (Genotype-Tissue Expression) Project across 54…
SkillCFreshness: C★ 5Claude Code +9 - 0.530score
interpro-database
hanyanphysics
Identify domains, families, and sites in proteins; find all proteins in a family or sharing a domain; explore species distribution for a domain; annotate…
SkillCFreshness: C★ 5Claude Code +9 - 0.530score
literature-search-arxiv
hanyanphysics
Search for scientific papers, preprints, and publications on arXiv.
SkillCFreshness: C★ 5Claude Code +9 - 0.530score
literature-search-biorxiv
hanyanphysics
Browse, filter, and download life sciences, biology, and medical preprints from bioRxiv and medRxiv.
SkillCFreshness: C★ 5Claude Code +9 - 0.527score
literature-search-europepmc
hanyanphysics
Search Europe PMC for scientific literature and download open-access full texts and PDFs.
SkillCFreshness: C★ 5Claude Code +9
Signals
- Stars
- 5
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 22, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/hanyanphysics/AI-for-Physics
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from hanyanphysics
- 0.530score
alphafold-database-fetch-and-analyze
hanyanphysics
Retrieve and analyze AlphaFold predicted structures for a protein.
SkillCFreshness: C★ 5Claude Code +9 - 0.530score
dbsnp-database
hanyanphysics
Use when you want to look up, map, and search for short genetic variants (SNPs, indels) in NCBI's dbSNP database.
SkillCFreshness: C★ 5Claude Code +9 - 0.530score
ensembl-database
hanyanphysics
Query the Ensembl database to resolve gene, transcript, and protein IDs, fetch genomic or protein sequences, retrieve gene structures (exons), and get variant…
SkillCFreshness: C★ 5Claude Code +9 - 0.530score
gnomad-database
hanyanphysics
Query the Genome Aggregation Database (gnomAD).
SkillCFreshness: C★ 5Claude Code +9 - 0.530score
gtex-database
hanyanphysics
Use when you want to retrieve quantitative RNA expression data and variant eQTL information from the GTEx (Genotype-Tissue Expression) Project across 54…
SkillCFreshness: C★ 5Claude Code +9 - 0.530score
interpro-database
hanyanphysics
Identify domains, families, and sites in proteins; find all proteins in a family or sharing a domain; explore species distribution for a domain; annotate…
SkillCFreshness: C★ 5Claude Code +9
Cite this page
clinical-trials-database skill. Agent Mart. https://agentmart.dev/skills/hanyanphysics-clinical-trials-database (last updated 2026-10-24)