Token导航 LogoToken导航

Agent Skill · 研究检索

tooluniverse-clinical-trial-matching(tooluniverse 临床试验匹配)

tooluniverse-clinical-trial-matching 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

tooluniverse-clinical-trial-matching 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 63,093。

总安装 321周安装 13GitHub Stars 971下载 101核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/wu-yc/labclaw --skill tooluniverse-clinical-trial-matching

这个 Skill 是做什么的

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

tooluniverse-clinical-trial-matching 用于查找、检索和筛选相关信息。适用于患者入组标准匹配或试验招募优化的医疗场景。通过 npx skills add 命令从指定 GitHub 仓库安装并使用。安装前需确认权限范围、维护状态及是否触发联网或文件读写操作。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/tooluniverse-clinical-trial-matching

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

tooluniverse-clinical-trial-matching 怎么安装?

在终端执行 npx skills add https://github.com/wu-yc/labclaw --skill tooluniverse-clinical-trial-matchi…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

tooluniverse-clinical-trial-matching 支持哪些 AI 工具?

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

tooluniverse-clinical-trial-matching 需要什么权限?

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

tooluniverse-clinical-trial-matching 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

tooluniverse-clinical-trial-matching 用的人多吗?

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

tooluniverse-clinical-trial-matching 安全吗?

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

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 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调用外部服务未明确有提醒
tooluniverse-clinical-trial-matching

tooluniverse 临床试验匹配 · 本页

321971需要联网未明确有提醒

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

SKILL.md 原文

Clinical Trial Matching for Precision Medicine

Transform patient molecular profiles and clinical characteristics into prioritized clinical trial recommendations. Searches ClinicalTrials.gov and cross-references with molecular databases (CIViC, OpenTargets, ChEMBL, FDA) to produce evidence-graded, scored trial matches.

KEY PRINCIPLES:

  1. Report-first approach - Create report file FIRST, then populate progressively
  2. Patient-centric - Every recommendation considers the individual patient's profile
  3. Molecular-first matching - Prioritize trials targeting patient's specific biomarkers
  4. Evidence-graded - Every recommendation has an evidence tier (T1-T4)
  5. Quantitative scoring - Trial Match Score (0-100) for every trial
  6. Eligibility-aware - Parse and evaluate inclusion/exclusion criteria
  7. Actionable output - Clear next steps, contact info, enrollment status
  8. Source-referenced - Every statement cites the tool/database source
  9. Completeness checklist - Mandatory section showing analysis coverage
  10. English-first queries - Always use English terms in tool calls. Respond in user's language

When to Use

Apply when user asks:

  • "What clinical trials are available for my NSCLC with EGFR L858R?"
  • "Patient has BRAF V600E melanoma, failed ipilimumab - what trials?"
  • "Find basket trials for NTRK fusion"
  • "Breast cancer with HER2 amplification, post-CDK4/6 inhibitor trials"
  • "KRAS G12C colorectal cancer clinical trials"
  • "Immunotherapy trials for TMB-high solid tumors"
  • "Clinical trials near Boston for lung cancer"
  • "What are my options after failing osimertinib for EGFR+ NSCLC?"

NOT for (use other skills instead):

  • Single variant interpretation without trial focus -> Use tooluniverse-cancer-variant-interpretation
  • Drug safety profiling -> Use tooluniverse-adverse-event-detection
  • Target validation -> Use tooluniverse-drug-target-validation
  • General disease research -> Use tooluniverse-disease-research

Input Parsing

Required Input

  • Disease/cancer type: Free-text disease name (e.g., "non-small cell lung cancer", "melanoma")

Strongly Recommended

  • Molecular alterations: One or more biomarkers (e.g., "EGFR L858R", "KRAS G12C", "PD-L1 50%", "TMB-high")
  • Stage/grade: Disease stage (e.g., "Stage IV", "metastatic", "locally advanced")
  • Prior treatments: Previous therapies and outcomes (e.g., "failed platinum chemotherapy", "progressed on osimertinib")

Optional

  • Performance status: ECOG or Karnofsky score (e.g., "ECOG 0-1")
  • Geographic location: City/state for proximity filtering (e.g., "Boston, MA")
  • Trial phase preference: I, II, III, IV, or "any"
  • Intervention type: drug, biological, device, etc.
  • Recruiting status preference: recruiting, not yet recruiting, active

Biomarker Parsing Rules

Input FormatParsed AsExample
Gene + amino acid changeSpecific mutationEGFR L858R
Gene + exon notationExon-level alterationEGFR exon 19 deletion
Gene + fusion partnerFusionEML4-ALK fusion
Gene + amplificationCopy number gainHER2 amplification
Gene + expression levelExpression biomarkerPD-L1 50%
Gene + statusStatus biomarkerMSI-high, TMB-high
Gene + resistanceResistance mutationEGFR T790M

Gene Symbol Normalization

Common AliasOfficial SymbolNotes
HER2ERBB2Search both in trials
PD-L1CD274Often searched as "PD-L1" in trials
ALKALKEML4-ALK is a fusion
VEGFVEGFAOften searched as "VEGF"
PD-1PDCD1Search as "PD-1" in trials
BRCABRCA1/BRCA2Specify which BRCA gene

Phase 0: Tool Parameter Reference (CRITICAL)

BEFORE calling ANY tool, verify its parameters from this reference table.

Clinical Trial Tools

ToolParametersNotes
search_clinical_trialsquery_term (REQUIRED str), condition (str), intervention (str), pageSize (int, default 10), pageToken (str)Main search. Returns {studies: [{NCT ID, brief_title, brief_summary, overall_status, condition, phase}], nextPageToken, total_count}
clinical_trials_searchaction (REQUIRED, must be "search_studies"), condition (str), intervention (str), limit (int)Alternative search. Returns {total_count, studies: [{nctId, title, status, conditions}]}
clinical_trials_get_detailsaction (REQUIRED, must be "get_study_details"), nct_id (REQUIRED str)Full trial details. Returns {nctId, title, summary, eligibility: {eligibilityCriteria},...}
get_clinical_trial_eligibility_criterianct_ids (REQUIRED array), eligibility_criteria (REQUIRED str, use "all")Returns [{NCT ID, eligibility_criteria}]
get_clinical_trial_locationsnct_ids (REQUIRED array), location (REQUIRED str, use "all")Returns [{NCT ID, locations: [{facility, city, state, country}]}]
get_clinical_trial_descriptionsnct_ids (REQUIRED array), description_type (REQUIRED str: "brief" or "full")Returns [{NCT ID, brief_title, official_title, brief_summary, detailed_description}]
get_clinical_trial_status_and_datesnct_ids (REQUIRED array), status_and_date (REQUIRED str, use "all")Returns [{NCT ID, overall_status, start_date, primary_completion_date, completion_date}]
get_clinical_trial_conditions_and_interventionsnct_ids (REQUIRED array), condition_and_intervention (REQUIRED str, use "all")Returns [{NCT ID, condition, arm_groups, interventions}]
get_clinical_trial_outcome_measuresnct_ids (REQUIRED array), outcome_measures (str: "primary", "secondary", "all")Returns [{NCT ID, primary_outcomes, secondary_outcomes}]
extract_clinical_trial_outcomesnct_ids (REQUIRED array), outcome_measure (str)Returns trial outcome results
extract_clinical_trial_adverse_eventsnct_ids (REQUIRED array), adverse_event_type (str)Returns adverse event data

Molecular/Disease Tools

ToolParametersNotes
MyGene_query_genesquery (str), species (str)Returns {hits: [{symbol, entrezgene, ensembl: {gene}, name}]}
OpenTargets_get_target_id_description_by_nametargetName (str)Returns {data: {search: {hits: [{id, name, description}]}}}
OpenTargets_get_disease_id_description_by_namediseaseName (str)Returns {data: {search: {hits: [{id, name, description}]}}}
OpenTargets_get_associated_drugs_by_target_ensemblIDensemblId (str), size (int)Returns {data: {target: {knownDrugs: {count, rows: [{drug: {id, name, isApproved}, phase, mechanismOfAction, disease: {id, name}}]}}}}
OpenTargets_get_associated_drugs_by_disease_efoIdefoId (str), size (int)Returns {data: {disease: {knownDrugs: {count, rows: [...]}}}}
OpenTargets_get_drug_id_description_by_namedrugName (str)Returns {data: {search: {hits: [{id, name, description}]}}}
OpenTargets_get_drug_mechanisms_of_action_by_chemblIdchemblId (str)Returns {data: {drug: {mechanismsOfAction: {rows: [{mechanismOfAction, actionType, targetName, targets}]}}}}
OpenTargets_get_approved_indications_by_drug_chemblIdchemblId (str)Returns {data: {drug: {approvedIndications: [efoIds]}}}
OpenTargets_target_disease_evidenceensemblId (str), efoId (str), size (int)Returns target-disease evidence rows

CIViC Tools

ToolParametersNotes
civic_search_variantsquery (str), limit (int)Does NOT filter by query. Returns alphabetically sorted variants
civic_get_variants_by_genegene_id (int, CIViC gene ID), limit (int)Returns {data: {gene: {variants: {nodes: [{id, name}]}}}}. Max 100 per call
civic_search_evidence_itemsquery (str), limit (int)Does NOT filter by query. Returns evidence alphabetically
civic_get_variantvariant_id (int)Returns {data: {variant: {id, name}}}
civic_search_therapiesquery (str), limit (int)Search therapies
civic_search_diseasesquery (str), limit (int)Search diseases

Known CIViC Gene IDs: EGFR=19, BRAF=5, ALK=1, ABL1=4, KRAS=30, TP53=45, ERBB2=20, NTRK1=197, NTRK2=560, NTRK3=561, PIK3CA=37, MET=52, ROS1=118, RET=122, BRCA1=2370, BRCA2=2371

Drug Information Tools

ToolParametersNotes
drugbank_get_targets_by_drug_name_or_drugbank_idquery, case_sensitive, exact_match, limit (ALL REQUIRED)Returns {results: [{drug_name, drugbank_id, targets: [{name, organism, actions}]}]}
drugbank_get_indications_by_drug_name_or_drugbank_idquery, case_sensitive, exact_match, limit (ALL REQUIRED)Returns drug indications
ChEMBL_search_drugsquery (str), limit (int)Returns {status, data: {drugs: [...]}}
ChEMBL_get_drug_mechanismsdrug_chembl_id__exact (str)Returns drug mechanisms
fda_pharmacogenomic_biomarkersdrug_name (opt str), biomarker (opt str), limit (opt int, default 10)Returns {count, shown, results: [{Drug, TherapeuticArea, Biomarker, LabelingSection}]}. Use limit=1000 to get all.
FDA_get_indications_by_drug_namedrug_name (str), limit (int)Returns FDA indications text
FDA_get_mechanism_of_action_by_drug_namedrug_name (str), limit (int)Returns FDA MoA text
FDA_get_clinical_studies_info_by_drug_namedrug_name (str), limit (int)Returns FDA clinical study info
FDA_get_adverse_reactions_by_drug_namedrug_name (str), limit (int)Returns adverse reactions

Disease Ontology Tools

ToolParametersNotes
ols_search_efo_termsquery (str), limit (int)Returns {data: {terms: [{iri, obo_id, short_form, label, description}]}}
ols_get_efo_termterm_id (str)Get specific EFO term details
ols_get_efo_term_childrenterm_id (str)Get child terms

Literature Tools

ToolParametersNotes
PubMed_search_articlesquery (str), max_results (int)Returns list of {pmid, title, abstract, authors, journal, pub_date}
openalex_literature_searchquery (str), limit (int)Returns literature results

PharmGKB Tools

ToolParametersNotes
PharmGKB_search_genesquery (str)Returns gene pharmacogenomics data
PharmGKB_get_clinical_annotationsquery (str)Returns clinical annotations

Workflow Overview

Input: Patient profile (disease + biomarkers + stage + prior treatments)

Phase 1: Patient Profile Standardization
  - Resolve disease to EFO/ontology IDs
  - Parse molecular alterations to gene + variant
  - Resolve gene symbols to Ensembl/Entrez IDs
  - Classify biomarker actionability (FDA-approved vs investigational)

Phase 2: Broad Trial Discovery
  - Disease-based trial search (ClinicalTrials.gov)
  - Biomarker-specific trial search
  - Intervention-based search (for known drugs targeting patient's biomarkers)
  - Collect NCT IDs for detailed analysis

Phase 3: Trial Characterization
  - Get eligibility criteria for top candidate trials
  - Get conditions and interventions
  - Get locations and status
  - Get trial descriptions and phase information

Phase 4: Molecular Eligibility Matching
  - Parse eligibility criteria text for biomarker requirements
  - Match patient's molecular profile to trial requirements
  - Score molecular eligibility

Phase 5: Drug-Biomarker Alignment
  - Identify trial intervention drugs
  - Check drug mechanisms against patient biomarkers (OpenTargets, ChEMBL)
  - FDA approval status for biomarker-drug combinations
  - Classify drugs (targeted therapy, immunotherapy, chemotherapy)

Phase 6: Evidence Assessment
  - FDA-approved biomarker-drug combinations
  - Clinical trial results for similar patients (PubMed)
  - CIViC clinical evidence
  - PharmGKB pharmacogenomics
  - Drug safety profiles

Phase 7: Geographic & Feasibility Analysis
  - Trial site locations
  - Enrollment status and dates
  - Distance from patient location (if provided)

Phase 8: Alternative Options
  - Basket trials (biomarker-driven, tumor-agnostic)
  - Expanded access and compassionate use
  - Related trials with different study designs

Phase 9: Scoring & Ranking
  - Calculate Trial Match Score (0-100) for each trial
  - Tier classification (Optimal/Good/Possible/Exploratory)
  - Rank by composite score
  - Generate recommendations

Phase 10: Report Synthesis
  - Executive summary (top 3 trials)
  - Patient profile summary
  - Ranked trial list with detailed analysis
  - Alternative options
  - Evidence grading
  - Completeness checklist

Phase 1: Patient Profile Standardization

Goal: Resolve all patient inputs to standardized identifiers for cross-database queries.

1.1 Disease Resolution

def resolve_disease(tu, disease_name):
    """Resolve disease name to EFO ID and standard terminology."""
    # OpenTargets disease search
    result = tu.tools.OpenTargets_get_disease_id_description_by_name(diseaseName=disease_name)
    hits = result.get('data', {}).get('search', {}).get('hits', [])

    if hits:
        disease_info = hits[0]
        return {
            'efo_id': disease_info.get('id'),
            'name': disease_info.get('name'),
            'description': disease_info.get('description'),
            'original_input': disease_name
        }

    # Fallback: OLS EFO search
    ols_result = tu.tools.ols_search_efo_terms(query=disease_name, limit=5)
    ols_terms = ols_result.get('data', {}).get('terms', [])
    if ols_terms:
        term = ols_terms[0]
        return {
            'efo_id': term.get('short_form'),
            'name': term.get('label'),
            'description': term.get('description', [''])[0] if term.get('description') else '',
            'original_input': disease_name
        }

    return {'efo_id': None, 'name': disease_name, 'description': '', 'original_input': disease_name}

Response: {efo_id: "EFO_0003060", name: "non-small cell lung carcinoma", description: "...", original_input: "..."}

1.2 Gene/Biomarker Resolution

def resolve_gene(tu, gene_symbol):
    """Resolve gene symbol to cross-database IDs."""
    # Normalize common aliases
    alias_map = {
        'HER2': 'ERBB2', 'HER-2': 'ERBB2',
        'PD-L1': 'CD274', 'PDL1': 'CD274',
        'PD-1': 'PDCD1', 'PD1': 'PDCD1',
        'VEGF': 'VEGFA',
    }
    normalized = alias_map.get(gene_symbol.upper(), gene_symbol)

    # MyGene resolution
    result = tu.tools.MyGene_query_genes(query=normalized, species='human')
    hits = result.get('hits', [])

    gene_hit = None
    for hit in hits:
        if hit.get('symbol', '').upper() == normalized.upper():
            gene_hit = hit
            break
    if not gene_hit and hits:
        gene_hit = hits[0]

    if gene_hit:
        ensembl = gene_hit.get('ensembl', {})
        ensembl_id = ensembl.get('gene') if isinstance(ensembl, dict) else (ensembl[0].get('gene') if isinstance(ensembl, list) and ensembl else None)
        return {
            'symbol': gene_hit.get('symbol'),
            'entrez_id': gene_hit.get('entrezgene'),
            'ensembl_id': ensembl_id,
            'name': gene_hit.get('name'),
            'original_input': gene_symbol
        }

    return {'symbol': gene_symbol, 'entrez_id': None, 'ensembl_id': None, 'name': None, 'original_input': gene_symbol}

1.3 Biomarker Actionability Classification

Classify each biomarker using FDA pharmacogenomic biomarkers list:

def classify_biomarker_actionability(tu, gene_symbol, alteration):
    """Classify biomarker as FDA-approved, guideline, or investigational."""
    # Check FDA pharmacogenomic biomarkers
    fda_result = tu.tools.fda_pharmacogenomic_biomarkers()
    fda_biomarkers = fda_result.get('results', [])

    fda_match = [b for b in fda_biomarkers if gene_symbol.upper() in str(b.get('Biomarker', '')).upper()]

    if fda_match:
        return {
            'level': 'FDA-approved',
            'drugs': [b.get('Drug') for b in fda_match],
            'labeling_sections': [b.get('LabelingSection') for b in fda_match]
        }

    # Check OpenTargets for drugs targeting this gene
    # (done in Phase 5)

    return {'level': 'investigational', 'drugs': [], 'labeling_sections': []}

1.4 Parse Molecular Alterations

def parse_biomarker(biomarker_text):
    """Parse free-text biomarker into structured components."""
    import re

    # Pattern: "GENE VARIANT" (e.g., "EGFR L858R")
    mutation_match = re.match(r'(\w+)\s+([A-Z]\d+[A-Z])', biomarker_text, re.IGNORECASE)
    if mutation_match:
        return {'gene': mutation_match.group(1), 'alteration': mutation_match.group(2), 'type': 'mutation'}

    # Pattern: "GENE exon N deletion/insertion"
    exon_match = re.match(r'(\w+)\s+exon\s+(\d+)\s+(\w+)', biomarker_text, re.IGNORECASE)
    if exon_match:
        return {'gene': exon_match.group(1), 'alteration': f'exon {exon_match.group(2)} {exon_match.group(3)}', 'type': 'exon_alteration'}

    # Pattern: "GENE1-GENE2 fusion" or "GENE1/GENE2"
    fusion_match = re.match(r'(\w+)[-/](\w+)\s*(fusion)?', biomarker_text, re.IGNORECASE)
    if fusion_match:
        return {'gene': fusion_match.group(2), 'alteration': f'{fusion_match.group(1)}-{fusion_match.group(2)}', 'type': 'fusion', 'partner': fusion_match.group(1)}

    # Pattern: "GENE amplification"
    amp_match = re.match(r'(\w+)\s+amplification', biomarker_text, re.IGNORECASE)
    if amp_match:
        return {'gene': amp_match.group(1), 'alteration': 'amplification', 'type': 'amplification'}

    # Pattern: "PD-L1 XX%"
    expression_match = re.match(r'([\w-]+)\s+(\d+%|high|low|positive|negative)', biomarker_text, re.IGNORECASE)
    if expression_match:
        return {'gene': expression_match.group(1), 'alteration': expression_match.group(2), 'type': 'expression'}

    # Pattern: "MSI-high", "TMB-high"
    status_match = re.match(r'(MSI|TMB|dMMR|MMR)[-\s]*(high|low|stable|deficient|proficient)', biomarker_text, re.IGNORECASE)
    if status_match:
        return {'gene': status_match.group(1), 'alteration': status_match.group(2), 'type': 'status'}

    # Fallback: treat as gene name
    return {'gene': biomarker_text.split()[0], 'alteration': ' '.join(biomarker_text.split()[1:]), 'type': 'unknown'}

Phase 2: Broad Trial Discovery

Goal: Cast a wide net to find all potentially relevant clinical trials.

2.1 Disease-Based Trial Search

def search_trials_by_disease(tu, disease_name, status_filter=None, phase_filter=None, page_size=20):
    """Search ClinicalTrials.gov by disease/condition."""
    query_parts = []
    if status_filter:
        query_parts.append(f'AREA[OverallStatus]{status_filter}')
    if phase_filter:
        query_parts.append(phase_filter)

    query_term = ' AND '.join(query_parts) if query_parts else disease_name

    result = tu.tools.search_clinical_trials(
        condition=disease_name,
        query_term=query_term if query_parts else disease_name,
        pageSize=page_size
    )

    # Response: {studies: [{NCT ID, brief_title, brief_summary, overall_status, condition, phase}], nextPageToken, total_count}
    if isinstance(result, str):
        return []  # No studies found

    return result.get('studies', [])

2.2 Biomarker-Specific Trial Search

def search_trials_by_biomarker(tu, gene_symbol, alteration, disease_name=None, page_size=15):
    """Search trials mentioning specific biomarkers."""
    # Search 1: Gene + alteration
    biomarker_query = f'{gene_symbol} {alteration}' if alteration else gene_symbol

    result = tu.tools.search_clinical_trials(
        condition=disease_name if disease_name else '',
        query_term=biomarker_query,
        pageSize=page_size
    )

    if isinstance(result, str):
        return []

    return result.get('studies', [])

2.3 Intervention-Based Trial Search

def search_trials_by_intervention(tu, drug_name, disease_name=None, page_size=10):
    """Search trials by intervention/drug name."""
    result = tu.tools.search_clinical_trials(
        condition=disease_name if disease_name else '',
        intervention=drug_name,
        query_term=drug_name,
        pageSize=page_size
    )

    if isinstance(result, str):
        return []

    return result.get('studies', [])

2.4 Alternative Search (clinical_trials_search)

Use as a complement to the main search:

def search_trials_alternative(tu, condition, intervention=None, limit=10):
    """Alternative trial search with different API endpoint."""
    params = {
        'action': 'search_studies',
        'condition': condition,
        'limit': limit
    }
    if intervention:
        params['intervention'] = intervention

    result = tu.tools.clinical_trials_search(**params)

    return result.get('studies', [])

2.5 Deduplication

def deduplicate_trials(trial_lists):
    """Merge and deduplicate trials from multiple searches."""
    seen_ncts = set()
    unique_trials = []

    for trials in trial_lists:
        for trial in trials:
            nct = trial.get('NCT ID') or trial.get('nctId', '')
            if nct and nct not in seen_ncts:
                seen_ncts.add(nct)
                unique_trials.append(trial)

    return unique_trials

Phase 3: Trial Characterization

Goal: Get detailed information for the top candidate trials.

3.1 Get Eligibility Criteria (Batch)

def get_trial_eligibility(tu, nct_ids):
    """Get eligibility criteria for multiple trials."""
    # Process in batches of 10
    all_criteria = []
    for i in range(0, len(nct_ids), 10):
        batch = nct_ids[i:i+10]
        result = tu.tools.get_clinical_trial_eligibility_criteria(
            nct_ids=batch,
            eligibility_criteria='all'
        )
        if isinstance(result, list):
            all_criteria.extend(result)

    return all_criteria
    # Returns: [{NCT ID, eligibility_criteria: "Inclusion Criteria:\n...\nExclusion Criteria:\n..."}]

3.2 Get Conditions and Interventions (Batch)

def get_trial_interventions(tu, nct_ids):
    """Get conditions, arm groups, and interventions for multiple trials."""
    all_interventions = []
    for i in range(0, len(nct_ids), 10):
        batch = nct_ids[i:i+10]
        result = tu.tools.get_clinical_trial_conditions_and_interventions(
            nct_ids=batch,
            condition_and_intervention='all'
        )
        if isinstance(result, list):
            all_interventions.extend(result)

    return all_interventions
    # Returns: [{NCT ID, condition, arm_groups: [{label, type, description, interventionNames}], interventions: [{type, name, description}]}]

3.3 Get Locations (Batch)

def get_trial_locations(tu, nct_ids):
    """Get trial site locations."""
    all_locations = []
    for i in range(0, len(nct_ids), 10):
        batch = nct_ids[i:i+10]
        result = tu.tools.get_clinical_trial_locations(
            nct_ids=batch,
            location='all'
        )
        if isinstance(result, list):
            all_locations.extend(result)

    return all_locations
    # Returns: [{NCT ID, locations: [{facility, city, state, country}]}]

3.4 Get Status and Dates (Batch)

def get_trial_status(tu, nct_ids):
    """Get enrollment status and key dates."""
    all_status = []
    for i in range(0, len(nct_ids), 10):
        batch = nct_ids[i:i+10]
        result = tu.tools.get_clinical_trial_status_and_dates(
            nct_ids=batch,
            status_and_date='all'
        )
        if isinstance(result, list):
            all_status.extend(result)

    return all_status
    # Returns: [{NCT ID, overall_status, start_date, primary_completion_date, completion_date}]

3.5 Get Full Descriptions (Batch)

def get_trial_descriptions(tu, nct_ids):
    """Get detailed trial descriptions."""
    all_descriptions = []
    for i in range(0, len(nct_ids), 10):
        batch = nct_ids[i:i+10]
        result = tu.tools.get_clinical_trial_descriptions(
            nct_ids=batch,
            description_type='full'
        )
        if isinstance(result, list):
            all_descriptions.extend(result)

    return all_descriptions
    # Returns: [{NCT ID, brief_title, official_title, brief_summary, detailed_description}]

Phase 4: Molecular Eligibility Matching

Goal: Determine how well the patient's molecular profile matches each trial's requirements.

4.1 Parse Eligibility Text for Biomarker Requirements

def extract_biomarker_requirements(eligibility_text):
    """Extract biomarker requirements from eligibility criteria text."""
    import re

    requirements = {
        'required_biomarkers': [],
        'excluded_biomarkers': [],
        'biomarker_agnostic': False
    }

    if not eligibility_text:
        return requirements

    text_upper = eligibility_text.upper()

    # Common biomarker patterns in eligibility text
    # Required biomarkers (in inclusion criteria)
    inclusion_section = eligibility_text.split('Exclusion Criteria')[0] if 'Exclusion Criteria' in eligibility_text else eligibility_text
    exclusion_section = eligibility_text.split('Exclusion Criteria')[1] if 'Exclusion Criteria' in eligibility_text else ''

    # Look for gene mutation requirements
    gene_patterns = [
        r'(?:EGFR|KRAS|BRAF|ALK|ROS1|RET|MET|NTRK|HER2|ERBB2|PIK3CA|BRCA|PD-?L1|MSI|TMB|dMMR)',
    ]

    for pattern in gene_patterns:
        # In inclusion section
        for match in re.finditer(pattern, inclusion_section, re.IGNORECASE):
            gene = match.group(0).upper()
            context = inclusion_section[max(0, match.start()-100):match.end()+100]
            requirements['required_biomarkers'].append({
                'gene': gene,
                'context': context.strip()
            })

        # In exclusion section
        for match in re.finditer(pattern, exclusion_section, re.IGNORECASE):
            gene = match.group(0).upper()
            context = exclusion_section[max(0, match.start()-100):match.end()+100]
            requirements['excluded_biomarkers'].append({
                'gene': gene,
                'context': context.strip()
            })

    # Check for biomarker-agnostic / basket trial language
    basket_terms = ['tumor-agnostic', 'histology-independent', 'basket', 'any solid tumor', 'all comers', 'biomarker-selected']
    if any(term in text_upper.lower() for term in basket_terms):
        requirements['biomarker_agnostic'] = True

    return requirements

4.2 Score Molecular Match

def score_molecular_match(patient_biomarkers, trial_requirements):
    """Score molecular match between patient and trial (0-40 points)."""
    if not trial_requirements['required_biomarkers'] and not trial_requirements['excluded_biomarkers']:
        # No molecular criteria - could be open to any
        return 10, 'No specific molecular criteria (general trial)'

    patient_genes = {b['gene'].upper() for b in patient_biomarkers}
    required_genes = {b['gene'].upper() for b in trial_requirements['required_biomarkers']}
    excluded_genes = {b['gene'].upper() for b in trial_requirements['excluded_biomarkers']}

    # Check exclusions first
    excluded_match = patient_genes & excluded_genes
    if excluded_match:
        return 0, f'Patient biomarker(s) {excluded_match} are in exclusion criteria'

    if not required_genes:
        return 10, 'No specific biomarker requirements found'

    # Check for exact gene match
    matched_genes = patient_genes & required_genes
    if matched_genes:
        # Check for specific variant match
        # Look for specific mutation mentions in context
        exact_variant_match = False
        for req in trial_requirements['required_biomarkers']:
            for pb in patient_biomarkers:
                if pb['gene'].upper() == req['gene'].upper():
                    alt = pb.get('alteration', '').upper()
                    if alt and alt in req.get('context', '').upper():
                        exact_variant_match = True
                        break

        if exact_variant_match:
            return 40, f'Exact biomarker match: {matched_genes} with specific variant'
        else:
            return 30, f'Gene-level match: {matched_genes} (specific variant match unclear)'

    # Check for pathway-level match (e.g., trial targets EGFR pathway, patient has EGFR mutation)
    # This requires domain knowledge mapping
    return 5, 'No direct biomarker match found'

Phase 5: Drug-Biomarker Alignment

Goal: Verify that trial drugs actually target the patient's biomarkers.

5.1 Identify Trial Drugs and Mechanisms

def get_drug_mechanism_info(tu, drug_name):
    """Get drug mechanism, targets, and approval status."""
    # Step 1: Resolve drug in OpenTargets
    result = tu.tools.OpenTargets_get_drug_id_description_by_name(drugName=drug_name)
    hits = result.get('data', {}).get('search', {}).get('hits', [])

    if not hits:
        return {'drug_name': drug_name, 'chembl_id': None, 'mechanisms': [], 'is_approved': False}

    drug_info = hits[0]
    chembl_id = drug_info.get('id')

    # Step 2: Get mechanisms of action
    moa_result = tu.tools.OpenTargets_get_drug_mechanisms_of_action_by_chemblId(chemblId=chembl_id)
    moa_rows = moa_result.get('data', {}).get('drug', {}).get('mechanismsOfAction', {}).get('rows', [])

    mechanisms = []
    for row in moa_rows:
        targets = row.get('targets', [])
        mechanisms.append({
            'mechanism': row.get('mechanismOfAction'),
            'action_type': row.get('actionType'),
            'target_name': row.get('targetName'),
            'target_genes': [t.get('approvedSymbol') for t in targets]
        })

    # Step 3: Check approval
    approval_result = tu.tools.OpenTargets_get_drug_approval_status_by_chemblId(chemblId=chembl_id)

    return {
        'drug_name': drug_name,
        'chembl_id': chembl_id,
        'description': drug_info.get('description'),
        'mechanisms': mechanisms,
        'is_approved': 'approved' in drug_info.get('description', '').lower()
    }

5.2 Score Drug-Biomarker Alignment

def score_drug_biomarker_alignment(patient_gene_symbols, drug_mechanisms):
    """Check if trial drug targets patient's biomarkers."""
    patient_genes_upper = {g.upper() for g in patient_gene_symbols}

    for mech in drug_mechanisms:
        target_genes = {g.upper() for g in mech.get('target_genes', [])}
        if patient_genes_upper & target_genes:
            return True, f"Drug targets {patient_genes_upper & target_genes} via {mech.get('mechanism')}"

    return False, "No direct target overlap with patient biomarkers"

Phase 6: Evidence Assessment

Goal: Assess evidence strength for drug efficacy in similar patient populations.

6.1 FDA Approval Evidence

def check_fda_approval(tu, drug_name, disease_name):
    """Check FDA approval status and labeled indications."""
    result = tu.tools.FDA_get_indications_by_drug_name(drug_name=drug_name, limit=3)

    indications = result.get('results', [])
    for ind in indications:
        ind_text = str(ind.get('indications_and_usage', ''))
        # Check if disease is mentioned in indications
        if any(term.lower() in ind_text.lower() for term in disease_name.split()):
            return {
                'approved': True,
                'indication_text': ind_text[:500],
                'brand_name': ind.get('openfda.brand_name', []),
                'evidence_tier': 'T1'
            }

    return {'approved': False, 'indication_text': '', 'brand_name': [], 'evidence_tier': 'T3'}

6.2 Literature Evidence

def get_literature_evidence(tu, gene, alteration, drug_name, disease_name):
    """Search PubMed for evidence of drug efficacy for this biomarker."""
    query = f'{gene} {alteration} {drug_name} {disease_name} clinical trial'
    result = tu.tools.PubMed_search_articles(query=query, max_results=5)

    articles = result if isinstance(result, list) else result.get('articles', [])
    return articles

6.3 CIViC Evidence (if available)

def get_civic_evidence(tu, gene_symbol, civic_gene_id):
    """Get CIViC clinical evidence for gene variants."""
    if not civic_gene_id:
        return []

    result = tu.tools.civic_get_variants_by_gene(gene_id=civic_gene_id, limit=100)
    variants = result.get('data', {}).get('gene', {}).get('variants', {}).get('nodes', [])
    return variants

6.4 Evidence Tier Classification

TierSymbolCriteriaScore Impact
T1[T1]FDA-approved biomarker-drug, NCCN guideline20 points
T2[T2]Phase III positive, clinical evidence15 points
T3[T3]Phase I/II results, preclinical10 points
T4[T4]Computational, mechanism inference5 points

Phase 7: Geographic & Feasibility Analysis

Goal: Assess practical feasibility of trial enrollment.

7.1 Location Analysis

def analyze_trial_locations(locations_data, patient_location=None):
    """Analyze trial site locations and proximity."""
    if not locations_data:
        return {'total_sites': 0, 'countries': [], 'us_states': [], 'nearest': None}

    locations = locations_data.get('locations', [])
    countries = list(set(loc.get('country', '') for loc in locations if loc.get('country')))
    us_states = list(set(loc.get('state', '') for loc in locations if loc.get('country') == 'United States' and loc.get('state')))

    return {
        'total_sites': len(locations),
        'countries': countries,
        'us_states': us_states,
        'has_us_sites': 'United States' in countries,
        'locations': locations[:10]  # First 10 for display
    }

7.2 Geographic Scoring

CriterionPoints
Trial sites in patient's state/city5
Trial sites within 100 miles3
Trial sites in same country1
No location info or far away0

Phase 8: Alternative Options

Goal: Identify basket trials, expanded access, and related studies.

8.1 Basket Trial Search

IMPORTANT: ClinicalTrials.gov search is sensitive to query complexity. Overly specific queries like "NTRK fusion tumor agnostic" may return zero results. Use simpler queries and combine results.

def search_basket_trials(tu, biomarker, page_size=10):
    """Search for basket/biomarker-driven trials.

    NOTE: Use simpler queries first (e.g., 'NTRK solid tumor'),
    then more specific ones. Complex multi-word queries often fail.
    """
    # Start with simpler queries (more likely to return results)
    query_terms = [
        f'{biomarker} solid tumor',
        f'{biomarker}',
        f'{biomarker} basket',
    ]

    all_trials = []
    for query in query_terms:
        result = tu.tools.search_clinical_trials(
            query_term=query,
            pageSize=page_size
        )
        if not isinstance(result, str):
            all_trials.extend(result.get('studies', []))

    return deduplicate_trials([all_trials])

8.2 Expanded Access Search

def search_expanded_access(tu, drug_name):
    """Search for expanded access / compassionate use programs."""
    result = tu.tools.search_clinical_trials(
        query_term=f'{drug_name} expanded access',
        pageSize=5
    )

    if isinstance(result, str):
        return []

    return result.get('studies', [])

Phase 9: Trial Match Scoring System

Score Components (Total: 0-100)

Molecular Match (0-40 points):

CriterionPointsDescription
Exact biomarker match40Trial requires patient's specific variant
Gene-level match30Trial requires gene mutation, patient has specific variant
Pathway match20Trial targets same pathway as patient's biomarker
No molecular criteria10General disease trial
Excluded biomarker0Patient's biomarker is in exclusion criteria

Clinical Eligibility (0-25 points):

CriterionPointsDescription
All criteria met25Disease, stage, prior treatment all match
Most criteria met181-2 criteria unclear
Some criteria met10Several criteria unclear
Clearly ineligible0Fails major criterion

Evidence Strength (0-20 points):

CriterionPointsDescription
FDA-approved combination20T1 evidence
Phase III positive15T2 evidence
Phase II promising10T3 evidence
Phase I or no results5T4 evidence

Trial Phase (0-10 points):

PhasePoints
Phase III10
Phase II8
Phase I/II6
Phase I4

Geographic Feasibility (0-5 points):

CriterionPoints
Patient's city/state5
Same country3
International only1
Unknown0

Recommendation Tiers

ScoreTierLabelAction
80-100Tier 1Optimal MatchStrongly recommend - contact site immediately
60-79Tier 2Good MatchRecommend - discuss with care team
40-59Tier 3Possible MatchConsider - needs further eligibility review
0-39Tier 4ExploratoryBackup option - consider if Tier 1-3 unavailable

Phase 10: Report Synthesis

Report Template

The final report should follow this structure:

# Clinical Trial Matching Report

**Patient**: [Disease type] with [biomarker(s)]
**Date**: [Current date]
**Trials Analyzed**: [N total] | **Top Matches**: [N with score >= 60]

---

## Executive Summary

**Top 3 Trial Recommendations**:

1. **[NCT ID]** - [Brief title] (Score: XX/100, Tier N)
   - Phase: [Phase], Status: [Status]
   - Why: [Key reason for match]

2. **[NCT ID]** - [Brief title] (Score: XX/100, Tier N)
   ...

3. **[NCT ID]** - [Brief title] (Score: XX/100, Tier N)
   ...

---

## Patient Profile Summary

| Parameter | Value | Standardized |
|-----------|-------|-------------|
| Disease | [input] | [EFO name] (EFO_XXXX) |
| Biomarker(s) | [input] | [gene: variant, type] |
| Stage | [input] | [standardized] |
| Prior Treatment | [input] | [standardized] |
| Performance Status | [input] | [ECOG score] |
| Location | [input] | [city, state] |

### Biomarker Actionability
| Biomarker | Actionability Level | FDA-Approved Drugs | Evidence |
|-----------|--------------------|--------------------|----------|
| [gene variant] | [FDA-approved/investigational] | [drugs] | [T1/T2/T3/T4] |

---

## Ranked Trial Matches

### Trial 1: [NCT ID] - [Title]

**Trial Match Score: XX/100** (Tier N: [Label])

| Component | Score | Details |
|-----------|-------|---------|
| Molecular Match | XX/40 | [explanation] |
| Clinical Eligibility | XX/25 | [explanation] |
| Evidence Strength | XX/20 | [explanation] |
| Trial Phase | XX/10 | [phase] |
| Geographic | XX/5 | [location info] |

**Trial Details**:
- **Phase**: [Phase]
- **Status**: [Recruiting/Active/etc.]
- **Sponsor**: [Sponsor]
- **Start Date**: [Date]
- **Estimated Completion**: [Date]

**Interventions**:
- [Drug name]: [Mechanism] | [Dosing info if available]
- [Comparator]: [Description]

**Molecular Eligibility Match**:
- Required biomarkers: [list]
- Patient match: [Exact/Gene-level/Pathway/None]
- Notes: [details]

**Clinical Eligibility Assessment**:
- Disease type: [Match/Mismatch]
- Stage: [Match/Mismatch/Unclear]
- Prior treatment: [Match/Mismatch/Unclear]
- Performance status: [Match/Mismatch/Unclear]

**Evidence for Efficacy**:
- FDA approval: [Yes/No for this indication]
- Clinical results: [Phase III/II/I data if available]
- Mechanism alignment: [Drug targets patient's biomarker: Yes/No]
- Literature: [Key references]

**Trial Sites** (first 5):
- [City, State, Country]
- ...

**Next Steps**: [Contact info, enrollment instructions]

[Repeat for each matched trial]

---

## Trials by Category

### Targeted Therapy Trials
[List trials with targeted agents matching patient's biomarkers]

### Immunotherapy Trials
[List immunotherapy trials, noting PD-L1/TMB/MSI requirements]

### Combination Therapy Trials
[List trials with drug combinations]

### Basket/Platform Trials
[List biomarker-agnostic or multi-arm trials]

---

## Additional Testing Recommendations

If the patient has not been tested for certain biomarkers, these trials would become relevant:

| Biomarker | Test Needed | Trials Unlocked | Priority |
|-----------|-------------|----------------|----------|
| [e.g., TMB] | [NGS panel] | [NCT IDs] | [High/Medium/Low] |

---

## Alternative Options

### Expanded Access Programs
[List any expanded access or compassionate use programs]

### Off-Label Options
[FDA-approved drugs for other indications with same biomarker]

---

## Evidence Grading Summary

| Evidence Tier | Count | Description |
|--------------|-------|-------------|
| T1 (FDA/Guideline) | N | FDA-approved biomarker-drug, clinical guideline |
| T2 (Clinical) | N | Phase III data, robust clinical evidence |
| T3 (Emerging) | N | Phase I/II, preclinical evidence |
| T4 (Exploratory) | N | Computational, mechanism inference |

---

## Completeness Checklist

| Analysis Step | Status | Source |
|--------------|--------|--------|
| Disease standardization | [Done/Partial/Failed] | [OpenTargets/OLS] |
| Gene resolution | [Done/Partial/Failed] | [MyGene] |
| Biomarker actionability | [Done/Partial/Failed] | [FDA biomarkers] |
| Disease trial search | [Done/Partial/Failed] | [ClinicalTrials.gov] |
| Biomarker trial search | [Done/Partial/Failed] | [ClinicalTrials.gov] |
| Intervention trial search | [Done/Partial/Failed] | [ClinicalTrials.gov] |
| Eligibility parsing | [Done/Partial/Failed] | [ClinicalTrials.gov] |
| Drug mechanism analysis | [Done/Partial/Failed] | [OpenTargets/ChEMBL] |
| Evidence assessment | [Done/Partial/Failed] | [FDA/PubMed/CIViC] |
| Location analysis | [Done/Partial/Failed] | [ClinicalTrials.gov] |
| Basket trial search | [Done/Partial/Failed] | [ClinicalTrials.gov] |
| Expanded access search | [Done/Partial/Failed] | [ClinicalTrials.gov] |
| Scoring & ranking | [Done/Partial/Failed] | [Composite] |

---

## Disclaimer

This report is for informational and research purposes only. Clinical trial eligibility is ultimately determined by the trial investigators based on complete medical records. Patients should discuss all options with their healthcare team. Trial availability and status may change; verify current status at [ClinicalTrials.gov](https://clinicaltrials.gov).

## Sources

All data sourced from:
- ClinicalTrials.gov (trial search, eligibility, locations, status)
- OpenTargets Platform (drug-target associations, disease ontology)
- CIViC (clinical variant interpretations)
- ChEMBL (drug mechanisms, targets)
- FDA (approved indications, pharmacogenomic biomarkers, drug labels)
- DrugBank (drug targets, indications)
- PharmGKB (pharmacogenomics)
- PubMed/NCBI (literature evidence)
- OLS/EFO (disease ontology)
- MyGene (gene identifier resolution)

Execution Strategy

Parallelization Opportunities

Many tool calls can be executed in parallel to speed up the workflow:

Parallel Group 1 (Phase 1 - can all run simultaneously):

  • MyGene_query_genes for each gene
  • OpenTargets_get_disease_id_description_by_name for disease
  • ols_search_efo_terms for disease
  • fda_pharmacogenomic_biomarkers (no params)

Parallel Group 2 (Phase 2 - can all run simultaneously):

  • search_clinical_trials with disease condition
  • search_clinical_trials with biomarker query
  • search_clinical_trials with intervention query
  • clinical_trials_search as alternative

Parallel Group 3 (Phase 3 - can all run simultaneously):

  • get_clinical_trial_eligibility_criteria for all NCT IDs
  • get_clinical_trial_conditions_and_interventions for all NCT IDs
  • get_clinical_trial_locations for all NCT IDs
  • get_clinical_trial_status_and_dates for all NCT IDs
  • get_clinical_trial_descriptions for all NCT IDs

Parallel Group 4 (Phases 5-6 - for each drug):

  • OpenTargets_get_drug_id_description_by_name for drug
  • OpenTargets_get_drug_mechanisms_of_action_by_chemblId for drug
  • FDA_get_indications_by_drug_name for drug
  • PubMed_search_articles for evidence

Error Handling

For each tool call:

  1. Wrap in try/except
  2. Check for empty results
  3. Use fallback tools when primary fails
  4. Document what failed in completeness checklist
  5. Never let one failure block the entire analysis

Performance Optimization

  • Batch NCT IDs in groups of 10 for detail tools
  • Limit initial search to 20-30 trials per search strategy
  • Focus detailed analysis on top 15-20 candidates after initial filtering
  • Cache gene/disease resolution results for reuse across phases

Common Use Patterns

Pattern 1: Targeted Therapy Matching (Most Common)

Input: "NSCLC patient with EGFR L858R, failed platinum chemotherapy"

  1. Resolve: NSCLC -> EFO_0003060, EGFR -> ENSG00000146648
  2. Search: "non-small cell lung cancer" + "EGFR mutation" + "EGFR L858R"
  3. Filter: Recruiting trials with EGFR molecular requirements
  4. Match: Score trials by EGFR L858R specificity
  5. Drugs: Identify TKIs (osimertinib, erlotinib, etc.) in trial arms
  6. Evidence: Check FDA approval of EGFR TKIs for NSCLC
  7. Report: Prioritize targeted therapy trials, include immunotherapy options

Pattern 2: Immunotherapy Selection

Input: "Melanoma, TMB-high, PD-L1 positive, failed ipilimumab"

  1. Resolve: Melanoma -> EFO_0000756
  2. Search: "melanoma" + "TMB" + "PD-L1" + "immunotherapy"
  3. Filter: Trials requiring PD-L1 or TMB testing
  4. Match: Score by TMB/PD-L1 requirements
  5. Drugs: Identify checkpoint inhibitors (pembrolizumab, nivolumab)
  6. Evidence: Check FDA approval for TMB-high indications
  7. Report: Focus on anti-PD-1/PD-L1 trials, combination immunotherapy

Pattern 3: Basket Trial Identification

Input: "Any solid tumor with NTRK fusion"

  1. Resolve: NTRK genes (NTRK1, NTRK2, NTRK3)
  2. Search: "NTRK fusion" + "tumor agnostic" + "basket"
  3. Filter: Biomarker-agnostic trials
  4. Match: Score by NTRK-specific inclusion criteria
  5. Drugs: Identify larotrectinib, entrectinib
  6. Evidence: FDA tissue-agnostic approval for larotrectinib
  7. Report: Highlight tumor-agnostic approval, broad eligibility

Pattern 4: Post-Progression Options

Input: "Breast cancer, failed CDK4/6 inhibitors, ESR1 mutation"

  1. Resolve: Breast cancer -> EFO_0000305, ESR1 -> ENSG00000091831
  2. Search: "breast cancer" + "ESR1" + "CDK4/6 resistance"
  3. Filter: Trials for post-CDK4/6 setting
  4. Match: Score by ESR1 mutation and prior treatment requirements
  5. Drugs: Identify novel endocrine agents, SERDs, ESR1-targeting drugs
  6. Evidence: Check clinical data for post-CDK4/6 options
  7. Report: Focus on resistance-overcoming strategies

Pattern 5: Geographic Search

Input: "Lung cancer trials within 100 miles of Boston"

  1. Search: "lung cancer" (broad)
  2. Get locations for all candidate trials
  3. Filter: Sites in Massachusetts and nearby states
  4. Score: High geographic feasibility for Boston-area sites
  5. Report: Prioritize by proximity, include contact info

Edge Case Handling

No Matching Trials Found

If no trials match the patient's biomarker:

  1. Broaden search to gene-level (remove specific variant)
  2. Search for pathway-level trials
  3. Search basket trials
  4. Suggest additional biomarker testing
  5. Report alternative options (off-label, compassionate use)

Rare Biomarkers

For uncommon mutations (e.g., unusual EGFR variants):

  1. Search gene-level trials (any EGFR mutation)
  2. Search mechanism-level trials (TKI trials)
  3. Check CIViC for any evidence on this specific variant
  4. Note variant rarity in report
  5. Suggest discussion with molecular tumor board

Multiple Biomarkers

For complex molecular profiles:

  1. Search for each biomarker independently
  2. Search for combination biomarker trials
  3. Identify trials that require multiple biomarkers
  4. Score based on most actionable biomarker
  5. Flag potential synergistic drug targets

Conflicting Eligibility

When patient meets some criteria but not others:

  1. Score partial match transparently
  2. Highlight which criteria are met/unmet
  3. Note if unmet criteria are waivable
  4. Suggest contacting PI for edge cases
  5. Provide alternative trials without conflicting criteria

Known CIViC Gene IDs

For direct CIViC lookups without search:

GeneCIViC IDGeneCIViC ID
ALK1MET52
ABL14PIK3CA37
BRAF5ROS1118
EGFR19RET122
ERBB220NTRK1197
KRAS30NTRK2560
TP5345NTRK3561

Report File Naming Convention

Save reports as:

clinical_trial_matching_[DISEASE]_[BIOMARKER]_[DATE].md

Example: clinical_trial_matching_NSCLC_EGFR_L858R_2026-02-15.md

平台分布

Codex

35.33%
按下载量换算36

Claude

29.74%
按下载量换算30

Cursor

22.06%
按下载量换算22

Gemini CLI

10.66%
按下载量换算11

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

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

安装前确认

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

继续浏览同类 Skills