← 返回 Skills 市场
bombert

NoahAI clinical-trial query

作者 yichen · GitHub ↗ · v1.0.8 · MIT-0
cross-platform ✓ 安全检测通过
293
总下载
1
收藏
1
当前安装
9
版本数
在 OpenClaw 中安装
/install clinical-trail
功能描述
Search clinical trial databases similar to ClinicalTrials.gov. Use this skill whenever the user asks about clinical trials, drug trials, indications, targets...
使用说明 (SKILL.md)

Clinical Trial Search Skill

This skill converts natural language questions into structured API queries against a clinical trial database, then presents the results in a readable format.

Workflow

  1. Parse user intent — Extract key entities from the user's question
  2. Build query parameters — Map entities to the query schema below
  3. Execute the query — Run scripts/search.py
  4. Present results — Format and display trials to the user

Step 1: Extract Keywords

Identify the following entity types from the user's question:

Field Type Description Example
nctid List[str] NCT identifier(s) ["NCT04280783"]
acronym List[str] Trial acronym(s) ["KEYNOTE-590"]
company List[str] Sponsor company name(s) ["Pfizer", "Roche"]
indication List[str] Disease / indication ["lung cancer", "NSCLC"]
phase List[str] Trial phase(s) ["Preclinical", "I", "II", "III", "IV", "Others"]
target dict Biological target(s) {"logic": "or", "data": ["PD-1", "VEGF"]}
drug_name dict Drug name(s) {"logic": "or", "data": ["pembrolizumab"]}
drug_modality dict Drug modality {"logic": "or", "data": ["Vaccine", "mRNA"]}
drug_feature dict Drug feature(s) {"logic": "or", "data": ["Biologic", "Non-NME"]}
location dict Trial location(s) {"logic": "or", "data": ["China", "United States", "Japan"]}
has_result_summary bool Only trials with result summaries true
official_data bool Only official data sources false
page_num int Page index (0-based) 0
page_size int Results per page (1–200) 10

Dict field format:

{"logic": "or", "data": ["value1", "value2"]}
  • logic controls how multiple values are combined: "or" (any match) or "and" (all must match). Default to "or" unless the user explicitly wants all terms to apply simultaneously.
  • data is the list of keyword strings to match.

Type rules:

  • indication, acronym, company, nctid, phase → plain List[str]

  • target, drug_name, drug_modality, drug_feature, location, route_of_administrationdict with logic and data

  • Default to page_num: 0, page_size: 10 unless the user specifies otherwise

  • Prefer English keywords (the database is indexed in English); translate non-English terms

  • drug_modality must use exact strings from this set:

    [
      "Steroids", "Vaccine", "Antisense RNA", "Antibody-Drug Conjugates, ADCs", "Unknown", "Protein Degrader",
      "Monoclonal Antibodies", "mRNA", "Others", "Cell-based Therapies", "Imaging Agents", "Gene Therapy",
      "miRNA", "Polypeptide", "Recombinant Proteins", "Small Molecule", "siRNA/RNAi", "Trispecific Antibodies",
      "Polyclonal Antibodies", "Bi-specific Antibodies", "Glycoconjugates", "Radiopharmaceutical",
      "Nucleic Acid-based", "Carbohydrates"
    ]
    
  • drug_feature must use exact strings from this set:

    [
      "505b2", "Bacterial Product", "Biologic", "Biosimilar", "Device", "Fixed-Dose Combination", "Immuno-Oncology",
      "New Molecular Entity (NME)", "Non-NME", "Precision Medicine", "Reformulation", "Specialty Drug", "Viral"
    ]
    

Step 2: Execute the Query

python scripts/search.py --params '\x3CJSON string>'

Or using a parameter file:

python scripts/search.py --params-file /tmp/query.json

Add --raw to receive the unformatted JSON response.

Step 3: Interpret Results

The response contains:

  • total_count — total number of matching trials
  • results — current page of results, each with NCT ID, title, phase, status, indication, drugs, sponsor, etc.

If results exceed 100, prompt the user to narrow the query. If no results are returned, apply the fallback strategies below before giving up.

Step 3: Review and Fallback Search Strategies

If no results are returned, apply the fallback strategies below before giving up. When an initial query returns zero or poor results, try these strategies in order:

Strategy 1 — Drug Name Variant Expansion

Trial registries may store drug names inconsistently (INN vs brand name, with/without hyphens, partial codes). Expand drug_name.data to include multiple variants in a single or query.

{
  "drug_name": {"logic": "or", "data": ["SHR-A1904", "SHR A1904", "A1904", "SHR1904"]},
  "page_num": 0,
  "page_size": 50
}

Also try substituting the trial acronym if known:

{
  "acronym": ["KEYNOTE-590", "KEYNOTE590", "KN590"],
  "page_num": 0,
  "page_size": 10
}

Common variant patterns:

  • Remove or replace hyphens: SHR-A1904SHR A1904, SHRA1904
  • Strip prefix: 9MW-2821MW-2821, 9MW2821
  • Try both INN and internal code together in the same data array

Strategy 2 — Sponsor-First with Application-Layer Filtering

When drug name matching is unreliable, anchor on the sponsor company and pull a broad result set, then filter locally by indication, phase, or modality.

{
  "company": ["Roche", "Roche Inc"],
  "page_num": 0,
  "page_size": 200
}

After retrieval, apply local filters:

  • phase in ["II", "III"]
  • indication contains "breast cancer"
  • drug_name matches known code pattern

Use this strategy when the drug code is ambiguous or when searching for a company's full trial portfolio.


Strategy 3 — Broad Target/Indication Search with Post-Filtering

When neither drug name nor company yields results, search by biological target and indication, then narrow client-side by sponsor or drug name pattern.

{
  "target": {"logic": "or", "data": ["CLDN18.2", "Nectin-4", "HER2"]},
  "indication": ["gastric cancer", "breast cancer"],
  "page_num": 0,
  "page_size": 200
}

After retrieval, filter by:

  • Sponsor name substring (e.g. contains "Hengrui")
  • Drug code prefix (e.g. starts with SHR, 9MW, A166)
  • Trial status (Recruiting, Active, not recruiting)

Note: If the API supports regex, patterns like (SHR|9MW|A166) can be passed directly in drug_name.data to broaden matching in a single call.


Strategy 4 — Relax Filters Incrementally

If all strategies above still return no results, drop filters one at a time in this order:

  1. Drop has_result_summary (many trials have no posted results)
  2. Drop phase filter
  3. Drop location filter
  4. Broaden indication (e.g. "NSCLC""lung cancer""cancer")
  5. Remove drug_modality or drug_feature constraints

Re-run after each relaxation and stop as soon as results appear.


Decision Tree

Initial query returns results?
├── Yes → present results
└── No  → Strategy 1: expand drug_name / acronym variants
          └── Still no → Strategy 2: sponsor anchor + local filter
                         └── Still no → Strategy 3: target/indication broad search
                                        └── Still no → Strategy 4: relax filters incrementally
Any step hits HTTP 429?
└── Pause entire chain 15s → resume from current strategy
    (sleep ≥5s between every request to avoid triggering 429)

Conversion Examples

User: "Find Phase 3 trials of PD-1 antibodies in lung cancer that have results"

{
  "target": {"logic": "or", "data": ["PD-1"]},
  "drug_modality": {"logic": "or", "data": ["Monoclonal Antibodies"]},
  "indication": ["lung cancer"],
  "phase": ["III"],
  "has_result_summary": true,
  "page_num": 0,
  "page_size": 10
}

User: "Look up NCT04280783"

{
  "nctid": ["NCT04280783"],
  "page_num": 0,
  "page_size": 1
}

User: "Roche bispecific antibody trials in China"

{
  "company": ["Roche"],
  "location": {"logic": "or", "data": ["China"]},
  "drug_modality": {"logic": "or", "data": ["Bi-specific Antibodies"]},
  "page_num": 0,
  "page_size": 10
}

User: "Oral small molecule KRAS G12C inhibitors in colorectal cancer"

{
  "target": {"logic": "or", "data": ["KRAS G12C"]},
  "drug_modality": {"logic": "or", "data": ["Small Molecule"]},
  "indication": ["colorectal cancer"],
  "page_num": 0,
  "page_size": 10
}

Dependencies

  • Python 3.8+
  • requests library (pip install requests)
  • Environment variable NOAH_API_TOKEN — API authentication token (required)
    • Register for a free account at noah.bio to obtain your API key.

Security & Packaging Notes

  • This skill only calls NoahAI official HTTPS endpoints under https://www.noah.bio/api/ and does not contact third-party services.
  • It requires exactly one environment variable: NOAH_API_TOKEN. Store it in the environment or a local .env file, and never place it inline in commands, chats, or packaged files.
  • The token is scoped to read medical public details only and cannot access private user records.
  • The skill does not intentionally persist request parameters locally. Any server-side retention is determined by the NoahAI API service and its operational logging policies.
  • It does not request persistent or system-level privileges and does not modify system configuration.
  • The skill is source-file based (Python scripts only) and does not require runtime installs, package downloads, or external bootstrap steps.
安全使用建议
This skill appears to do what it says: it sends structured clinical-trial queries to https://www.noah.bio using the NOAH_API_TOKEN you provide. Before installing, verify the provenance of the NOAH_API_TOKEN and the Noah service (you should trust the owner of the token and the noah.bio domain). Note the package does not declare the Python 'requests' dependency — ensure requests will be available in the runtime environment. Be aware that queries (and any user-supplied text) are sent to an external API and are printed to stderr by the script (logs may capture these). If you are unsure about trusting the external endpoint, run the script in an isolated environment or request more information about the service/provider before supplying credentials.
功能分析
Type: OpenClaw Skill Name: clinical-trail Version: 1.0.8 The skill provides a legitimate interface for searching clinical trial data via the NoahAI API. It uses a Python script (scripts/search.py) to send structured JSON queries to a hardcoded HTTPS endpoint (noah.bio) using an environment-provided API token. No evidence of data exfiltration, malicious execution, or harmful prompt injection was found.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
The name/description say the skill queries a clinical-trial backend and the package contains a Python script that POSTs structured queries to an API endpoint. Requiring python3 and NOAH_API_TOKEN is coherent with that purpose. The external API domain (https://www.noah.bio) is not accompanied by a homepage or vendor documentation in the package, but this is an operational detail rather than an inconsistency.
Instruction Scope
SKILL.md instructs the agent to parse user queries and run scripts/search.py; the script only reads the provided params (or params file) and the NOAH_API_TOKEN environment variable, then POSTs to the declared endpoint. There are no instructions to read unrelated system files, other env vars, or to exfiltrate data to unexpected endpoints.
Install Mechanism
This is an instruction-only skill with an included script (no install spec). The script imports the third-party 'requests' library and will exit if it's not installed, but SKILL.md/metadata do not declare that dependency or provide installation instructions for it. This is a usability/packaging omission rather than an active risk, but it should be fixed.
Credentials
Only a single credential (NOAH_API_TOKEN) is required and it's declared as the primary credential; that matches the script's use of a Bearer token for the API. No other secrets or unrelated environment variables are requested.
Persistence & Privilege
The skill is not marked 'always' and uses the normal user-invocable/autonomous defaults. It does not modify other skills or system-wide configuration. It simply performs an API query when invoked.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install clinical-trail
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /clinical-trail 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.8
clinical-trial-search v1.0.8 - Updated accepted value lists for `drug_modality` and `drug_feature` fields; inputs must now use exact strings from specified sets. - Clarified field type rules and examples for structured query parameters. - Adjusted sample values in field examples to reflect updated allowed terms. - Changed API response documentation: `page_size` renamed to `total_count`. - No code changes; documentation only.
v1.0.7
No file changes detected in this version (1.0.7). - No updates or modifications were made to the skill files. - Functionality and documentation remain unchanged from the previous version.
v1.0.6
- Improved robustness for zero-result queries by adding detailed fallback search strategies, including drug name variant expansion, sponsor-based retrieval with local filtering, and broader target/indication matching. - Clarified incremental filter relaxation order and strategy chain when no trials are found. - Specified handling for HTTP 429 (rate limit) errors, including recommended sleep times between requests. - Updated documentation to outline new fallback search logic and decision tree for troubleshooting queries.
v1.0.5
- Added a new "Security & Packaging Notes" section outlining endpoint usage, authentication requirements, and data handling policies. - Clarified that all API calls are made only to official NoahAI endpoints and do not contact third-party services. - Stated that the required environment variable `NOAH_API_TOKEN` should never be placed inline and is scoped to read-only access. - Added assurances regarding local persistence, privileges, and runtime dependencies. - Updated the "Interpret Results" section: the response fields are now described as `page_size` and `results` instead of `total` and `trials`.
v1.0.4
No user-facing changes in this version. - No file changes detected since the previous release.
v1.0.3
No changes detected in this version.
v1.0.2
- Added "metadata" field to SKILL.md with information for OpenClaw compatibility, specifying required binaries and environment variables. - Updated phase and location field examples for improved accuracy and broader phase mapping. - Increased the maximum supported page size from 10 to 200 in documentation. - Changed the default page size from 5 to 10. - Improved example queries and parameter mappings to reflect updated schema and conventions.
v1.0.1
A specialized skill for querying real-time clinical trial databases using natural language — it automatically parses queries into structured API parameters to search trials by drug, target, indication, phase, sponsor, and more. Unlike static knowledge, it fetches live data from a ClinicalTrials.gov-like backend, ensuring results are always current and comprehensive.
v1.0.0
Initial release of Clinical Trial Search Skill: - Converts natural language queries into structured API calls for clinical trial databases similar to ClinicalTrials.gov. - Extracts key entities from user questions, including drug names, indications, phases, NCT IDs, sponsors, locations, and more. - Supports logical operators (AND/OR) for multi-value search fields. - Returns formatted summaries of matching clinical trials with key trial information. - Provides workflow documentation and multiple request/response examples for common use cases.
元数据
Slug clinical-trail
版本 1.0.8
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 9
常见问题

NoahAI clinical-trial query 是什么?

Search clinical trial databases similar to ClinicalTrials.gov. Use this skill whenever the user asks about clinical trials, drug trials, indications, targets... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 293 次。

如何安装 NoahAI clinical-trial query?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install clinical-trail」即可一键安装,无需额外配置。

NoahAI clinical-trial query 是免费的吗?

是的,NoahAI clinical-trial query 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

NoahAI clinical-trial query 支持哪些平台?

NoahAI clinical-trial query 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 NoahAI clinical-trial query?

由 yichen(@bombert)开发并维护,当前版本 v1.0.8。

💬 留言讨论