Dr. Ralph - AI-assisted medical diagnostics with comprehensive symptom analysis and research-backed treatment plans
npx claudepluginhub blencorp/dr-ralphImplementation of the Dr. Ralph technique - continuous self-referential AI loops for interactive iterative development. Run Claude in a while-true loop with the same prompt until task completion.
A Claude Code plugin for AI-assisted medical diagnostics with comprehensive symptom analysis and research-backed treatment plans.
Disclaimer: This software is for informational and educational purposes only. It is NOT a substitute for professional medical advice. See full disclaimer.
Dr. Ralph provides a structured 5-phase diagnostic workflow:
Interview → Research → Differential Diagnosis → Treatment Plan → SOAP Report
It uses Claude Code's Stop hook system to iterate through phases until reaching a convincing diagnosis with research-backed treatment recommendations.
/dr-ralph:diagnose "Persistent fatigue and joint pain" --patient "John Doe"
claude plugin marketplace add blencorp/dr-ralph
claude plugin install dr-ralph
git clone [email protected]:blencorp/dr-ralph.git
claude --plugin-dir /path/to/dr-ralph
Add to .claude/settings.json:
{
"marketplaces": ["blencorp/dr-ralph"],
"plugins": {
"dr-ralph@blencorp": "enabled"
}
}
/dr-ralph:help
See the Claude Code plugins documentation for more details.
Full diagnostic workflow with 5 phases.
/dr-ralph:diagnose "I've been having back pain for 3 months" --patient "John Doe"
/dr-ralph:diagnose "Headaches and dizziness" --questions 20
Options:
| Flag | Default | Description |
|---|---|---|
--patient <name> | anonymous | Patient name for case file |
--questions <n> | 15 | Maximum interview questions |
--output <dir> | @notes/ | Directory for case files |
--max-iterations <n> | unlimited | Max iterations before auto-stop |
--completion-promise <text> | none | Phrase that signals completion |
Output Files:
@notes/[patient].md - Running notes (persists across sessions)@notes/[patient]-report-[timestamp].md - Final SOAP reportCancel an active diagnostic session.
/dr-ralph:cancel
| Phase | Description |
|---|---|
| 1. Interview | Medical records intake first, then comprehensive symptom questions |
| 2. Research | Web search for literature, iterative refinement |
| 3. Differential | Confidence-based diagnosis (>80% = single, else top 3-5) |
| 4. Treatment | Action plan with urgency levels and follow-up schedule |
| 5. Report | SOAP format with executive summary |
Medical Records Handling:
Diagnosis Output:
@notes/
├── john-doe.md # Patient notes (grows over time)
├── john-doe-report-20240105.md # SOAP report
├── jane-smith.md
└── anonymous.md # Default if no --patient specified
--patient flag# Patient Report: John Doe
## Date: 2024-01-05
## Executive Summary
[2-3 paragraph overview]
## Subjective
[Patient's reported symptoms]
## Objective
[Research findings with citations]
## Assessment
[Diagnosis or differential with confidence]
## Plan
[Treatment plan with urgency levels]
## Detailed Findings
[Full interview, research, reasoning]
## References
[Cited sources]
Use --max-iterations as a safety net:
/dr-ralph:diagnose "Symptoms" --max-iterations 10 --completion-promise DONE
Use --patient to maintain continuity across sessions:
Official prompts.chat marketplace - AI prompts, skills, and tools for Claude Code
Open Design — local-first design app exposed to coding agents over MCP. Install once with your agent's plugin command and projects/files/skills are reachable through stdio.
Behavioral guidelines to reduce common LLM coding mistakes, derived from Andrej Karpathy's observations