Skip to content
Back to search

MedgeClaw

Open-source AI research assistant for biomedicine — chat to run RNA-seq, drug discovery, clinical analysis, and more. Built on Claude Code with 140 K-Dense scientific skills, real-time dashboard, and RStudio/JupyterLab integration. | 开源生物医学 AI 研究助手,对话即可驱动转录组、药物发现、临床分析等工作流,集成 140 个科学技能与实时研究看板。

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/xjtulyc--medgeclaw/badge.svg)](/listings/xjtulyc--medgeclaw)

HTML

<a href="/listings/xjtulyc--medgeclaw"><img src="/api/listings/xjtulyc--medgeclaw/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

# 1. Clone with submodules (includes K-Dense Scientific Skills)
git clone --recurse-submodules https://github.com/xjtulyc/MedgeClaw
cd MedgeClaw

# 2. Configure environment
cp .env.example .env
nano .env  # Fill in your API key and provider settings

# 3. Run setup
bash setup.sh

# 4. Sync MedgeClaw configuration to OpenClaw
python3 sync.py
openclaw gateway restart

# 5. Start the analysis environment
docker compose up -d

# 6. Start OpenClaw
openclaw onboard

Then open your messaging app and start talking to your assistant.

Environment Configuration

The `.env` file controls: - **API settings**: Provider, base URL, model, API key - **Third-party proxy fix**: `ANTHROPIC_SMALL_FAST_MODEL` (required for non-Anthropic endpoints) - **Path overrides** (optional): `MEDGECLAW_ROOT`, `OPENCLAW_DIR` - **Docker settings**: Container name, RStudio/Jupyter passwords

See `.env.example` for all available options.

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 309 lines · 1 finding marked

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # 🧬 MedgeClaw
  2. ### An AI-Powered Biomedical Research Assistant
  3. <p align="center">
  4. <img src="./logo.png" alt="MedgeClaw Logo" width="300">
  5. </p>
  6. **English** | [中文](README_ZH.md)
  7. ---
  8. An open-source biomedical AI research assistant built on [OpenClaw](https://github.com/openclaw/openclaw) and [Claude Code](https://docs.claude.com/en/docs/claude-code/quickstart), integrating [140 K-Dense Scientific Skills](https://github.com/K-Dense-AI/claude-scientific-skills) for bioinformatics, drug discovery, clinical research, and more.
  9. **Talk to your research assistant via WhatsApp, Slack, or Discord → it runs the analysis → you view results in RStudio or JupyterLab.**
  10. ---
  11. ## Architecture
  12. ```
  13. User (voice / text via WhatsApp · Slack · Feishu · Discord)
  14. ↓
  15. OpenClaw Gateway (conversation layer)
  16. ↓ biomed-dispatch skill
  17. Claude Code (execution layer)
  18. ↓ K-Dense Scientific Skills (140 skills)
  19. R + Python Analysis Environment (Docker)
  20. ↓ ↓ ↓
  21. Research Dashboard :77xx RStudio :8787 Feishu Rich Cards
  22. (real-time progress, / JupyterLab :8888 (SVG panels → PNG
  23. code & output preview) (interactive) → interactive cards)
  24. ```
  25. ---
  26. ## What's Included
  27. | Component | Description |
  28. | ----------------------------- | ---------------------------------------------------------------------------------- |
  29. | **OpenClaw** | Conversational AI gateway — connects to your messaging apps |
  30. | **Claude Code** | Executes complex analysis workflows autonomously |
  31. | **K-Dense Scientific Skills** | 140 ready-to-use skills: genomics, drug discovery, clinical research, ML, and more |
  32. | **Research Dashboard** | Real-time web dashboard showing progress, code, outputs, and file previews |
  33. | **R Environment** | DESeq2, Seurat, edgeR, clusterProfiler, survival, ggplot2, and more |
  34. | **Python Environment** | Scanpy, BioPython, PyDESeq2, lifelines, scikit-learn, and more |
  35. | **RStudio Server** | Browser-based R IDE at `localhost:8787` |
  36. | **JupyterLab** | Browser-based Python/R notebooks at `localhost:8888` |
  37. | **biomed-dispatch** | The bridge skill that routes your requests to Claude Code |
  38. | **CJK Visualization** | Auto-detects CJK fonts for matplotlib, no more tofu blocks in Chinese plots |
  39. | **SVG UI Templates** | Professional SVG panels for lists, checklists, pipeline status, and rich reports |
  40. | **Feishu Rich Card** | Send image-rich interactive cards in Feishu group chats for progress reports |
  41. ---
  42. ## Prerequisites
  43. - **Node.js 22+** — [nodejs.org](https://nodejs.org)
  44. - **Docker + docker-compose** — [docs.docker.com](https://docs.docker.com/get-docker/)
  45. - **Git**
  46. - An API key from one of the supported model providers (see below)
  47. ---
  48. ## Quick Start
  49. ```bash
  50. # 1. Clone with submodules (includes K-Dense Scientific Skills)
  51. git clone --recurse-submodules https://github.com/xjtulyc/MedgeClaw
  52. cd MedgeClaw
  53. # 2. Configure environment
  54. cp .env.example .env
  55. nano .env # Fill in your API key and provider settings
  56. # 3. Run setup
  57. bash setup.sh
  58. # 4. Sync MedgeClaw configuration to OpenClaw
  59. python3 sync.py
  60. openclaw gateway restart
  61. # 5. Start the analysis environment
  62. docker compose up -d
  63. # 6. Start OpenClaw
  64. openclaw onboard
  65. ```
  66. Then open your messaging app and start talking to your assistant.
  67. ### Environment Configuration
  68. The `.env` file controls:
  69. - **API settings**: Provider, base URL, model, API key
  70. - **Third-party proxy fix**: `ANTHROPIC_SMALL_FAST_MODEL` (required for non-Anthropic endpoints)
  71. - **Path overrides** (optional): `MEDGECLAW_ROOT`, `OPENCLAW_DIR`
  72. - **Docker settings**: Container name, RStudio/Jupyter passwords
  73. See `.env.example` for all available options.
  74. ---
  75. ## Model Providers
  76. Edit `.env` to choose your provider. All providers are drop-in replacements — no other changes needed.
  77. | Provider | Base URL | Notes |
  78. | ------------------------------ | ------------------------------------ | ---------------- |
  79. | **Anthropic Claude** (default) | `https://api.anthropic.com` | Best quality |
  80. | **MiniMax 2.1** | `https://api.minimax.chat/anthropic` | Available in CN |
  81. | **GLM-4.7** (Z.ai) | `https://api.z.ai/api/anthropic` | Available in CN |
  82. | **DeepSeek** | `https://api.deepseek.com/anthropic` | Low cost |
  83. | **Ollama** (local) | `http://localhost:11434/v1` | Fully offline |
  84. ---
  85. ## ⚠️ Using Third-Party API Proxies
  86. If you use a third-party API proxy (MiniMax, GLM, DeepSeek, or any non-Anthropic endpoint), you **must** configure `ANTHROPIC_SMALL_FAST_MODEL` in your `.env` file. Without this, Claude Code will fail silently.
  87. ### Why
  88. Claude Code runs a **pre-flight safety check** before every bash command, using a lightweight "small fast model" (defaults to `claude-3-5-haiku`). Most third-party proxies don't support Haiku, causing the pre-flight to return 503 errors and hang indefinitely with:
  89. ```
  90. ⚠️ [BashTool] Pre-flight check is taking longer than expected.
  91. ```
  92. ### Fix
  93. Add this line to your `.env`:
  94. ```bash
  95. # Required for third-party API proxies:
  96. ANTHROPIC_SMALL_FAST_MODEL=claude-sonnet-4-20250514 # or any model your proxy supports
  97. ```
  98. Then re-run `bash setup.sh` to apply.
  99. ### How to verify
  100. ```bash
  101. # Should complete in < 30 seconds. If it hangs, your SMALL_FAST_MODEL is wrong.
  102. claude --dangerously-skip-permissions -p 'run: echo hello'
  103. ```
  104. ---
  105. ## Usage Examples
  106. Once OpenClaw is running, send messages like:
  107. ```
  108. Analyze RNA-seq data at data/counts.csv vs data/meta.csv, treatment vs control
  109. ```
  110. ```
  111. Search PubMed for recent papers on CRISPR base editing, summarize top 10
  112. ```
  113. ```
  114. Run survival analysis on data/clinical.csv, time=OS_months, event=OS_status
  115. ```
  116. ```
  117. Perform single-cell RNA-seq analysis on the 10X data in data/10x/
  118. ```
  119. ```
  120. Virtual screen EGFR inhibitors from ChEMBL (IC50 < 50nM), generate SAR report
  121. ```
  122. Results are saved to `./outputs/` and viewable in RStudio (`localhost:8787`) or JupyterLab (`localhost:8888`).
  123. ---
  124. ## 📊 Research Dashboard
  125. Every analysis task automatically spawns a **live web dashboard** — no need to wait for completion or check logs.
  126. **Features:**
  127. - **Real-time progress bar** — sticky header, always visible
  128. - **Analysis plan overview** — all steps listed with completion status (✅/⏳)
  129. - **Step-by-step breakdown** — each step shows: description → code (collapsible) → outputs
  130. - **Inline previews** — images render directly, tables load from CSV files, text results highlighted
  131. - **Full script access** — click to load the complete `.py` file, not just snippets
  132. - **Copy & download everywhere** — 📋 copy code/tables/text, ⬇ download images/CSVs
  133. - **Color-blind friendly** — IBM accessible palette + GitHub Dark theme
  134. - **File browser** — browse all output artifacts with one-click preview
  135. **How it works:**
  136. ```
  137. AI completes a step → updates state.json → dashboard auto-refreshes (2s polling)
  138. ```
  139. Three files, zero dependencies: `dashboard.html` + `state.json` + `dashboard_serve.py`.
  140. See [docs/dashboard.md](docs/dashboard.md) for the full specification.
  141. ---
  142. ## Directory Structure
  143. ```
  144. MedgeClaw/
  145. ├── docker/
  146. │ ├── Dockerfile # R + Python + RStudio + Jupyter
  147. │ └── entrypoint.sh
  148. ├── skills/
  149. │ ├── biomed-dispatch/ # Core bridge skill: routes tasks to Claude Code
  150. │ │ └── SKILL.md
  151. │ ├── dashboard/ # Research Dashboard: real-time task visualization
  152. │ │ ├── SKILL.md # Dashboard specification & state.json schema
  153. │ │ ├── dashboard.html # Single-file frontend (dark theme, IBM palette)
  154. │ │ └── dashboard_serve.py # Threaded HTTP server
  155. │ ├── cjk-viz/ # CJK font detection for matplotlib
  156. │ │ └── SKILL.md
  157. │ ├── svg-ui-templates/ # Professional SVG panels (list, checklist, pipeline, report)
  158. │ │ ├── SKILL.md
  159. │ │ ├── assets/ # 4 template SVGs
  160. │ │ └── references/ # Template guide
  161. │ └── feishu-rich-card/ # Send image-rich interactive cards in Feishu
  162. │ ├── SKILL.md
  163. │ └── references/ # send_card.py helper
  164. ├── scientific-skills/ # git submodule → K-Dense (140 skills)
  165. ├── data/ # Per-task data & analysis directories
  166. │ └── <task_name>/
  167. │ ├── dashboard/ # state.json + dashboard.html (auto-created)
  168. │ └── output/ # Analysis outputs (CSV, PNG, etc.)
  169. ├── docs/ # Project documentation
  170. ├── docker-compose.yml
  171. ├── setup.sh
  172. ├── CLAUDE.md # Project instructions for Claude Code
  173. ├── .env.example
  174. └── .gitmodules
  175. ```
  176. ---
  177. ## 🔄 Project Synchronization
  178. MedgeClaw integrates with OpenClaw via a configuration-driven sync mechanism.
  179. ### How it works
  180. - **Configuration**: `.medgeclaw-sync.yml` defines what to sync
  181. - **Sync script**: `sync.py` reads the config and performs the sync
  182. - **Environment**: `.env` defines paths (optional, auto-detected by default)
  183. ### When to sync
  184. Run `python3 sync.py` after:
  185. - Initial setup
  186. - Modifying project documentation (MEDGECLAW.md, IDENTITY.md)
  187. - Adding/updating custom skills in `skills/`
  188. - Changing sync configuration in `.medgeclaw-sync.yml`
  189. ### What gets synced
  190. - Project docs → OpenClaw workspace
  191. - Custom skills → OpenClaw workspace/skills/
  192. - Identity/context → SOUL.md, AGENTS.md (appended)
  193. - Skill paths → openclaw.json
  194. See [SYNC_README.md](SYNC_README.md) for details.
  195. ---
  196. ## Updating K-Dense Scientific Skills
  197. ```bash
  198. git submodule update --remote scientific-skills
  199. ```
  200. ---
  201. ## Contributing
  202. Contributions welcome. The most valuable contributions are:
  203. - Improvements to `skills/biomed-dispatch/SKILL.md` for better task routing
  204. - New domain-specific skills in `skills/` (e.g., for specific clinical or lab workflows)
  205. - Improvements to the Dockerfile (lighter image, newer package versions)
  206. Please follow the [AgentSkills specification](https://agentskills.io/specification) for any new skills.
  207. ---
  208. ## Roadmap
  209. - [x] Core architecture: OpenClaw + Claude Code + K-Dense Scientific Skills integration
  210. - [x] Docker analysis environment with RStudio Server and JupyterLab
  211. - [x] Third-party API proxy support (`ANTHROPIC_SMALL_FAST_MODEL` fix for BashTool pre-flight)
  212. - [x] `CLAUDE.md` project instructions for Claude Code (docker exec execution model)
  213. - [x] Multi-language analysis validation (Python + R, direct + Claude Code + K-Dense skills)
  214. - [x] **Research Dashboard**: real-time web dashboard with progress tracking, step-by-step code & output preview, copy/download, color-blind friendly design
  215. - [x] **CJK visualization skill**: auto-detect CJK fonts in Docker, solve `.ttc` font rendering issues
  216. - [x] **Feishu integration**: connect to Feishu group chat for team collaboration
  217. - [x] **SVG UI Templates**: professional-grade SVG panels (list, checklist, pipeline status, rich-text layout) with Material Design palette
  218. - [x] **Feishu Rich Cards**: send image-rich interactive cards in Feishu — SVG/matplotlib → PNG → Card Kit API, with mixed text+image layout
  219. - [ ] **Multi-agent workflow**: Parallel dispatch of sub-analyses (e.g., Python + R simultaneously) with result aggregation and cross-validation
  220. - [ ] **Automated literature integration**: Connect PubMed/bioRxiv search → auto-generate introduction and discussion sections referencing analysis results
  221. - [ ] **Interactive report builder**: Auto-generate publication-ready HTML/PDF reports with figures, tables, and statistical narratives from analysis outputs
  222. - [ ] **Domain-specific skill chains**: Pre-built pipelines for common workflows (GWAS → PRS → Mendelian Randomization, scRNA-seq → trajectory → cell-cell communication)
  223. - [ ] **Reproducibility engine**: Auto-generate Docker-based reproducibility packages with frozen environments, data checksums, and one-click re-execution
  224. ---
  225. ## License
  226. MIT © 2026 [xjtulyc](https://github.com/xjtulyc)
  227. This project bundles [K-Dense Scientific Skills](https://github.com/K-Dense-AI/claude-scientific-skills) as a git submodule (MIT). Individual skills within that repository may have their own license — check each `SKILL.md` for details.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.