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
- Identify task type from the user's request
- Locate data files — check if user mentioned a file path; if not, list
/workspace/data/ and confirm with user
- Set up Dashboard — every analysis task must have a live dashboard:
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
- Construct the Claude Code prompt — include dashboard update instructions:
- Which scientific skill(s) to use
- 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)
- Execute via Claude Code CLI:
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"
- Monitor — if the task takes >30s, inform the user it is running in background
- Report back — summarize results, point user to dashboard URL for details
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):
# 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:
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:
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."
Important rules
- Always save outputs to
/workspace/outputs/ — never to /workspace/data/
- 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 执行字体检测,不要硬编码字体名
1---2name: biomed-dispatch3description: 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.4---56# Biomedical Analysis Dispatch78## Purpose9Bridge between the OpenClaw conversational interface and Claude Code's10scientific execution environment (K-Dense Scientific Skills).1112## When to use13- Any bioinformatics task: RNA-seq, scRNA-seq, variant calling, sequence analysis14- Drug discovery: molecular docking, virtual screening, ADMET prediction15- Clinical data: survival analysis, variant interpretation, clinical trials search16- Multi-omics: proteomics, metabolomics, pathway enrichment17- Medical imaging: DICOM processing, digital pathology18- Scientific communication: literature review, scientific writing, figure generation19- Any request mentioning specific tools: DESeq2, Seurat, Scanpy, RDKit, BioPython, etc.2021## Workflow22231. **Identify task type** from the user's request242. **Locate data files** — check if user mentioned a file path; if not, list `/workspace/data/` and confirm with user253. **Set up Dashboard** — every analysis task must have a live dashboard:26 ```bash27 TASK_DIR=data/<task_name>28 mkdir -p "$TASK_DIR/dashboard" "$TASK_DIR/output"29 cp skills/dashboard/dashboard.html "$TASK_DIR/dashboard/"30 cp skills/dashboard/dashboard_serve.py "$TASK_DIR/dashboard/"31 # Write initial state.json with: progress(0%), 研究概要, 分析计划(list), empty steps32 # Start server33 python "$TASK_DIR/dashboard/dashboard_serve.py" --port <free_port> &34 # Tell user the URL immediately: http://localhost:<port>/dashboard/dashboard.html35 ```364. **Construct the Claude Code prompt** — include dashboard update instructions:37 - Which scientific skill(s) to use38 - Input file path(s)39 - Output directory: always `$TASK_DIR/output/`40 - **Dashboard state.json path** and update expectations:41 - Update progress after each step42 - Use `step` panels with `desc`, `code`, `code_file`, `outputs`43 - Use `{"src": "/output/file.csv"}` for table references (NOT inline data)44 - Image paths absolute: `/output/fig1.png`45 - Expected output format (table, figure, report)465. **Execute** via Claude Code CLI:47 ```bash48 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"49 ```506. **Monitor** — if the task takes >30s, inform the user it is running in background517. **Report back** — summarize results, point user to dashboard URL for details5253## Output handling54- Tables → summarize top rows, mention full file path55- Figures → send the image file to the user directly56- Reports → send the PDF/HTML file to the user directly57- Errors → show the error message and suggest a fix5859## Example dispatches6061**Clinical data analysis (complete flow with dashboard):**62```bash63# 1. Setup64TASK_DIR=data/charls_ace65mkdir -p "$TASK_DIR/dashboard" "$TASK_DIR/output"66cp skills/dashboard/dashboard.html "$TASK_DIR/dashboard/"67cp skills/dashboard/dashboard_serve.py "$TASK_DIR/dashboard/"68# 2. Write initial state.json69# 3. Start dashboard server70python "$TASK_DIR/dashboard/dashboard_serve.py" --port 7790 &71# 4. Dispatch to Claude Code72claude --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"73```7475**RNA-seq differential expression:**76```bash77claude --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."78```7980**Single-cell RNA-seq:**81```bash82claude --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."83```8485## Important rules86- Always save outputs to `/workspace/outputs/` — never to `/workspace/data/`87- Never modify raw data files in `/workspace/data/`88- If the user's request is ambiguous, ask one clarifying question before dispatching89- If Claude Code returns an error about a missing package, retry with `uv pip install [package]` prepended to the command90- **涉及中文可视化时**,在 prompt 中加入:绘图前先导入 `skills/cjk-viz/scripts/setup_cjk_font.py` 执行字体检测,不要硬编码字体名