OpenMed is local-first healthcare AI software that extracts clinical information and removes personally identifying details from clinical text on hardware controlled by the user. Healthcare developers use its Python runtime, Apple Silicon and mobile SDKs, and browser support for on-device clinical NER and PII de-identification.
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.
npx skills add maziyarpanahi/openmed --skill ingesting-clinical-documentsgit clone --depth 1 https://github.com/maziyarpanahi/openmedWrote 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.
[](https://agentmods.dev/skills/maziyarpanahi/openmed/ingesting-clinical-documents)<a href="https://agentmods.dev/skills/maziyarpanahi/openmed/ingesting-clinical-documents"><img src="https://agentmods.dev/badge/skills/maziyarpanahi/openmed/ingesting-clinical-documents/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/maziyarpanahi/openmed/ingesting-clinical-documents"><img src="https://agentmods.dev/badge/skills/maziyarpanahi/openmed/ingesting-clinical-documents.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00151 | $0.02080 |
| Opus 5 | $0.00076 | $0.01040 |
| Sonnet 5 | $0.00030 | $0.00416 |
| Haiku 4.5 | $0.00015 | $0.00208 |
Grade A, and why
ingesting-clinical-documents 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 10d 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.
How it starts
The opening of the file, as written. The whole thing — 185 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Ingesting Clinical Documents
Clinical text often arrives as scanned faxes, photographed notes, CSV exports, or
C-CDA XML — not plain text. openmed.multimodal converts these into a normalized
ExtractedDocument (clean text + character-offset → source-location spans) so you
can run de-identification and NER. It runs on-device: OCR backends are local,
no document leaves the machine.
When to use
- You have images / scanned faxes of clinical notes and need text out (OCR).
- You have CSV/TSV patient exports that need column-aware handling.
- You have C-CDA XML to flatten into text.
- You are building the intake stage that feeds
openmed.deidentifyandopenmed.analyze_text.
This is the first stage. After intake, hand off to
deidentifying-clinical-text then extracting-clinical-entities.
What is supported today
redact_document dispatches by file extension. Live handlers:
| Input | Extensions | Path |
|---|---|---|
| Images / scans | .png .jpg .jpeg .tif .tiff .bmp .gif .webp |
OCR (ocr() / image handler) |
| Tables | .csv .tsv |
column-aware tabular redaction |
| C-CDA | .xml (detected as CDA) |
stdlib CDA adapter |
PDF and DOCX have no live handler yet — redact_document("x.pdf") raises
UnsupportedDocumentError. Convert PDFs to page images first (or to text with your
own tool) and feed the images through OCR. See
references/multimodal-ingest.md for the full
contract, engines, and the tabular pipeline.
Install
pip install "openmed[multimodal]" # document intake contract + image deps
pip install "openmed[ocr-paddle]" # add the PaddleOCR engine
# Tesseract engine also needs the system binary, e.g.: brew install tesseract
Quick start: OCR an image, then de-identify
The clean two-step intake path. ocr() lives in the submodule (it is intentionally
not re-exported from openmed.multimodal):
from openmed.multimodal.ocr import ocr
import openmed
# 1) OCR a scanned/faxed note -> OcrResult -> ExtractedDocument -> plain text
result = ocr("fax_page.png", engine=None) # None = auto-select an installed engine
doc = result.to_document() # ExtractedDocument
text = doc.text # clean text for downstream OpenMed
# 2) De-identify, then run NER (privacy-first order)
deid = openmed.deidentify(text, method="mask", policy="hipaa_safe_harbor")
ner = openmed.analyze_text(deid.deidentified_text, output_format="dict")
for ent in ner.entities:
print(ent.label, ent.text, ent.confidence)
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 10d ago First seen · 185 lines · 151 tokens per session scan A f3db6a26a682
ingesting-clinical-documents is a skill published in the GitHub repository maziyarpanahi/openmed (5,282 stars, last pushed yesterday), licensed Apache-2.0. It adds 151 tokens to every session and 2,080 once invoked, about $0.0008 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.
Other skills, from other repositories
benchmarking
Use this skill when the user wants to benchmark an MLX-VLM change and present the numbers in a PR — fork-vs-main A/B comparisons, isolated-module micro-benchmarks, median-of-N timing with warmup, peak-memory reporting, correctness checks, parameter sweeps, and self-contained reproducible bench scripts to paste into a…
paper-length-gate
Deterministic artifact-backed manuscript readiness gate for meta-paper-write. Validates the workspace LaTeX artifact before compilation while leaving final page-count enforcement to compilepdf.
paper-plot-stub
Plot a results CSV (x, ybaseline, yours) as a two-line matplotlib chart and write a PDF. Demo-only.
latex-compile
Compile a LaTeX document and fix every error plus aesthetic issue (overfull/underfull boxes, widows, alignment, fonts) for a clean PDF and log. Use this instead of running pdflatex/latexmk manually — it avoids the latexmk stale-log trap and silent grep failures on binary log output, and it reformats rather than…
6verity
A final-checking workflow for mathematical modelling competition papers, using either Typst or LaTeX to build the document. It checks the finished paper and its supporting files before submission.
figure-drawing
MANDATORY skill for creating any figure, diagram, chart, table visualization, or TikZ graphic in a paper. Must be activated BEFORE writing any drawing code. Produces standalone .tex → compiled PDF/PNG → \includegraphics in paper. Never inline TikZ code directly into paper sections.