sciagent-skill-creator
Scaffold a new SciAgent-Skills entry. Picks pipeline/toolkit/database/guide template, creates skills/{category}/{name}/SKILL.md with valid frontmatter, appends…
Query ClinicalTrials.gov API v2 for trial data. Search by condition, drug/intervention, location, sponsor, or phase; fetch details by NCT ID; filter by status; paginate; export CSV. For clinical research, patient matching, and trial portfolio analysis.
$ npx -y skills add jaechang-hits/SciAgent-Skills --skill clinicaltrials-database-search --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/clinicaltrials-database-searchContext preview
The summary Claude sees to decide when to auto-load this skill.
Query ClinicalTrials.gov API v2 for trial data. Search by condition, drug/intervention, location, sponsor, or phase; fetch details by NCT ID; filter by status; paginate; export CSV. For clinical research, patient matching, and trial portfolio analysis.
name: clinicaltrials-database-search description: Query ClinicalTrials.gov API v2 for trial data. Search by condition, drug/intervention, location, sponsor, or phase; fetch details by NCT ID; filter by status; paginate; export CSV. For clinical research, patient matching, and trial portfolio analysis. license: CC-BY-4.0
Query the ClinicalTrials.gov API v2 (public, no authentication) to search and retrieve clinical trial data worldwide. Supports searching by condition, intervention, location, sponsor, and status; retrieving detailed study information by NCT ID; paginating large result sets; and exporting to CSV.
uv pip install requests pandas
**API details**:
import requests
import time
CT_API = "https://clinicaltrials.gov/api/v2"
def ct_search(params):
"""Reusable helper for ClinicalTrials.gov searches."""
response = requests.get(f"{CT_API}/studies", params=params, timeout=30)
response.raise_for_status()
return response.json()
# Search for recruiting breast cancer trials
results = ct_search({
"query.cond": "breast cancer",
"filter.overallStatus": "RECRUITING",
"pageSize": 10,
"sort": "LastUpdatePostDate:desc"
})
print(f"Found {results['totalCount']} trials")
for study in results['studies'][:3]:
nct = study['protocolSection']['identificationModule']['nctId']
title = study['protocolSection']['identificationModule']['briefTitle']
print(f" {nct}: {title}")ClinicalTrials.gov returns deeply nested JSON. Key navigation paths:
| Data | Path | |------|------| | NCT ID | `study['protocolSection']['identificationModule']['nctId']` | | Title | `study['protocolSection']['identificationModule']['briefTitle']` | | Status | `study['protocolSection']['statusModule']['overallStatus']` | | Phase | `study['protocolSection']['designModule']['phases']` | | Enrollment | `study['protocolSection']['designModule']['enrollmentInfo']['count']` | | Eligibility | `study['protocolSection']['eligibilityModule']` | | Locations | `study['protocolSection']['contactsLocationsModule']['locations']` | | Interventions | `study['protocolSection']['armsInterventionsModule']['interventions']` | | Results | `study.get('resultsSection')` (None if no results posted) |
| Status | Description | |--------|-------------| | `RECRUITING` | Currently recruiting participants | | `NOT_YET_RECRUITING` | Approved but not yet open | | `ENROLLING_BY_INVITATION` | Invitation-only enrollment | | `ACTIVE_NOT_RECRUITING` | Active, enrollment closed | | `SUSPENDED` | Temporarily halted | | `TERMINATED` | Stopped prematurely | | `COMPLETED` | Study concluded | | `WITHDRAWN` | Withdrawn before enrollment |
| Phase | Description | |-------|-------------| | `EARLY_PHASE1` | Early Phase 1 (formerly Phase 0) | | `PHASE1` | Phase 1 — safety and dosing | | `PHASE2` | Phase 2 — efficacy and side effects | | `PHASE3` | Phase 3 — large-scale efficacy | | `PHASE4` | Phase 4 — post-market surveillance | | `NA` | Not applicable (non-drug studies) |
| Parameter | Type | Description | Example | |-----------|------|-------------|---------| | `query.cond` | string | Condition/disease | `lung cancer` | | `query.intr` | string | Intervention/drug | `Pembrolizumab` | | `query.locn` | string | Geographic location | `New York` | | `query.spons` | string | Sponsor name | `National Cancer Institute` | | `query.term` | string | General full-text search | `immunotherapy` | | `filter.overallStatus` | string | Status filter (comma-separated) | `RECRUITING,COMPLETED` | | `filter.phase` | string | Phase filter | `PHASE2,PHASE3` | | `filter.ids` | string | NCT ID filter | `NCT04852770` | | `sort` | string | Sort order | `LastUpdatePostDate:desc` | | `pageSize` | int | Results per page (max 1000) | `100` | | `pageToken` | string | Pagination token | (from previous response) | | `format` | string | Response format | `json` or `csv` |
**Sort options**: `LastUpdatePostDate`, `EnrollmentCount`, `StartDate`, `StudyFirstPostDate` — each with `:asc` or `:desc`.
results = ct_search({
"query.cond": "type 2 diabetes",
"filter.overallStatus": "RECRUITING",
"pageSize": 20,
"sort": "LastUpdatePostDate:desc"
})
print(f"Found {results['totalCount']} recruiting diabetes trials")
for study in results['studies'][:5]:
proto = study['protocolSection']
nct = proto['identificationModule']['nctId']
title = proto['identificationModule']['briefTitle']
print(f" {nct}: {title}")# Find Phase 3 trials testing Pembrolizumab
results = ct_search({
"query.intr": "Pembrolizumab",
"filter.overallStatus": "RECRUITING,ACTIVE_NOT_RECRUITING",
"filter.phase": "PHASE3",
"pagTurn your AI coding agent into a life sciences expert — 199 bioinformatics skills for Claude Code covering RNA-seq, single-cell analysis, genomics, proteomics, drug discovery, and more. Boosted BixBench from 65% to 92%. Open source.
Scaffold a new SciAgent-Skills entry. Picks pipeline/toolkit/database/guide template, creates skills/{category}/{name}/SKILL.md with valid frontmatter, appends…
Bayesian modeling with PyMC 5: priors, likelihood, NUTS/ADVI sampling, diagnostics (R-hat, ESS), LOO/WAIC comparison, prediction. Hierarchical, logistic, GP…
Time-to-event modeling with scikit-survival: Cox PH (elastic net), Random Survival Forests, Boosting, SVMs for censored data. C-index, Brier, time-dependent…
Guided statistical analysis: test choice, assumption checks, effect sizes, power, APA reporting. Pick tests, verify assumptions, or format results for…
Python statistical modeling: regression (OLS, WLS, GLM), discrete (Logit, Poisson, NegBin), time series (ARIMA, SARIMAX, VAR), with rigorous inference,…
DL cell/nucleus segmentation for fluorescence and brightfield microscopy. Pre-trained models (cyto3, nuclei, tissuenet) and a generalist flow-based algorithm…