Medical Protocol v1.3.0 ES GitHub

v1.3.0

Clinical skills for Claude Code.

Describe a tool in plain clinical words. Claude Code copies tested logic into your project, builds the screen and checks it against made-up cases. The model never does the math.

/plugin marketplace add emdmed/medical-protocol
/plugin install medical-protocol@medical-protocol

Paste each line in Claude Code on your laptop, in order.

NeedsClaude Code, which comes with an Anthropic subscription, and Node.js. For learning and prototyping, not patient care. Your data stays on your laptop.

You type

> I need an ABG analyzer to study acid–base cases.

Built on your laptop Checked against made-up cases Case 1 · Match ✓ Case 2 · Match ✓ Case 3 · Match ✓ Case 4 · Match ✓ How it builds →

What it builds

Clinical modules · example patients are fictional

Each module is a validated piece of clinical logic. Ask for one, or combine several on one screen: vitals feeding into sepsis scoring, ABG next to fluid balance.

Vital signs

“A vital signs screen for a teaching case. Flag anything out of range.”

Case 4 · morning set
TimeBP mmHgHR bpmTemp °C
06:00104/6610438.1
07:0098/6211238.4
08:0092/58Low118High38.6Fever

Adult reference ranges · per-value alerts

Acid–base

“An ABG analyzer for a trauma teaching case, with anion gap.”

Case 2 · arterial gas
pH / pCO₂ / HCO₃7.25 / 30 / 12
DisorderMetabolic acidosis
Expected pCO₂24.0–28.0 mmHg
CompensationInadequateCheck

Winter's formula · Henderson–Hasselbalch check · anion gap, albumin-corrected · delta ratio

Fluid balance

“A 24-hour fluid balance for a 70 kg practice case, oral and IV in, urine and stools out.”

Case 7 · 24 h
IntakemLOutputmL
Oral1500Diuresis1200
IV500Stools240
Endogenous315Insensible840
Total2315Total2280

Net balance +35 mL.

Weight-based endogenous water and insensible losses

DKA monitoring

“Hourly glucose for a DKA practice case. Tell me if the drop is on target.”

Case 3 · glucose mg/dL
HourGlucoseFall /h
0412–
135062
228862.0On target

Glucose, ketone and bicarbonate rates · resolution criteria · potassium alerts

Sepsis

“qSOFA first, then the full SOFA, for a sepsis case.”

Sepsis case · quick SOFA
Respiratory rate24 /min
Systolic BP96 mmHg
GCS15
qSOFA2 / 3Positive

Sepsis-3 · SOFA-2, six organ systems · qSOFA (prognostic) · lactate clearance

PaO₂/FiO₂

“Classify ARDS severity from a practice gas.”

Case 5 · ventilated
PaO₂72 mmHg
FiO₂50 %
Ratio144Moderate ARDS

PaO₂/FiO₂ ratio · four-tier ARDS severity

Kidney (CKD)

“eGFR and staging for a CKD case, with kidney failure risk.”

Case · male, 64
Creatinine1.8 mg/dL
eGFR41.5 mL/min/1.73 m²
CategoryG3bModerate–severe

CKD-EPI 2021 · CGA staging · KFRE (4-variable) · RASi, SGLT2i, finerenone eligibility · anemia · CKD-MBD

Cardiology

“10-year cardiovascular risk for a practice case.”

Case · male, 55
Total / HDL cholesterol213 / 50 mg/dL
Systolic BP120 mmHg
ASCVD 10-year risk5.4 %Borderline

ASCVD pooled cohort · HEART score · CHA₂DS₂-VASc

Diabetes diagnosis

“Classify diabetes from A1C and fasting glucose, and screen in pregnancy.”

What it covers
DiagnosisA1C, FPG, OGTT criteria
Type 1 stagingStages 1–3
Type 1 vs type 2Clinical classification
GestationalOne-step and two-step screening

ADA Standards of Care 2026 · IADPSG · Carpenter–Coustan

BMI

“A BMI calculator, metric units.”

Example
Weight / height92 kg / 1.74 m
BMI30.4Obese I

WHO categories · metric and imperial

How it works

From request to working screen
  1. You describe it

    A trauma screen with vital signs, fluid balance and ABG.

  2. Claude asks three questions

    Where you see patients, one patient or several, and whether to keep data between sessions.

  3. Validated logic is copied in

    The clinical calculations go into your project unchanged. Nothing is rewritten on the fly.

  4. Every result is checked

    Before you see the screen, Claude opens it and runs test patients through it. Each result must match the built-in calculator. Ask for your own cases: Also check a 45 kg patient.

  5. You open it

    It runs in your browser. Others on the same network can open it on their tablets.

LaterChange it by asking. Add a lactate field. Put fluid balance next to the vitals.

Every screen is tested before you see it.

Checks

Claude writes a short list of test patients for each screen, opens it in a browser and enters them one by one. Each result must match the built-in calculator. When one does not, Claude fixes the screen and checks again.

Add your own cases in plain words: Also check a 45 kg, 1.60 m patient. If you expect a different result, Claude tells you which guideline the calculation follows. It never changes the clinical logic to match.

Test patients · BMI screen · fictional
  1. Adult, 70 kg, 1.75 m22.9 · Normal
  2. Adult, 130 kg, 1.75 m42.4 · Obese III
  3. Adult, 45 kg, 1.60 m added by you17.6 · Underweight
  4. Weight left emptyNo result, no error
  5. Opened on a tablet and a desktopNothing overlaps
  6. Used with the keyboard aloneEvery field reachable

6 of 6 checks passed. The list stays in your project and runs again after every change.

Point at a screen. Choose what happens.

Your app

Open an app you already use, even one built without Medical Protocol. Select any part of a screen: a form, a table, an empty corner. Then pick one of three actions.

Review
Checks that part of the screen against the clinical rules and reports what is missing. Changes nothing.
Rebuild
Replaces it with the validated version of the same tool.
Add
You type what you want there, such as a CKD anemia tracker, and Claude builds it in place.

Nothing changes until you approve. Rebuilds and additions are prepared first. You read the result next to the screen and press Apply to keep it.

Your data stays on this machine.

Privacy

The tools it builds run on your own computer. No accounts, no cloud database, no vendor server holding your data.

One thing to know. What you type to Claude Code is sent to Anthropic, like any conversation with Claude. Describe the tool in clinical terms and use made-up cases. Never type real patient details into the chat.

The plugin installs a privacy guard. It checks every terminal command Claude Code tries to run, before it runs.

Blocked
  • Uploading to a code hostgit push
  • Sending data to a websitecurl POST
  • Copying files to another machinescp, nc
  • Publishing packagesnpm publish
Allowed
  • Installing what the tool needsnpm install
  • Running the tool locallynpm run dev
  • Saving versions on your machinegit add, git commit
  • Downloading referencescurl GET

Install

Two ways in · same plugin
Before you start
  • Claude Code, with an Anthropic subscription.
  • Node.js on your computer, to run the tools it builds.
  • macOS, Windows or Linux. No coding, no server.

From Claude Code

/plugin marketplace add emdmed/medical-protocol
/plugin install medical-protocol@medical-protocol
  1. Open Claude Code in an empty folder and paste the two lines above.
  2. Type /medical-protocol:start and say what you need.
  3. Open the tool in your browser. Ready in minutes.

Uses the plugin marketplace. Installs once for every project you open.

Already installed?

claude plugin marketplace update medical-protocol
claude plugin update medical-protocol@medical-protocol

Run both in a terminal, then restart Claude Code. That gets you the newest version.

What it is not

An educational project for learning and experimentation only. Do not use it, or the tools it builds, for real patient care, diagnosis or treatment. Not a medical device, not certified by any regulator, and no warranty of any kind.

New

Paste a practice note. Get the values, each with its source.

Type /medical-protocol:extract in Claude Code. It opens a page on your own computer: paste a note and get the vital signs and labs, each with the words it came from. A second check re-reads the note and flags any value it does not say. Only quoted values reach the calculators.

Nothing leaves without your yes. The note is sent to the model only after you tick the box and press Extract. Use it only for notes without real patient data.

Trailer · 25 s · no sound · fictional note
  1. The extraction page in the browser, empty. Left: What happens next, with three numbered steps: Pull out the values, Second check, You review. Right: an empty box labelled Paste the note here, a consent tick box and an Extract button that is switched off.

    1 · Open the page. Claude Code starts it on your computer and gives you the address, usually http://localhost:7332. The left side lists the three steps that follow.

  2. The same page with a fictional nephrology follow-up note pasted in the box, 26 lines. The box under it is ticked: This note is sent to the AI model, which runs on external servers. I confirm it is made up or de-identified. The Extract button is now on.

    2 · Paste the note and tick the box. Use a made-up or de-identified note. Nothing is sent until you press Extract, and the button stays off until the box is ticked.

  3. Working on your note, 6 seconds in. Step 1, Pull out the values, is running. Steps 2 and 3 wait. The note as written is on the right.

    3 · The values are pulled out. Each value is copied with the exact words it came from. It usually takes a minute or two, and the page updates by itself.

  4. Working on your note, 1 minute 5 seconds in. Step 1 has a tick. Step 2, Second check, is running. Step 3, You review, waits.

    4 · A second check re-reads the note. A separate run compares the list with the note and proposes corrections where it finds a mistake.

  5. The finished extraction. The bar on top reads 81 of 81 found word for word. Left: the values under Current illness, such as age 68, systolic blood pressure 138 mmHg, heart rate 72 and weight 89 kg. Right: the note as written, with the words each value came from highlighted.

    5 · You review. The values are on the left and the note on the right, with the words each value came from highlighted. The count on top says how many were found word for word. If the second check proposed corrections, they come first: accept each one or keep the original.

  6. The Calculated section under the extracted values: body mass index 30.8, eGFR from creatinine 29, CKD staging G4 A3, kidney failure risk 7.6 % in 2 years and 26.2 % in 5 years, each drawn on a scale with its published source. A line on top says they are worked out from the values, not in the note, for learning and prototyping, never patient care.

    6 · The calculations appear under the values. Once every correction is answered, the page works out what the values allow, here BMI, eGFR, CKD staging and kidney failure risk, each with its source. They are marked as not in the note. Copy extraction JSON takes the result to your prototype.

Engineering

For engineers building in health

One source of clinical logic. Pure TypeScript in plugin/lib/, no framework dependencies. The CLI imports it, and every generated project gets an unmodified copy at lib/medprotocol/. There are no forks to drift.

Tests
1128 passing across 38 files (Vitest, v1.3.0)
CLI
node plugin/scripts/medprotocol.cjs, shipped inside the plugin, same logic, --json on every command
Generated UI
React 19 with UI SDK, unstyled, in your own project
Browser QA
One recipe per screen in qa/recipes/; a Haiku qa-runner agent drives it in the browser, expected values come from --json, fixes loop until it passes
Overlay
medprotocol overlay --serve: select any element in any app, then audit, implement or add a component; diffs stay staged until approved
Privacy guard
PreToolUse hook in plain Node, identical on every OS
$ medprotocol abg --ph 7.25 --pco2 30 --hco3 12

ABG Analysis
────────────
  Disorder        Metabolic Acidosis
  Compensation    Inadequate compensation
  Interpretation  Primary Metabolic Acidosis, with
                  Inadequate compensation by
                  Respiratory Alkalosis.
  Expected range  24.0–28.0

$ medprotocol pafi --pao2 72 --fio2 50

PaFi Calculator
───────────────
  PaFi Ratio      144
  Classification  Moderate ARDS
vitalsabgwater-balancedkasepsispafickdcardiologydiabetesbmi

Index of methods

Select a method to open its module