Biomed Dispatch 标志

Biomed Dispatch

社区
xjtulyc
biomed-dispatch

Dispatch biomedical research and data analysis tasks to Claude Code with K-Dense Scientific Skills. Use this skill when the user asks to run any bioinformatics, genomics, drug discovery, clinical data analysis, proteomics, multi-omics, medical imaging, or scientific computation task. Also use for literature search (PubMed, bioRxiv), pathway analysis, protein structure prediction, or scientific writing tasks.

概览

发布者xjtulyc
代码仓库MedgeClaw
技能名称biomed-dispatch
星标数
617
复刻数
134
附带文件
仅含指令
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 指令自成一体

    模型所需的一切都包含在指令中,无需同步额外文件。

  • 开源

    由 xjtulyc 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Biomed Dispatch AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/xjtulyc/MedgeClaw/tree/main/skills/biomed-dispatch
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/xjtulyc/MedgeClaw.git /tmp/MedgeClaw
mkdir -p .claude/skills
cp -r /tmp/MedgeClaw/skills/biomed-dispatch .claude/skills/biomed-dispatch
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Biomed Dispatch,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Biomed Dispatch。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Biomed Dispatch 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Biomedical Analysis Dispatch

Purpose

Bridge between the OpenClaw conversational interface and Claude Code's scientific execution environment (K-Dense Scientific Skills).

When to use

  • Any bioinformatics task: RNA-seq, scRNA-seq, variant calling, sequence analysis
  • Drug discovery: molecular docking, virtual screening, ADMET prediction
  • Clinical data: survival analysis, variant interpretation, clinical trials search
  • Multi-omics: proteomics, metabolomics, pathway enrichment
  • Medical imaging: DICOM processing, digital pathology
  • Scientific communication: literature review, scientific writing, figure generation
  • Any request mentioning specific tools: DESeq2, Seurat, Scanpy, RDKit, BioPython, etc.

Workflow

  1. Identify task type from the user's request
  2. Locate data files — check if user mentioned a file path; if not, list /workspace/data/ and confirm with user
  3. Set up Dashboard — every analysis task must have a live dashboard:
    bash
    TASK_DIR=data/<task_name>
    mkdir -p "$TASK_DIR/dashboard" "$TASK_DIR/output"
    cp skills/dashboard/dashboard.html "$TASK_DIR/dashboard/"
    cp skills/dashboard/dashboard_serve.py "$TASK_DIR/dashboard/"
    # Write initial state.json with: progress(0%), 研究概要, 分析计划(list), empty steps
    # Start server
    python "$TASK_DIR/dashboard/dashboard_serve.py" --port <free_port> &
    # Tell user the URL immediately: http://localhost:<port>/dashboard/dashboard.html
  4. 拆分长任务 — 如果任务包含多个阶段(如:文献搜索 + 写大纲 + 写正文 + 做图 + 编译),必须拆成多个 Claude Code session,每个 session 只做一件事:
    • Phase 1: 文献搜索 + 大纲
    • Phase 2: 写正文(或分章节)
    • Phase 3: 生成图表
    • Phase 4: 编译 PDF
    • 原因: 单次 CC session 超过 10 分钟大概率卡住(上下文窗口满、API 超时、生成超长文本)
  5. Construct the Claude Code prompt — 短而聚焦,包含 dashboard 更新指令:
    • Which scientific skill(s) to use(明确指定 skill 路径,如 先读 ~/next-medgeai/MedgeClaw/scientific-skills/scientific-skills/scientific-writing/SKILL.md)
    • Input file path(s)
    • Output directory: always $TASK_DIR/output/
    • Dashboard state.json path and update expectations:
      • Update progress after each step
      • Use step panels with desc, code, code_file, outputs
      • Use {"src": "/output/file.csv"} for table references (NOT inline data)
      • Image paths absolute: /output/fig1.png
    • Expected output format (table, figure, report)
  6. Execute via Claude Code CLI(推荐 stream-json + hooks):
    bash
    # 推荐:stream-json 模式(可观测)
    cd "$TASK_DIR" && claude -p "短任务描述。先读 skill 文件。完成后: openclaw system event --text 'Done: 摘要' --mode now" \
      --output-format stream-json \
      --verbose \
      --dangerously-skip-permissions \
      2>/dev/null | tail -1
    
    # 旧方式(不推荐,无可观测性)
    claude --dangerously-skip-permissions -p "Use available scientific skills. [TASK]. Input: [PATH]. Outputs: $TASK_DIR/output/. Update dashboard at $TASK_DIR/dashboard/state.json after each step (step panels with code + outputs). Completion: openclaw system event --text 'Done: summary' --mode now"
  7. Monitor — 用 hooks 的 progress.json 判断进度:
    • 如果 last_update 超过 5 分钟没变 → 大概率卡了,kill 掉重来
    • 如果任务 >30s,告知用户后台运行中
  8. Report back — 总结结果,指向 dashboard URL

科学写作任务的特殊处理

文献综述 / 论文写作必须拆分:

bash
# Phase 1: 文献搜索 + 大纲(5-10 分钟)
cd writing_outputs/<task_name> && claude -p "读 ~/next-medgeai/MedgeClaw/scientific-skills/scientific-skills/literature-review/SKILL.md 和 scientific-writing/SKILL.md。按 literature-review 流程搜索文献,创建 outline.md(Stage 1)。" \
  --output-format stream-json --verbose --dangerously-skip-permissions 2>/dev/null | tail -1

# Phase 2: 写正文(分章节,每章 5-10 分钟)
cd writing_outputs/<task_name> && claude -p "读 outline.md 的第 1-3 节。用 Edit 工具在 manuscript.tex 中补充这些章节的正文。写完整的学术散文。" \
  --output-format stream-json --verbose --dangerously-skip-permissions 2>/dev/null | tail -1

# Phase 3: 创建 BibTeX + 添加引用(5 分钟)
cd writing_outputs/<task_name> && claude -p "读 manuscript.tex 和 outline.md。创建 references/references.bib(至少 30 篇),在 tex 中添加 \cite{}(每节至少 5 处),在 \end{document} 前加 \bibliographystyle{unsrt} 和 \bibliography{references}。" \
  --output-format stream-json --verbose --dangerously-skip-permissions 2>/dev/null | tail -1

# Phase 4: 生成图表(5-10 分钟)
cd writing_outputs/<task_name> && claude -p "在 figures/ 下创建 5 个 Python 脚本生成图表 PDF。中文标签用 Noto Sans CJK SC 字体。" \
  --output-format stream-json --verbose --dangerously-skip-permissions 2>/dev/null | tail -1

# Phase 5: 编译 PDF(手动或简单 CC)
cd writing_outputs/<task_name>/drafts && xelatex -output-directory=../final manuscript.tex
cd ../final && bibtex manuscript && cd ../drafts && xelatex -output-directory=../final manuscript.tex && xelatex -output-directory=../final manuscript.tex

为什么必须拆分:

  • 单次让 CC 做完所有步骤(搜文献 + 写大纲 + 写正文 + 做图 + 编译)会导致:
    • 上下文窗口满(74 篇摘要 + task.md + skill 文件 + LaTeX 模板 = 超大上下文)
    • Opus 生成超长 LaTeX 文本(数千 token)需要 10+ 分钟,容易超时
    • 中途卡住后无法恢复,只能重来
  • 拆分后每个 phase 独立,失败了只需重跑该 phase

Output handling

  • Tables → summarize top rows, mention full file path
  • Figures → send the image file to the user directly
  • Reports → send the PDF/HTML file to the user directly
  • Errors → show the error message and suggest a fix

Example dispatches

Clinical data analysis (complete flow with dashboard):

bash
# 1. Setup
TASK_DIR=data/charls_ace
mkdir -p "$TASK_DIR/dashboard" "$TASK_DIR/output"
cp skills/dashboard/dashboard.html "$TASK_DIR/dashboard/"
cp skills/dashboard/dashboard_serve.py "$TASK_DIR/dashboard/"
# 2. Write initial state.json
# 3. Start dashboard server
python "$TASK_DIR/dashboard/dashboard_serve.py" --port 7790 &
# 4. Dispatch to Claude Code
claude --dangerously-skip-permissions -p "分析 CHARLS 队列中 ACE 与 CVD 的关联。Input: data/charls_ace/charls.dta. Output: data/charls_ace/output/. 每步更新 dashboard state.json(step panels with code + outputs)。完成后: openclaw system event --text 'Done: ACE-CVD分析完成' --mode now"

RNA-seq differential expression:

bash
claude --dangerously-skip-permissions -p "Use DESeq2 scientific skill. Run differential expression. Counts: /workspace/data/counts.csv, metadata: /workspace/data/meta.csv, contrast: treatment vs control. Save to /workspace/data/rnaseq/output/. Update dashboard at /workspace/data/rnaseq/dashboard/state.json."

Single-cell RNA-seq:

bash
claude --dangerously-skip-permissions -p "Use Scanpy scientific skill. Analyze 10X data at /workspace/data/10x/. QC, clustering, markers. Save to /workspace/data/10x/output/. Update dashboard state.json with step panels."

输出路径约束(重要)

所有任务输出必须写入指定目录:

任务类型输出路径说明
数据分析data/<task_name>/output/CSV、图表、报告
Dashboarddata/<task_name>/dashboard/state.json, dashboard.html, serve.py
科学写作writing_outputs/<date>_<topic>/LaTeX、PDF、BibTeX、figures/
临时文件data/<task_name>/temp/中间产物

禁止写入:

  • ❌ 项目根目录(~/next-medgeai/MedgeClaw/)
  • ❌ /workspace/outputs/(已废弃)
  • ❌ /workspace/data/(只读,用户输入数据)

Important rules

  • Never modify raw data files in /workspace/data/
  • If the user's request is ambiguous, ask one clarifying question before dispatching
  • If Claude Code returns an error about a missing package, retry with uv pip install [package] prepended to the command
  • 涉及中文可视化时,在 prompt 中加入:绘图前先导入 skills/cjk-viz/scripts/setup_cjk_font.py 执行字体检测,不要硬编码字体名

常见问题

Biomed Dispatch AI 技能有什么作用?

Dispatch biomedical research and data analysis tasks to Claude Code with K-Dense Scientific Skills. Use this skill when the user asks to run any bioinformatics, genomics, drug discovery, clinical data analysis, proteomics, multi-omics, medical imaging, or scientific computation task. Also use for literature search (PubMed, bioRxiv), pathway analysis, protein structure prediction, or scientific writing tasks.

为什么在 TypingMind 中使用 Biomed Dispatch?

因为您只需安装一次,就能搭配任何模型使用。Biomed Dispatch 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Biomed Dispatch?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/xjtulyc/MedgeClaw/tree/main/skills/biomed-dispatch。TypingMind 会读取其中的 SKILL.md,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Biomed Dispatch?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Biomed Dispatch 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Biomed Dispatch 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Biomed Dispatch AI 技能免费吗?

xjtulyc 已在 GitHub 上发布了该技能。请查看代码仓库了解许可条款。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇