sofa-score

sofa-score is a skill for Claude Code, Codex from hannesill/m4. It costs 41 tokens per session (1,322 once invoked), scanned A, original, MIT.

A clinical scoring guide for SOFA, the Sequential Organ Failure Assessment used in intensive care to measure dysfunction in six organ systems. It assigns points from 0 to 4 for each system and combines them into a total score.

In plain words
What is it for?
Use it to calculate SOFA or delta-SOFA scores, assess organ dysfunction for Sepsis-3, and compare severity or mortality risk between patient groups.
Why use it?
It removes the need to reconstruct the scoring thresholds when assessing sepsis or organ failure. It also helps compare a patient’s current condition with an earlier measurement.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/hannesill/m4/sofa-score
Any agent
npx skills add hannesill/m4 --skill sofa-score
Clone the repo
git clone --depth 1 https://github.com/hannesill/m4

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sofa-score

README.md
[![agentmods](https://agentmods.dev/badge/skills/hannesill/m4/sofa-score.svg)](https://agentmods.dev/skills/hannesill/m4/sofa-score)
Your own site
<a href="https://agentmods.dev/skills/hannesill/m4/sofa-score"><img src="https://agentmods.dev/badge/skills/hannesill/m4/sofa-score.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,322 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.01322
Opus 5 $0.00020 $0.00661
Sonnet 5 $0.00008 $0.00264
Haiku 4.5 $0.00004 $0.00132

Measured 6d ago against content hash 5acd134682d7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

sofa-score scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

benchmark/tasks/apsiii/mimic-apsiii-24h-raw/skills-decoy/sofa-score/SKILL.md · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SOFA Score Calculation

The Sequential Organ Failure Assessment (SOFA) score quantifies organ dysfunction across 6 systems. Each component scores 0-4, with a total range of 0-24. Higher scores indicate greater organ dysfunction.

M4Bench Use

In M4Bench, target concept tables listed in the task configuration are removed or unavailable in the agent database. Use this skill as procedural guidance and derive the requested output from available source or intermediate tables; do not rely on a precomputed target table or bundled SQL script.

When to Use This Skill

  • User asks about SOFA score calculation
  • Sepsis-3 criteria assessment (SOFA >= 2 indicates organ dysfunction)
  • Mortality prediction or severity stratification
  • Comparing organ dysfunction between cohorts
  • Calculating delta-SOFA (change from baseline)

Components and Scoring

System 0 1 2 3 4
Respiration (PaO2/FiO2 mmHg) >= 400 < 400 < 300 < 200 + respiratory support < 100 + respiratory support
Coagulation (Platelets x10^3/uL) >= 150 < 150 < 100 < 50 < 20
Liver (Bilirubin mg/dL) < 1.2 1.2-1.9 2.0-5.9 6.0-11.9 >= 12.0
Cardiovascular No hypotension MAP < 70 Dopa <= 5 or Dob Dopa > 5 or Epi <= 0.1 or Norepi <= 0.1 Dopa > 15 or Epi > 0.1 or Norepi > 0.1
CNS (GCS) 15 13-14 10-12 6-9 < 6
Renal (Creatinine mg/dL or UO) < 1.2 1.2-1.9 2.0-3.4 3.5-4.9 or UO < 500 >= 5.0 or UO < 200

Note: Vasopressor doses are in mcg/kg/min. UO is urine output in mL/day.

Required Tables for Custom Calculation

  • mimiciv_icu.icustays - ICU stay identifiers
  • mimiciv_icu.chartevents - vitals, GCS components, ventilation settings, weight
  • mimiciv_hosp.labevents - blood gas, creatinine, bilirubin, platelets
  • mimiciv_icu.inputevents - vasopressor infusions
  • mimiciv_icu.outputevents - urine output

Critical Implementation Notes

  1. Time Window: The score uses the worst value in a 24-hour rolling window. SOFA calculated at hour 24 uses data from hours 0-24.

Read the full file on GitHub · 71 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 71 lines · 41 tokens per session scan A 5acd134682d7

Subscribe to this mod's changes

sofa-score is a skill published in the GitHub repository hannesill/m4 (43 stars, last pushed 1mo ago), licensed MIT. It adds 41 tokens to every session and 1,322 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

arbor-agent-orchestrator

Top-level controller for recreating the open-source AutoResearch workflow as a suite of skills. Use when the user asks to run, emulate, extract, validate, or refine Arbor/AutoResearch behavior, especially when a coordinator must load phase skills for setup, ideation, executors, merge evaluation, novelty search…

RUC-NLPIR/Arbor · 77 tokens

dfam-check

Measure mesh files against Design for Additive Manufacturing (DfAM) rules and report printability findings per process (FDM, SLS, SLA/DLP, metal PBF, MJF). Use when the user asks whether a part is printable, wants overhang/wall-thickness/support analysis of an .stl, .obj, .ply, or .3mf mesh, wants a build-orientation…

earthtojake/text-to-cad · 111 tokens

tooluniverse-gene-enrichment

Gene-set enrichment analysis — GO (Biological Process, Molecular Function, Cellular Component), KEGG, Reactome pathway enrichment via clusterProfiler, gseapy, ORA, GSEA. Use for interpreting DEG lists, screen hit lists, or any gene-list-to-pathways query. Includes simplify-cutoff handling and union-vs-total…

mims-harvard/ToolUniverse · 82 tokens

tooluniverse-phylogenetics

Phylogenetic analysis — de novo multiple sequence alignment (Clustal Omega/MUSCLE/MAFFT via EBImsaalign) and neighbour-joining/UPGMA tree building (EBIbuildphylogenetictree) from your own sequences, plus tree analysis, treeness, saturation (PhyKIT), parsimony-informative sites, alignment gap analysis, DVMC…

mims-harvard/ToolUniverse · 155 tokens

tooluniverse-pharmacogenomics

Pharmacogenomics (PGx) research — drug-gene interactions (CPIC, PharmGKB), CPIC dosing guidelines, variant-drug-response associations, ethnic-allele-frequency considerations, and metabolizer-status scoring. Use for PGx-informed dosing recommendations, CYP/HLA pharmacogenomic allele interpretation, and…

mims-harvard/ToolUniverse · 80 tokens

tooluniverse-population-genetics

Population genetics analysis — allele frequencies (gnomAD, 1000 Genomes), Hardy-Weinberg equilibrium testing, Fst between populations, GWAS associations, evolutionary constraint scores. Use for cross-population variant comparison, ancestry-aware allele frequency lookups, and population-level evolutionary analysis.

mims-harvard/ToolUniverse · 66 tokens