Token导航 LogoToken导航

Agent Skill · 研究检索

clinicaltrials-database(临床试验数据库)

用于辅助数据库表结构、查询语句、迁移脚本和数据维护任务。它适合让 Agent 分析 schema、编写 SQL、排查查询问题、整理索引或生成迁移建议。使用时需要明确数据库类型、连接环境和目标表,区分只读分析与写入变更;涉及删除、更新、迁移和批量导入时,应优先 dry-run、备份或事务保护,避免误操作。

clinicaltrials-database 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证为 MIT,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 16,205。

总安装 7,320周安装 299GitHub Stars 26,423下载 2,368核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:clinicaltrials-database(临床试验数据库)
来源仓库:https://github.com/davila7/claude-code-templates
仓库路径:skills/clinicaltrials-database
安装命令:
npx skills add https://github.com/davila7/claude-code-templates --skill clinicaltrials-database
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/davila7/claude-code-templates --skill clinicaltrials-database

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

临床试验数据库技能对接 ClinicalTrials.gov API v2,实现全球试验数据的检索与分析。支持按疾病、入组条件或地理位置筛选试验,助力患者匹配与科研选题。可导出 JSON/CSV 格式数据,适用于 meta 分析或注册策略规划。注意 API 速率限制为每分钟约 50 次请求,批量操作需合理控制频率。

clinicaltrials-database 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/clinicaltrials-database

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/davila7/claude-code-templates --skill clinical…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

clinicaltrials-database 怎么安装?

在终端执行 npx skills add https://github.com/davila7/claude-code-templates --skill clinicaltrials-dat…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

clinicaltrials-database 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

clinicaltrials-database 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

clinicaltrials-database 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

clinicaltrials-database 用的人多吗?

公开数据是累计安装 7,320 次,近一周安装 299 次,下载 2,368 次,GitHub 26,423 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

clinicaltrials-database 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 来源仓库有 26,423 星,维护活跃度相对可查。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
clinicaltrials-database

临床试验数据库 · 本页

7,32026,423需要联网MIT有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

ClinicalTrials.gov Database

Overview

ClinicalTrials.gov is a comprehensive registry of clinical studies conducted worldwide, maintained by the U.S. National Library of Medicine. Access API v2 to search for trials, retrieve detailed study information, filter by various criteria, and export data for analysis. The API is public (no authentication required) with rate limits of ~50 requests per minute, supporting JSON and CSV formats.

When to Use This Skill

This skill should be used when working with clinical trial data in scenarios such as:

  • Patient matching - Finding recruiting trials for specific conditions or patient populations
  • Research analysis - Analyzing clinical trial trends, outcomes, or study designs
  • Drug/intervention research - Identifying trials testing specific drugs or interventions
  • Geographic searches - Locating trials in specific locations or regions
  • Sponsor/organization tracking - Finding trials conducted by specific institutions
  • Data export - Extracting clinical trial data for further analysis or reporting
  • Trial monitoring - Tracking status updates or results for specific trials
  • Eligibility screening - Reviewing inclusion/exclusion criteria for trials

Quick Start

Basic Search Query

Search for clinical trials using the helper script:

cd scientific-databases/clinicaltrials-database/scripts
python3 query_clinicaltrials.py

Or use Python directly with the requests library:

import requests

url = "https://clinicaltrials.gov/api/v2/studies"
params = {
    "query.cond": "breast cancer",
    "filter.overallStatus": "RECRUITING",
    "pageSize": 10
}

response = requests.get(url, params=params)
data = response.json()

print(f"Found {data['totalCount']} trials")

Retrieve Specific Trial

Get detailed information about a trial using its NCT ID:

import requests

nct_id = "NCT04852770"
url = f"https://clinicaltrials.gov/api/v2/studies/{nct_id}"

response = requests.get(url)
study = response.json()

# Access specific modules
title = study['protocolSection']['identificationModule']['briefTitle']
status = study['protocolSection']['statusModule']['overallStatus']

Core Capabilities

1. Search by Condition/Disease

Find trials studying specific medical conditions or diseases using the query.cond parameter.

Example: Find recruiting diabetes trials

from scripts.query_clinicaltrials import search_studies

results = search_studies(
    condition="type 2 diabetes",
    status="RECRUITING",
    page_size=20,
    sort="LastUpdatePostDate:desc"
)

print(f"Found {results['totalCount']} recruiting diabetes trials")
for study in results['studies']:
    protocol = study['protocolSection']
    nct_id = protocol['identificationModule']['nctId']
    title = protocol['identificationModule']['briefTitle']
    print(f"{nct_id}: {title}")

Common use cases:

  • Finding trials for rare diseases
  • Identifying trials for comorbid conditions
  • Tracking trial availability for specific diagnoses

2. Search by Intervention/Drug

Search for trials testing specific interventions, drugs, devices, or procedures using the query.intr parameter.

Example: Find Phase 3 trials testing Pembrolizumab

from scripts.query_clinicaltrials import search_studies

results = search_studies(
    intervention="Pembrolizumab",
    status=["RECRUITING", "ACTIVE_NOT_RECRUITING"],
    page_size=50
)

# Filter by phase in results
phase3_trials = [
    study for study in results['studies']
    if 'PHASE3' in study['protocolSection'].get('designModule', {}).get('phases', [])
]

Common use cases:

  • Drug development tracking
  • Competitive intelligence for pharmaceutical companies
  • Treatment option research for clinicians

3. Geographic Search

Find trials in specific locations using the query.locn parameter.

Example: Find cancer trials in New York

from scripts.query_clinicaltrials import search_studies

results = search_studies(
    condition="cancer",
    location="New York",
    status="RECRUITING",
    page_size=100
)

# Extract location details
for study in results['studies']:
    locations_module = study['protocolSection'].get('contactsLocationsModule', {})
    locations = locations_module.get('locations', [])
    for loc in locations:
        if 'New York' in loc.get('city', ''):
            print(f"{loc['facility']}: {loc['city']}, {loc.get('state', '')}")

Common use cases:

  • Patient referrals to local trials
  • Geographic trial distribution analysis
  • Site selection for new trials

4. Search by Sponsor/Organization

Find trials conducted by specific organizations using the query.spons parameter.

Example: Find trials sponsored by NCI

from scripts.query_clinicaltrials import search_studies

results = search_studies(
    sponsor="National Cancer Institute",
    page_size=100
)

# Extract sponsor information
for study in results['studies']:
    sponsor_module = study['protocolSection']['sponsorCollaboratorsModule']
    lead_sponsor = sponsor_module['leadSponsor']['name']
    collaborators = sponsor_module.get('collaborators', [])
    print(f"Lead: {lead_sponsor}")
    if collaborators:
        print(f"  Collaborators: {', '.join([c['name'] for c in collaborators])}")

Common use cases:

  • Tracking institutional research portfolios
  • Analyzing funding organization priorities
  • Identifying collaboration opportunities

5. Filter by Study Status

Filter trials by recruitment or completion status using the filter.overallStatus parameter.

Valid status values:

  • RECRUITING - Currently recruiting participants
  • NOT_YET_RECRUITING - Not yet open for recruitment
  • ENROLLING_BY_INVITATION - Only enrolling by invitation
  • ACTIVE_NOT_RECRUITING - Active but no longer recruiting
  • SUSPENDED - Temporarily halted
  • TERMINATED - Stopped prematurely
  • COMPLETED - Study has concluded
  • WITHDRAWN - Withdrawn prior to enrollment

Example: Find recently completed trials with results

from scripts.query_clinicaltrials import search_studies

results = search_studies(
    condition="alzheimer disease",
    status="COMPLETED",
    sort="LastUpdatePostDate:desc",
    page_size=50
)

# Filter for trials with results
trials_with_results = [
    study for study in results['studies']
    if study.get('hasResults', False)
]

print(f"Found {len(trials_with_results)} completed trials with results")

6. Retrieve Detailed Study Information

Get comprehensive information about specific trials including eligibility criteria, outcomes, contacts, and locations.

Example: Extract eligibility criteria

from scripts.query_clinicaltrials import get_study_details

study = get_study_details("NCT04852770")
eligibility = study['protocolSection']['eligibilityModule']

print(f"Eligible Ages: {eligibility.get('minimumAge')} - {eligibility.get('maximumAge')}")
print(f"Eligible Sex: {eligibility.get('sex')}")
print(f"\nInclusion Criteria:")
print(eligibility.get('eligibilityCriteria'))

Example: Extract contact information

from scripts.query_clinicaltrials import get_study_details

study = get_study_details("NCT04852770")
contacts_module = study['protocolSection']['contactsLocationsModule']

# Overall contacts
if 'centralContacts' in contacts_module:
    for contact in contacts_module['centralContacts']:
        print(f"Contact: {contact.get('name')}")
        print(f"Phone: {contact.get('phone')}")
        print(f"Email: {contact.get('email')}")

# Study locations
if 'locations' in contacts_module:
    for location in contacts_module['locations']:
        print(f"\nFacility: {location.get('facility')}")
        print(f"City: {location.get('city')}, {location.get('state')}")
        if location.get('status'):
            print(f"Status: {location['status']}")

7. Pagination and Bulk Data Retrieval

Handle large result sets efficiently using pagination.

Example: Retrieve all matching trials

from scripts.query_clinicaltrials import search_with_all_results

# Get all trials (automatically handles pagination)
all_trials = search_with_all_results(
    condition="rare disease",
    status="RECRUITING"
)

print(f"Retrieved {len(all_trials)} total trials")

Example: Manual pagination with control

from scripts.query_clinicaltrials import search_studies

all_studies = []
page_token = None
max_pages = 10  # Limit to avoid excessive requests

for page in range(max_pages):
    results = search_studies(
        condition="cancer",
        page_size=1000,  # Max page size
        page_token=page_token
    )

    all_studies.extend(results['studies'])

    # Check for next page
    page_token = results.get('pageToken')
    if not page_token:
        break

print(f"Retrieved {len(all_studies)} studies across {page + 1} pages")

8. Data Export to CSV

Export trial data to CSV format for analysis in spreadsheet software or data analysis tools.

Example: Export to CSV file

from scripts.query_clinicaltrials import search_studies

# Request CSV format
results = search_studies(
    condition="heart disease",
    status="RECRUITING",
    format="csv",
    page_size=1000
)

# Save to file
with open("heart_disease_trials.csv", "w") as f:
    f.write(results)

print("Data exported to heart_disease_trials.csv")

Note: CSV format returns a string instead of JSON dictionary.

9. Extract and Summarize Study Information

Extract key information for quick overview or reporting.

Example: Create trial summary

from scripts.query_clinicaltrials import get_study_details, extract_study_summary

# Get details and extract summary
study = get_study_details("NCT04852770")
summary = extract_study_summary(study)

print(f"NCT ID: {summary['nct_id']}")
print(f"Title: {summary['title']}")
print(f"Status: {summary['status']}")
print(f"Phase: {', '.join(summary['phase'])}")
print(f"Enrollment: {summary['enrollment']}")
print(f"Last Update: {summary['last_update']}")
print(f"\nBrief Summary:\n{summary['brief_summary']}")

10. Combined Query Strategies

Combine multiple filters for targeted searches.

Example: Multi-criteria search

from scripts.query_clinicaltrials import search_studies

# Find Phase 2/3 immunotherapy trials for lung cancer in California
results = search_studies(
    condition="lung cancer",
    intervention="immunotherapy",
    location="California",
    status=["RECRUITING", "NOT_YET_RECRUITING"],
    page_size=100
)

# Further filter by phase
phase2_3_trials = [
    study for study in results['studies']
    if any(phase in ['PHASE2', 'PHASE3']
           for phase in study['protocolSection'].get('designModule', {}).get('phases', []))
]

print(f"Found {len(phase2_3_trials)} Phase 2/3 immunotherapy trials")

Resources

scripts/query_clinicaltrials.py

Comprehensive Python script providing helper functions for common query patterns:

  • search_studies() - Search for trials with various filters
  • get_study_details() - Retrieve full information for a specific trial
  • search_with_all_results() - Automatically paginate through all results
  • extract_study_summary() - Extract key information for quick overview

Run the script directly for example usage:

python3 scripts/query_clinicaltrials.py

references/api_reference.md

Detailed API documentation including:

  • Complete endpoint specifications
  • All query parameters and valid values
  • Response data structure and modules
  • Common use cases with code examples
  • Error handling and best practices
  • Data standards (ISO 8601 dates, CommonMark markdown)

Load this reference when working with unfamiliar API features or troubleshooting issues.

Best Practices

Rate Limit Management

The API has a rate limit of approximately 50 requests per minute. For bulk data retrieval:

  1. Use maximum page size (1000) to minimize requests
  2. Implement exponential backoff on rate limit errors (429 status)
  3. Add delays between requests for large-scale data collection
import time
import requests

def search_with_rate_limit(params):
    try:
        response = requests.get("https://clinicaltrials.gov/api/v2/studies", params=params)
        response.raise_for_status()
        return response.json()
    except requests.exceptions.HTTPError as e:
        if e.response.status_code == 429:
            print("Rate limited. Waiting 60 seconds...")
            time.sleep(60)
            return search_with_rate_limit(params)  # Retry
        raise

Data Structure Navigation

The API response has a nested structure. Key paths to common information:

  • NCT ID: study['protocolSection']['identificationModule']['nctId']
  • Title: study['protocolSection']['identificationModule']['briefTitle']
  • Status: study['protocolSection']['statusModule']['overallStatus']
  • Phase: study['protocolSection']['designModule']['phases']
  • Eligibility: study['protocolSection']['eligibilityModule']
  • Locations: study['protocolSection']['contactsLocationsModule']['locations']
  • Interventions: study['protocolSection']['armsInterventionsModule']['interventions']

Error Handling

Always implement proper error handling for network requests:

import requests

try:
    response = requests.get(url, params=params, timeout=30)
    response.raise_for_status()
    data = response.json()
except requests.exceptions.HTTPError as e:
    print(f"HTTP error: {e.response.status_code}")
except requests.exceptions.RequestException as e:
    print(f"Request failed: {e}")
except ValueError as e:
    print(f"JSON decode error: {e}")

Handling Missing Data

Not all trials have complete information. Always check for field existence:

# Safe navigation with .get()
phases = study['protocolSection'].get('designModule', {}).get('phases', [])
enrollment = study['protocolSection'].get('designModule', {}).get('enrollmentInfo', {}).get('count', 'N/A')

# Check before accessing
if 'resultsSection' in study:
    # Process results
    pass

Technical Specifications

  • Base URL: https://clinicaltrials.gov/api/v2
  • Authentication: Not required (public API)
  • Rate Limit: ~50 requests/minute per IP
  • Response Formats: JSON (default), CSV
  • Max Page Size: 1000 studies per request
  • Date Format: ISO 8601
  • Text Format: CommonMark Markdown for rich text fields
  • API Version: 2.0 (released March 2024)
  • API Specification: OpenAPI 3.0

For complete technical details, see references/api_reference.md.

平台分布

Claude Code

27.1%
按下载量换算642

OpenCode

21.98%
按下载量换算520

Cursor

19.09%
按下载量换算452

Antigravity

13.87%
按下载量换算328

Gemini CLI

8.41%
按下载量换算199

Codex

3.57%
按下载量换算85

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills