Helps find and select the right OpenMed clinical NER model by category, language, or task. Use when users need to discover models for diseases, oncology, PII, or other biomedical entities before loading them.
Ships in openmed-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
OpenMed ships a registry of clinical and biomedical NER models grouped into 12 categories. Never hardcode a model list — query the registry at runtime so your code stays correct as models are added. This skill helps you go from "I need to find diseases in Spanish discharge notes" to a concrete model key.
Once you have a key, hand off to loading-openmed-models to load it.
pip install openmed # registry queries work without the [hf] extra
import openmed
# 1) The 12 categories
openmed.list_model_categories()
# ['Medical', 'Privacy', 'Anatomy', 'Hematology', 'Chemical', 'Disease',
# 'Genomics', 'Oncology', 'Species', 'Pathology', 'Pharmaceutical', 'Protein']
# 2) Models in a category -> list[ModelInfo]
for m in openmed.get_models_by_category("Disease"):
print(m.model_id, "|", m.size_category, "|", m.entity_types)
# 3) Inspect one model before loading
info = openmed.get_model_info("OpenMed/OpenMed-NER-DiseaseDetect-BigMed-278M")
print(info.display_name, info.task, info.param_count, info.license)
get_models_by_category and get_all_models return ModelInfo objects.
get_all_models() returns a dict[str, ModelInfo] keyed by registry key.
ModelInfo tells youEvery model exposes (real attributes):
model_id # HF repo id, e.g. "OpenMed/OpenMed-NER-DiseaseDetect-BigMed-278M"
display_name # human-friendly name
category # one of the 12 categories
specialization # e.g. "disease entity detection"
entity_types # list[str] of labels the model emits, e.g. ["DISEASE", ...]
size_category # "Tiny" | "Small" | "Medium" | "Large" | "XLarge"
recommended_confidence # suggested confidence_threshold for this model
family # "NER" | "PII" | ...
task # "token-classification"
languages # e.g. ["en"], ["es"]
param_count # e.g. 278000000
license # e.g. "apache-2.0"
Use entity_types to confirm the model emits the labels you need, and
recommended_confidence as a sensible default confidence_threshold.
import openmed
# Disease conditions in a general clinical note:
disease = openmed.get_models_by_category("Disease")
# e.g. "OpenMed/OpenMed-NER-DiseaseDetect-BigMed-278M"
# "OpenMed/OpenMed-NER-DiseaseDetect-BioClinical-108M" (smaller/faster)
# Tumors, staging, oncologic findings -> Oncology, not Disease:
onco = openmed.get_models_by_category("Oncology")
# e.g. "OpenMed/OpenMed-NER-OncologyDetect-BigMed-278M"
# PHI / PII detection -> Privacy category:
privacy = openmed.get_models_by_category("Privacy")
Rule of thumb: bigger (278M/560M) = more accurate, slower; smaller (108M, "Small"/"Tiny") = faster, edge-friendly. Start with a mid-size model and size up only if recall is short.
import openmed
# All PII models for Spanish -> dict[str, ModelInfo]
es_models = openmed.get_pii_models_by_language("es")
# The recommended default PII model id for a language:
default_es = openmed.get_default_pii_model("es")
print(default_es) # HF repo id, or None if unsupported
deidentify(..., lang="es") and extract_pii(..., lang="es") already select an
appropriate default — use these helpers when you need to override or to confirm
coverage. Supported de-id languages live in
openmed.SUPPORTED_LANGUAGES (en es pt fr de it nl hi te ar tr ja).
ModelQueryFor filtering by task, language, size, or tier, use the typed search:
from openmed import search_models, ModelQuery
results = search_models(ModelQuery(
task="token-classification",
language="en",
max_params=200_000_000, # keep it small for on-device
license="apache-2.0",
))
for r in results:
print(r.repo_id, r.param_count, r.languages, r.formats)
Each result is a ModelSearchResult with fields like repo_id, family, task,
languages, tier, param_count, architecture, base_model, formats,
canonical_labels, license, and released. ModelQuery filters include
task, language, tier, max_params, min_params, format, license, and a
free-text query.
import openmed
for key, info, reason in openmed.get_model_suggestions(
"Stage III adenocarcinoma with metastasis to regional lymph nodes."
):
print(key, "->", reason)
get_model_suggestions(text) returns (registry_key, ModelInfo, reason) tuples —
handy when the domain is unclear from the request.
openmed models list # registry keys (add --include-remote to query the Hub)
openmed models info <registry-key> # max sequence length for a key
openmed analyze --text "Stage III adenocarcinoma." --model oncology_detection_bigmed_278m
loading-openmed-models: pass the chosen model_id/registry key as
model_name= to ModelLoader.load_model(...) or openmed.analyze_text(...).extracting-clinical-entities: use the model's recommended_confidence
as your confidence_threshold and verify entity_types matches your schema.get_default_pii_model(lang) into
openmed.deidentify(model_name=..., lang=...).import openmed
key = "oncology_detection_bigmed_278m"
info = openmed.get_model_info(key)
result = openmed.analyze_text(
"Stage III adenocarcinoma with nodal metastasis.",
model_name=key,
confidence_threshold=info.recommended_confidence,
)
entity_types if unsure which fits.get_default_pii_model(lang) can return None for an unsupported language —
fall back to a supported one and warn, do not silently use English on non-English
text.search_models reads a committed manifest, so it only returns models that
have been catalogued — combine with get_all_models() for the full registry.entity_types / canonical_labels.openmed.CANONICAL_LABELS (see
extracting-pii-entities).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/openmed-skills:choosing-openmed-modelsfrom openmed-skills
npx claudepluginhub maziyarpanahi/openmed --plugin openmed-skills74 skills in this plugin
/annotating-variantsAnnotates VCF variants and normalizes HGVS nomenclature with public, license-free annotators (Ensembl VEP REST, VEP/SnpEff/ANNOVAR offline) and links variants to gnomAD population frequencies and the clinical context OpenMed extracts. Use when the user wants to predict variant consequences, map HGVS to genomic coordinates, annotate a VCF, attach allele frequencies, or pair variants with phenotype/oncology context. Trigger keywords: VCF, HGVS, variant annotation, VEP, SnpEff, ANNOVAR, consequence, missense, gnomAD, allele frequency, GRCh38, rsID, transcript. Pairs adjacent to OpenMed: combine annotated variants with Genomics/Oncology entities and phenotype from openmed.analyze_text. Tools used are free; restricted clinical databases are user-supplied./ask-openmedChoose the first OpenMed workflow skill for an intake, privacy, extraction, exchange, or verification request using deterministic local routing. Use when a goal is broad, spans several clinical-data stages, or leaves the data-sensitivity status unclear; the privacy gate is selected before downstream work when raw clinical or personal content may be present./assembling-fhir-bundlesPackage multiple FHIR R4 resources produced from OpenMed output into a single valid transaction Bundle ready to POST to an EHR, using OpenMed's verified bundle assembler openmed.clinical.exporters.fhir.to_bundle. Covers deterministic urn:uuid fullUrls, automatic in-Bundle reference rewriting, request blocks (method/url) for transaction vs batch, and conditional create. Use after exporting-to-fhir when the user has several Condition/Observation/MedicationStatement resources and wants one transaction Bundle, mentions Bundle, transaction, references, or posting to a FHIR server. Builds on exporting-to-fhir; pairs after.Other plugins' skills for the same job