clinical-trials-v2
通过 ClinicalTrials.gov API v2 实时检索官方临床试验注册数据。触发词包括 ClinicalTrials.gov、临床试验、NCT、试验注册、招募状态、phase 1/2/3、RCT lookup、interventional trial、observational…
Skill by EthanYoQ
Chalk Labs
Need help deploying clinical-trials-v2?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
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/ethanyoq-clinical-trials-v2-33e72f
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 and code. Checked Nov 1, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/clinical-trials-v2
What's inside
- Skill name
clinical-trials-v2- Description
- 通过 ClinicalTrials.gov API v2 实时检索官方临床试验注册数据。触发词包括 ClinicalTrials.gov、临床试验、NCT、试验注册、招募状态、phase 1/2/3、RCT lookup、interventional trial、observational study。专注实时单次查询(≤1000 条/请求),适合"某试验最新状态/招募信息/主次要终点"场景。批量历史分析请用 aact-bulk-trials,文献检索用 pubmed-search/europepmc。
- License
- MIT
- Instructions
- 277 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# ClinicalTrials.gov API v2 实时检索
封装 ClinicalTrials.gov 官方 API v2,为医学证据检索体系提供"实时官方源"原子能力。
## 1. 定位与边界
### 只做
- 通过 `https://clinicaltrials.gov/api/v2/studies` 实时检索单个/批量试验
- 单次请求 ≤ 1000 条记录
- 返回完整 protocol + results 模块结构化数据
### 不做
- **大批量历史分析**(>10k 试验 / 全量 NCT 镜像) → 用 `aact-bulk-trials` (本地 PostgreSQL)
- **文献检索** → 用 `pubmed-search` / `europepmc`
- **全文 XML 解析** → 用 `bioc-fulltext`
- **Meta 分析编排** → 用 `systematic-review`
### 与 aact-bulk-trials 关系
| 维度 | clinical-trials-v2 (本 skill) | aact-bulk-trials |
|---|---|---|
| 数据源 | 实时 API | 每日同步的 PostgreSQL 镜像 |
| 单次规模 | ≤1000 条 | 无限 |
| 延迟 | 实时 (T+0) | T-1 |
| 适用场景 | 用户问某试验最新状态 | 批量分析所有 NCT |
| 速率限制 | 建议 ≤5 RPS | 仅本地 IO |
## 2. 认证与速率
### 无需 API key
ClinicalTrials.gov API v2 是开放 API,无需注册或 API key。
### 建议 User-Agent
```python
HEADERS = {
"User-Agent": "ClinicalTrialsV2-Skill/1.0 (medical-evidence-retrieval; contact@example.com)",
"Accept": "application/json",
}
```
### 速率限制
- 官方未强制 RPS 限制,但建议自约束 ≤5 RPS
- 实现指数退避: 429/503 → 退避 2^n * 0.5s, 最多 5 次重试
## 3. 安装与依赖
```bash
pip install httpx tenacity pydantic
```
仅依赖标准 HTTP 客户端,无需特殊 SDK。
## 4. 核心 API 设计
### 统一返回 dataclass
```python
from dataclasses import dataclass, field
from typing import Optional
@dataclass
class TrialRecord:
nct_id: str
title: dict # {"brief": str, "official": str}
status: str # RECRUITING / ACTIVE_NOT_RECRUITING / COMPLETED / ...
phase: list[str] # ["PHASE2", "PHASE3"]
study_type: str # INTERVENTIONAL / OBSERVATIONAL / EXPANDED_ACCESS
condition: list[str]
intervention: list[dict] # [{"type": "DRUG", "name": "Pembrolizumab"}]
sponsor: dict # {"lead": str, "class": "INDUSTRY"|"NIH"|...}
enrollment: Optional[int]
enrollment_type: Optional[str] # ACTUAL / ESTIMATED
start_date: Optional[str]
completion_date: Optional[str]
primary_outcomes: list[dict] # [{"measure": str, "time_frame": str}]
locations: list[dict] # [{"facility": str, "city": str, "country": str, "status": str}]
has_results: bool
last_update_posted: Optional[str]
source_url: str = field(init=False)
def __post_init__(self):
self.source_url = f"https://clinicaltrials.gov/study/{self.nct_id}"
```
### 5 个核心检索函数
#### 4.1 `search_studies(query, filters)`
综合检索入口,支持自由文本 + 结构化过滤器组合。
```python
def search_studies(
query: str,
*,
recruitment_status: list[str] | None = None, # ["RECRUITING", "ACTIVE_NOT_RECRUITING"]
phase: list[str] | None = None, # ["PHASE2", "PHASE3"]
study_type: str | None = None, # "INTERVENTIONAL"
country: str | None = None,
sponsor: str | None = None,
date_from: str | None = None, # "2023-01-01"
date_to: str | None = None,
page_size: int = 100, # ≤1000
max_results: int = 500,
) -> list[TrialRecord]:
"""组合查询。query 走 query.term,过滤器映射到 filter.* 参数。"""
```
#### 4.2 `get_study_details(nct_id)`
按 NCT ID 获取完整 protocol + results。
```python
def get_study_details(nct_id: str) -> TrialRecord:
"""GET /api/v2/studies/{nct_id}?format=json"""
```
#### 4.3 `search_by_condition(condition_term, ...)`
疾病专项检索,内部映射到 `query.cond`。
```python
def search_by_condition(
condition_term: str, # "Multiple Myeloma" / "AML"From EthanYoQ/Skill-hub, MIT.
More from EthanYoQ/Skill-hub
- 0.597score
contract-elicitor
EthanYoQ
Use FIRST when user requests any disease market sizing report (e.g.
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
cite-bound-content-generator
EthanYoQ
Phase 4 Turn 1 of disease-market-sizing-orchestration.
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
aact-bulk-trials
EthanYoQ
使用 AACT (Aggregate Analysis of ClinicalTrials.gov) PostgreSQL 数据仓库进行批量、历史、聚合性临床试验数据挖掘。Use this skill when the user requests bulk SQL analysis over the full…
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
content-verification-layer
EthanYoQ
Phase 4 Turn 2 of disease-market-sizing-orchestration (A6' upgrade).
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
aliyun-swas-manage
EthanYoQ
Use when managing Alibaba Cloud Simple Application Server (SWAS OpenAPI 2020-06-01) resources end-to-end, including querying instances…
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
agent-reach
EthanYoQ
MUST USE when user wants to 调研/research/搜索/search/查/找/look up anything on the internet — e.g.
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
baoyu-image-gen
EthanYoQ
AI image generation with OpenAI GPT Image 2, Azure OpenAI, Google, OpenRouter, DashScope, Z.AI GLM-Image, MiniMax, Jimeng, Seedream, Replicate and Agnes APIs.
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
bioc-fulltext-fetch
EthanYoQ
给定 PMID/PMCID 取结构化全文(NLM BioC XML/JSON)。封装 BioC PubMed(标题+摘要)和 BioC PMC OA(开放获取全文)端点,输出按章节切分的段落、表格上下文、RAG 友好 chunk,适合大批量入向量库。Fetches structured fulltext from…
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
agent-reach
EthanYoQ
MUST USE when user wants to 调研/research/搜索/search/查/找/look up anything on the internet — e.g.
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
citation-anchor-resolver
EthanYoQ
Cite-or-Block 架构的基石原子 skill。把报告里的 citation 锚点 (例如 [guideline:CSCO-2024-NSCLC:§5.5.2] / [pmid:12345678:abstract]) 解析为源文件片段,并核对事实声明里的关键词是否在引用源原文里出现。 Foundation…
SkillBFreshness: B★ 11Claude Code +9 - 0.594score
drug-citation-verifier
EthanYoQ
Cite-or-Block 架构下的药名 cross-check 原子 skill。给定报告文本与 .cache/<slug>/sources/,扫描每个药品提及 → 找最近 citation 锚点 → 核对锚点指向的源里是否真的提到了此药(通用名 + 商品名)。无字典、无 fallback、源里没 =…
SkillBFreshness: B★ 11Claude Code +9 - 0.592score
adaptive-quality-gate
EthanYoQ
Use when work produces a deliverable, factual claim, dataset, code change, decision, publication, deployment, automation, or irreversible action whose failure…
SkillBFreshness: B★ 11Claude Code +9
Signals
- Stars
- 11
- Forks
- 4
- Open issues
- 0
- Last commit (this folder)
- Sep 19, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/EthanYoQ/Skill-hub
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from EthanYoQ
- 0.597score
baoyu-image-gen
EthanYoQ
AI image generation with OpenAI GPT Image 2, Azure OpenAI, Google, OpenRouter, DashScope, Z.AI GLM-Image, MiniMax, Jimeng, Seedream, Replicate and Agnes APIs.
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
bioc-fulltext-fetch
EthanYoQ
给定 PMID/PMCID 取结构化全文(NLM BioC XML/JSON)。封装 BioC PubMed(标题+摘要)和 BioC PMC OA(开放获取全文)端点,输出按章节切分的段落、表格上下文、RAG 友好 chunk,适合大批量入向量库。Fetches structured fulltext from…
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
aact-bulk-trials
EthanYoQ
使用 AACT (Aggregate Analysis of ClinicalTrials.gov) PostgreSQL 数据仓库进行批量、历史、聚合性临床试验数据挖掘。Use this skill when the user requests bulk SQL analysis over the full…
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
agent-reach
EthanYoQ
MUST USE when user wants to 调研/research/搜索/search/查/找/look up anything on the internet — e.g.
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
aliyun-swas-manage
EthanYoQ
Use when managing Alibaba Cloud Simple Application Server (SWAS OpenAPI 2020-06-01) resources end-to-end, including querying instances…
SkillBFreshness: B★ 11Claude Code +9 - 0.597score
citation-anchor-resolver
EthanYoQ
Cite-or-Block 架构的基石原子 skill。把报告里的 citation 锚点 (例如 [guideline:CSCO-2024-NSCLC:§5.5.2] / [pmid:12345678:abstract]) 解析为源文件片段,并核对事实声明里的关键词是否在引用源原文里出现。 Foundation…
SkillBFreshness: B★ 11Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get clinical-trials-v2 running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
clinical-trials-v2 skill. Agent Mart. https://agentmart.dev/skills/ethanyoq-clinical-trials-v2-33e72f (last updated 2026-10-24)