Open-source AI research assistant for biomedicine — chat to run RNA-seq, drug discovery, clinical analysis, and more.
$ npx -y skills add xjtulyc/MedgeClaw --agent claude-code
English | 中文
An open-source biomedical AI research assistant built on OpenClaw and Claude Code, integrating 140 K-Dense Scientific Skills for bioinformatics, drug discovery, clinical research, and more.
Talk to your research assistant via WhatsApp, Slack, or Discord → it runs the analysis → you view results in RStudio or JupyterLab.
User (voice / text via WhatsApp · Slack · Feishu · Discord)
↓
OpenClaw Gateway (conversation layer)
↓ biomed-dispatch skill
Claude Code (execution layer)
↓ K-Dense Scientific Skills (140 skills)
R + Python Analysis Environment (Docker)
↓ ↓ ↓
Research Dashboard :77xx RStudio :8787 Feishu Rich Cards
(real-time progress, / JupyterLab :8888 (SVG panels → PNG
code & output preview) (interactive) → interactive cards)
| Component | Description |
|---|---|
| OpenClaw | Conversational AI gateway — connects to your messaging apps |
| Claude Code | Executes complex analysis workflows autonomously |
| K-Dense Scientific Skills | 140 ready-to-use skills: genomics, drug discovery, clinical research, ML, and more |
| Research Dashboard | Real-time web dashboard showing progress, code, outputs, and file previews |
| R Environment | DESeq2, Seurat, edgeR, clusterProfiler, survival, ggplot2, and more |
| Python Environment | Scanpy, BioPython, PyDESeq2, lifelines, scikit-learn, and more |
| RStudio Server | Browser-based R IDE at localhost:8787 |
| JupyterLab | Browser-based Python/R notebooks at localhost:8888 |
| biomed-dispatch | The bridge skill that routes your requests to Claude Code |
| CJK Visualization | Auto-detects CJK fonts for matplotlib, no more tofu blocks in Chinese plots |
| SVG UI Templates | Professional SVG panels for lists, checklists, pipeline status, and rich reports |
| Feishu Rich Card | Send image-rich interactive cards in Feishu group chats for progress reports |
# 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.
The .env file controls:
ANTHROPIC_SMALL_FAST_MODEL (required for non-Anthropic endpoints)MEDGECLAW_ROOT, OPENCLAW_DIRSee .env.example for all available options.
Edit .env to choose your provider. All providers are drop-in replacements — no other changes needed.
| Provider | Base URL | Notes |
|---|---|---|
| Anthropic Claude (default) | https://api.anthropic.com | Best quality |
| MiniMax 2.1 | https://api.minimax.chat/anthropic | Available in CN |
| GLM-4.7 (Z.ai) | https://api.z.ai/api/anthropic | Available in CN |
| DeepSeek | https://api.deepseek.com/anthropic | Low cost |
| Ollama (local) | http://localhost:11434/v1 | Fully offline |
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.
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:
⚠️ [BashTool] Pre-flight check is taking longer than expected.
Add this line to your .env:
# Required for third-party API proxies:
ANTHROPIC_SMALL_FAST_MODEL=claude-sonnet-4-20250514 # or any model your proxy supports
Then re-run bash setup.sh to apply.
# Should complete in < 30 seconds. If it hangs, your SMALL_FAST_MODEL is wrong.
claude --dangerously-skip-permissions -p 'run: echo hello'
Once OpenClaw is running, send messages like:
Analyze RNA-seq data at data/counts.csv vs data/meta.csv, treatment vs control
Search PubMed for recent papers on CRISPR base editing, summarize top 10
Run survival analysis on data/clinical.csv, time=OS_months, event=OS_status
Perform single-cell RNA-seq analysis on the 10X data in data/10x/
Virtual screen EGFR inhibitors from ChEMBL (IC50 < 50nM), generate SAR report
Results are saved to ./outputs/ and viewable in RStudio (localhost:8787) or JupyterLab (localhost:8888).
Every analysis task automatically spawns a live web dashboard — no need to wait for completion or check logs.
Features:
.py file, not just snippetsHow it works:
AI completes a step → updates state.json → dashboard auto-refreshes (2s polling)
Three files, zero dependencies: dashboard.html + state.json + dashboard_serve.py.
See docs/dashboard.md for the full specification.
MedgeClaw/
├── docker/
│ ├── Dockerfile # R + Python + RStudio + Jupyter
│ └── entrypoint.sh
├── skills/
│ ├── biomed-dispatch/ # Core bridge skill: routes tasks to Claude Code
│ │ └── SKILL.md
│ ├── dashboard/ # Research Dashboard: real-time task visualization
│ │ ├── SKILL.md # Dashboard specification & state.json schema
│ │ ├── dashboard.html # Single-file frontend (dark theme, IBM palette)
│ │ └── dashboard_serve.py # Threaded HTTP server
│ ├── cjk-viz/ # CJK font detection for matplotlib
│ │ └── SKILL.md
│ ├── svg-ui-templates/ # Professional SVG panels (list, checklist, pipeline, report)
│ │ ├── SKILL.md
│ │ ├── assets/ # 4 template SVGs
│ │ └── references/ # Template guide
│ └── feishu-rich-card/ # Send image-rich interactive cards in Feishu
│ ├── SKILL.md
│ └── references/ # send_card.py helper
├── scientific-skills/ # git submodule → K-Dense (140 skills)
├── data/ # Per-task data & analysis directories
│ └── <task_name>/
│ ├── dashboard/ # state.json + dashboard.html (auto-created)
│ └── output/ # Analysis outputs (CSV, PNG, etc.)
├── docs/ # Project documentation
├── docker-compose.yml
├── setup.sh
├── CLAUDE.md # Project instructions for Claude Code
├── .env.example
└── .gitmodules
MedgeClaw integrates with OpenClaw via a configuration-driven sync mechanism.
.medgeclaw-sync.yml defines what to syncsync.py reads the config and performs the sync.env defines paths (optional, auto-detected by default)Run python3 sync.py after:
skills/.medgeclaw-sync.ymlSee SYNC_README.md for details.
git submodule update --remote scientific-skills
Contributions welcome. The most valuable contributions are:
skills/biomed-dispatch/SKILL.md for better task routingskills/ (e.g., for specific clinical or lab workflows)Please follow the AgentSkills specification for any new skills.
ANTHROPIC_SMALL_FAST_MODEL fix for BashTool pre-flight)CLAUDE.md project instructions for Claude Code (docker exec execution model).ttc font rendering issuesmedgeclaw is a Claude Code plugin with 7 hand-picked skills, indexed on Flowy in the Research category. Install it with the command on its page. It includes biomed-dispatch, charls-reproduce, cjk-viz. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it