Building With Openmed logo

Building With Openmed

CommunityPopular
maziyarpanahi
building-with-openmed

Orient and bootstrap any project that uses OpenMed, the on-device clinical and biomedical NLP library, for named-entity recognition, PHI de-identification, FHIR export, and evaluation. Use when the user mentions OpenMed, wants to install it, asks which OpenMed capability or model fits a task, or is starting to build a clinical/medical text pipeline and needs the right entry point.

Overview

Publishermaziyarpanahi
Repositoryopenmed
Skill namebuilding-with-openmed
Stars
5.3K
Forks
677
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by maziyarpanahi on GitHub. Read the source before you install it.

Installation

Install the Building With Openmed AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/maziyarpanahi/openmed.git /tmp/openmed
mkdir -p .claude/skills
cp -r /tmp/openmed/skills/building-with-openmed .claude/skills/building-with-openmed
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Building With Openmed in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Building With Openmed on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Building With Openmed is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Building with OpenMed

OpenMed is an Apache-2.0, local-first Python library for clinical and biomedical NLP. Models download once from the Hugging Face Hub and then run fully on-device — no network calls, no telemetry, no raw PHI in logs, caches, or temp files. This skill is the map: it tells you what OpenMed can do and which focused skill (or API) to reach for next.

When to use this skill

Use it to scope a task and pick an entry point. For the actual work, hand off to the focused OpenMed skills (each is grounded in the real API):

TaskSkill / API
Find and load a modelloading-openmed-models, choosing-openmed-models
Run clinical/biomedical NERextracting-clinical-entities (openmed.analyze_text)
Zero-shot NER (no fine-tune)running-zeroshot-ner (openmed zero)
Remove / mask PHIdeidentifying-clinical-text (openmed.deidentify)
Detect PHI spans onlyextracting-pii-entities (openmed.extract_pii)
Restore masked PHIreidentifying-text (openmed.reidentify)
Pick a privacy policyconfiguring-privacy-policies (7 bundled profiles)
Non-English PHIdeidentifying-multilingual-text
Signed, no-PHI auditauditing-deidentification-runs (audit=True)
Negation / temporalityresolving-clinical-context (openmed.clinical)
Evaluate with leakage gatesevaluating-with-leakage-gates (openmed.eval)
FHIR R4 exportexporting-to-fhir (openmed.interop)
Serve REST / MCPserving-openmed-rest-api, deploying-openmed-mcp
Run on Apple Silicon / edgerunning-openmed-ondevice (MLX / CoreML / ONNX)

Install

bash
pip install openmed                 # core: NER + de-identification
pip install "openmed[hf]"           # add Hugging Face model downloads
pip install "openmed[mcp]"          # Model Context Protocol server
pip install "openmed[service]"      # FastAPI REST service
pip install "openmed[mlx]"          # Apple Silicon acceleration
pip install "openmed[presidio]"     # Microsoft Presidio bridge

Extras map to capabilities: cli, mcp, service, presidio, spacy, langchain, gliner (zero-shot), multimodal/ocr-paddle (document intake), mlx/coreml/onnx (on-device backends), hf (model hub), dev (tests/lint).

The three core calls

python
import openmed

# 1) Named-entity recognition (token classification)
result = openmed.analyze_text(
    "Patient prescribed 500 mg metformin for type 2 diabetes.",
    model_name="disease_detection_superclinical",  # registry key, HF id, or local path
    output_format="dict",                           # dict | json | html | csv
)

# 2) De-identify PHI (mask | remove | replace | hash | shift_dates)
deid = openmed.deidentify(
    "John Doe (MRN 12345) seen on 2024-03-02.",
    method="replace",
    policy="hipaa_safe_harbor",   # bundled policy profile
)
print(deid.deidentified_text)     # PHI removed; deid.pii_entities lists the spans

# 3) Detect PHI spans without changing the text
pii = openmed.extract_pii("Call Dr. Smith at 617-555-0123.")  # PredictionResult
spans = pii.entities                                          # the PHI spans

analyze_text and deidentify are the workhorses. Everything else (multilingual, audit, policies, FHIR, eval) layers on top of these.

Discover what is available at runtime

Never hardcode model lists or language counts — query them:

python
import openmed
openmed.list_model_categories()          # e.g. Privacy, Disease, Oncology, Genomics ...
openmed.get_models_by_category("Disease")
openmed.get_pii_models_by_language("es")
from openmed.core.pii_i18n import SUPPORTED_LANGUAGES   # de-id language set

CLI equivalents: openmed models list, openmed models info <key>, openmed analyze --text "<text>" --model <key> --format json. MCP/REST expose the same surface as tools (openmed_analyze_text, openmed_deidentify, openmed_list_models, …).

Non-negotiable rules when building with OpenMed

  • Local-first. Do not add cloud calls to PHI workflows. Models run on-device after a one-time download.
  • No raw PHI in artifacts. Logs, caches, audit reports, and error messages must use offsets, hashes, and labels — never plaintext identifiers. Use audit=True for tamper-evident, no-PHI audit output.
  • Permissive licensing only. Do not bundle UMLS, SNOMED CT, CPT, MIMIC, i2b2, or n2c2 assets. Call restricted terminologies out-of-process with the user's own credentials.
  • De-identification is verified, not assumed. Gate on leakage with openmed.eval, not on F1 alone (see evaluating-with-leakage-gates).
  • Clinical safety. OpenMed assists; it does not make autonomous clinical decisions. Surface disclaimers for any borderline medical-device behavior.

A typical pipeline

ingest (HL7v2 / FHIR / C-CDA / OCR)
   → de-identify (openmed.deidentify, policy=…)
   → extract entities (openmed.analyze_text)
   → ground to terminology (out-of-process: RxNorm / LOINC / SNOMED)
   → assemble FHIR (openmed.interop)
   → evaluate (openmed.eval leakage gates)

Each stage has a companion skill in this directory. Start here, then jump to the stage you need.

Frequently asked questions

What does the Building With Openmed AI skill do?

Orient and bootstrap any project that uses OpenMed, the on-device clinical and biomedical NLP library, for named-entity recognition, PHI de-identification, FHIR export, and evaluation. Use when the user mentions OpenMed, wants to install it, asks which OpenMed capability or model fits a task, or is starting to build a clinical/medical text pipeline and needs the right entry point.

Why use Building With Openmed on TypingMind?

Because you install it once and use it with any model. Building With Openmed is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Building With Openmed in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/maziyarpanahi/openmed/tree/master/skills/building-with-openmed. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Building With Openmed?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Building With Openmed?

As many as you like. As long as a model supports skills, you can use Building With Openmed with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Building With Openmed AI skill free?

Yes. It is published on GitHub by maziyarpanahi under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇