本文へ移動
cccskills
無料GitHub で公開

aact-bulk-trials

使用 AACT (Aggregate Analysis of ClinicalTrials.gov) PostgreSQL 数据仓库进行批量、历史、聚合性临床试验数据挖掘。

Use this skill when the user requests bulk SQL analysis over the full clinical trials data warehouse — historical trial trends, disease landscapes, similar-design matching, or multi-year aggregations across hundreds of thousands of NCT records. 触发场景包括:AACT 查询、临床试验批量分析、PostgreSQL 试验数据、全量 NCT 检索、试验数据挖掘、历史试验分析、clinical trials data warehouse、SQL trials、bulk trial analysis、disease landscape、试验设计相似性匹配、跨年度聚合、sponsor/phase/country 多维统计。

続きを読む(あと約 270 字)

**与 clinical-trials-v2 差异**:本 skill 走批量 SQL · 离线大数据(PostgreSQL);v2 走实时 API · 单查询。两者互补:单条 NCT 实时状态用 v2,百万级历史挖掘用本 skill。

支持云端公共 PostgreSQL(aact-db.ctti-clinicaltrials.org · 零部署)和每日 dump 本地还原(高性能 · 离线)两种连接方式,自动检测优先用本地。跨平台(macOS/Linux/Windows)参数化 SQL 防注入,read-only 强制保护。

インストール方法を見る

含まれるファイル(4)

  • SKILL.md8.1 KB
  • references/aact-schema.md4.8 KB
  • references/connection-setup.md3.2 KB
  • references/sql-templates.md5.6 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

AACT Bulk Trials · 批量临床试验数据仓库

1. 何时调用本 skill

调用本 skill 当用户请求:

  • 疾病领域全景分析("过去 10 年血液病所有 NCT 试验按 phase/sponsor 聚合")
  • 跨年度趋势聚合("AML 领域 III 期试验赞助商分布")
  • 设计相似试验匹配("找与 NCT12345678 设计相似的其他试验")
  • 整库扫描 / 百万级 JOIN(条件 + 干预 + 结果跨表)

不要调用本 skill(应转其他):

  • 单条 NCT 最新状态查询 → clinical-trials-v2(实时 API · 互补)
  • 文献检索 → pubmed-search / europepmc-search
  • 临床报告撰写 → clinical-reports

与 clinical-trials-v2 的差异:

维度clinical-trials-v2aact-bulk-trials(本 skill)
数据源ClinicalTrials.gov v2 REST APIAACT PostgreSQL 镜像(每日同步)
单次容量≤ 1000 条单 SQL 可处理百万级
网络强依赖本地模式离线可用
延迟低(实时)T+1(每日 dump)
适用场景单试验细节、最新状态批量聚合、历史趋势、跨表 JOIN

2. 上下游 skill 协作

clinical-trials-v2  ────┐
   (实时单查 · 互补)      │
                         ▼
   aact-bulk-trials  →  medical-evidence-grading  →  evidence-appendix-sync
   (本 skill · 批量SQL)    (上层 · 批量 grade)         (终下游 · 报告附录)
  • 上游:用户原始批量挖掘需求(市场调研、疾病全景、设计相似性)
  • 平级互补:clinical-trials-v2(单条实时) / pubmed-search(文献)
  • 下游:medical-evidence-grading(用本 skill 输出的 NCT 列表批量评级) → evidence-appendix-sync(终态报告附录 C)

3. 核心能力速查(5 个 SQL 模板)

所有签名见 references/sql-templates.md,参数化 SQL 防注入,默认 LIMIT 1000。

函数签名(参数)用途
query_trials_by_condition(condition_term, year_from, year_to, phase, limit)按适应症 + 年份 + phase 检索
query_trials_by_intervention(intervention_name, intervention_type, limit)按干预名 + 类型检索
query_trials_results_summary(nct_id_list)已上传 results 的试验统计摘要
bulk_disease_landscape(disease_term, year_from, year_to)疾病四维聚合(phase/status/sponsor/国家)
find_similar_design_trials(reference_nct_id, limit)设计相似试验匹配

完整 SQL 见 → references/sql-templates.md


4. 双连接快速决策

skill 启动时自动检测:本地 dump (B) → 云端 (A) → 报错指引。

模式何时用性能
本地 dump(B)批量挖掘 / 整库扫描 / 跨年度聚合典型 < 5s
云端公共(A)偶发查询 / 无本地 PostgreSQL200ms - 2s

部署细节、yaml 配置、密钥管理、read-only 强制 → references/connection-setup.md

Schema 关系图、关键表速查、字段陷阱、推荐 GIN 索引 → references/aact-schema.md


5. 工作流(Decision Tree)

用户请求
  │
  ├─ 单条 NCT 实时? → 转 clinical-trials-v2
  ├─ 文献需求? → 转 pubmed-search
  │
  └─ 批量 / 历史 / 聚合? → 本 skill
        │
        ├─ 1. 检测连接(local → cloud → 报错)
        ├─ 2. 解析意图,匹配 5 个 SQL 模板之一
        ├─ 3. 参数校验(phase 枚举 / 日期合法 / LIMIT 上限 / NCT 格式 ^NCT\d{8}$)
        ├─ 4. 大查询先 EXPLAIN (ANALYZE, BUFFERS) 评估
        ├─ 5. 执行 + 流式取数(>50K 行用 server-side cursor)
        ├─ 6. 后处理(去重、聚合、JSON 序列化)
        └─ 7. 返回结构化结果 + meta(耗时、命中行数、来源 mode、snapshot 日期)

6. 失败模式与处置

现象根因处置
云连接超时 / SSL 错误网络限制或 AACT 服务波动切换 mode: local;或加 sslmode=require 重试
psql: connection refused(本地)本地 PostgreSQL 未启动macOS: brew services start postgresql@16 / Linux: sudo systemctl start postgresql / Windows: Start-Service postgresql-x64-16
password authentication failed凭据错误或环境变量缺失检查 $AACT_* 环境变量;引导访问 https://aact.ctti-clinicaltrials.org/users/sign_up
relation "xxx" does not existAACT schema 年度变更(每年 1-2 次)对照 https://aact.ctti-clinicaltrials.org/release_notes 校准列名
查询无返回但 ClinicalTrials.gov 有T+1 数据延迟(当日新建试验未入 dump)转 clinical-trials-v2 实时 API
OOM / 客户端被 kill一次性拉百万行到内存改用 server-side cursor cursor(name='aact_stream') 或加 LIMIT 分页
statement timeout(120s)查询无索引或选择性差检查 EXPLAIN;建 GIN trigram 索引;或临时 SET LOCAL statement_timeout = 0
cannot execute DROP/DELETE in read-only transaction用户/prompt 注入了破坏性 SQL正确行为:read-only 模式拦截了误操作;不要绕过,检查输入来源

7. 输出契约

{
  "meta": {
    "mode": "local",
    "query_template": "bulk_disease_landscape",
    "elapsed_ms": 1842,
    "row_count": 273,
    "limit_applied": 1000,
    "aact_snapshot_date": "2026-04-24",
    "warnings": []
  },
  "data": [ /* 结构因模板而异 */ ]
}

8. 安全与合规

  • AACT 数据为公开数据集,不含 PHI也不可重识别患者;勿与内部患者数据 JOIN
  • 云端凭据通过环境变量 + ~/.config/aact.local.yaml(.gitignore),永不入 git
  • 所有 SQL 模板参数化查询(:param),禁止字符串拼接
  • 会话级 SET default_transaction_read_only = ON 强制只读,防 DROP/DELETE 误操作
  • 引用 AACT 数据时附署:Data source: AACT (Clinical Trials Transformation Initiative), snapshot {date}

9. References(按需深读)

文件内容
references/connection-setup.md云端 vs 本地 dump 部署、yaml 完整模板、跨平台服务管理、密钥铁律
references/aact-schema.mdSchema 关系图、关键表速查、JOIN 路径、字段陷阱、推荐 GIN 索引
references/sql-templates.md5 个 SQL 模板完整版、参数说明、性能优化、测试清单

10. 参考资料


版本:v2.0 · 2026-04-25 · 适配 AACT schema 2026-Q1

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

使用 AACT (Aggregate Analysis of ClinicalTrials.gov) PostgreSQL 数据库进行大批量临床试验历史分析与数据挖掘。触发场景包括:AACT 查询、临床试验批量分析、PostgreSQL 试验数据、全量 NCT 检索、试验数据挖掘、clinical trials data warehouse、疾病领域全景分析、设计相似试验匹配、跨年度试验趋势聚合。本 skill 通过 SQL 接口处理百万级试验记录,支持云端公共 PostgreSQL 服务(aact-db.ctti-clinicaltrials.org)和每日 dump 本地还原两种连接方式,自动检测并优先使用本地高性能模式。

日本語の概要は準備中です。原文の説明を表示しています。

EthanYoQ/Skill-hub112026年10月5日 更新

Use when work produces a deliverable, factual claim, dataset, code change, decision, publication, deployment, automation, or irreversible action whose failure would matter; when the user asks for a quality gate, acceptance criteria, QA, completeness, validation, audit, evidence, preflight, release readiness, or a definition of done; or before claiming completion on medium- or high-risk work. Automatically decide whether a formal gate is warranted, derive task-specific pass/fail criteria, gather evidence, and block unsupported completion. Make sure to use this skill even when the user does not say "quality gate" if consequential work needs acceptance criteria or completion evidence. Skip formal gating for trivial, reversible, low-impact requests.

日本語の概要は準備中です。原文の説明を表示しています。

EthanYoQ/Skill-hub112026年10月5日 更新

Create a changeset file in .changeset/ that describes a user-facing change for the release notes

日本語の概要は準備中です。原文の説明を表示しています。

EthanYoQ/Skill-hub112026年10月5日 更新

Add a new competitor to the AI Visibility Tool Directory — researches the tool, generates data, takes a screenshot, and inserts into the codebase

日本語の概要は準備中です。原文の説明を表示しています。

EthanYoQ/Skill-hub112026年10月5日 更新

add-lang

無料

Add tree-sitter language support to codegraph end-to-end — wire the grammar + extractor, write tests, then benchmark extraction quality and retrieval value on 3 popular real-world repos. Use when the user runs /add-lang <language> or asks to add/support a new language (e.g. Lua, Elixir, Zig, OCaml) in codegraph.

日本語の概要は準備中です。原文の説明を表示しています。

EthanYoQ/Skill-hub112026年10月5日 更新

aesthetic

無料

Create aesthetically beautiful interfaces following proven design principles. Use when building UI/UX, analyzing designs from inspiration sites, generating design images with ai-multimodal, implementing visual hierarchy and color theory, adding micro-interactions, or creating design documentation. Includes workflows for capturing and analyzing inspiration screenshots with chrome-devtools and ai-multimodal, iterative design image generation until aesthetic standards are met, and comprehensive design system guidance covering BEAUTIFUL (aesthetic principles), RIGHT (functionality/accessibility), SATISFYING (micro-interactions), and PEAK (storytelling) stages. Integrates with chrome-devtools, ai-multimodal, media-processing, ui-styling, and web-frameworks skills.

日本語の概要は準備中です。原文の説明を表示しています。

EthanYoQ/Skill-hub112026年10月5日 更新

EthanYoQ のスキルをすべて見る

このスキルの問題を報告する