annotating-variants
Annotates VCF variants and normalizes HGVS nomenclature with public, license-free annotators…
Generate a model card for an OpenMed clinical NER or de-identification model documenting intended use, quantitative metrics, subgroup performance, limitations, and a medical-device disclaimer for clinical AI governance. Use when the user wants to write or update a model card, a
$ npx -y skills add maziyarpanahi/openmed --skill authoring-model-cards --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/authoring-model-cardsContext preview
The summary Claude sees to decide when to auto-load this skill.
Generate a model card for an OpenMed clinical NER or de-identification model documenting intended use, quantitative metrics, subgroup performance, limitations, and a medical-device disclaimer for clinical AI governance. Use when the user wants to write or update a model card, a
name: authoring-model-cards description: "Generate a model card for an OpenMed clinical NER or de-identification model documenting intended use, quantitative metrics, subgroup performance, limitations, and a medical-device disclaimer for clinical AI governance. Use when the user wants to write or update a model card, a README model section, or governance documentation, or to turn OpenMed eval outputs (release gate report, fairness_report, error_report) into the card's metrics and limitations sections. Trigger on \"model card\", \"intended use\", \"model documentation\", \"governance\", \"limitations section\", \"datasheet\", or \"FDA/ONC transparency\" for an OpenMed model." license: Apache-2.0 metadata: project: OpenMed category: evaluation-quality pairs: after version: "1.0"
A model card is the honest spec sheet for a model: what it's for, how well it works, where it breaks, and who it might fail. For clinical models this is governance-critical — an undocumented de-id model is one nobody can sign off on. This skill fills a model card directly from OpenMed eval outputs so the numbers are reproducible, not aspirational.
need to turn them into intended-use, metrics, and limitations sections.
Run the evals **first** (see `evaluating-with-leakage-gates`, `benchmarking-clinical-ner`, `auditing-subgroup-fairness`); this skill documents their results — it does not generate the numbers.
See `references/model-card-sections.md` for the full section-to-source map. The load-bearing sections for an OpenMed model:
(Apache-2.0). Pull from the `GateReport` identity fields.
clinical decisions; de-id is verified, not assumed.
recall floors and the gate decision.
`fairness_report`, including which groups lack data.
from openmed.eval import (
run_suite, ReleaseGate, fairness_report, error_report,
)
report = run_suite("eval/gold/test.json", suite="golden",
model_name="OpenMed/Privacy-PII-Detection", device="cpu",
metadata={"family": "PII", "tier": "base",
"policy": "hipaa_safe_harbor"})
gate = ReleaseGate(milestone="v1.6", policy="hipaa_safe_harbor").evaluate(report)
fair = fairness_report("OpenMed/Privacy-PII-Detection", "golden")
errs = error_report("OpenMed/Privacy-PII-Detection", "eval/gold/test.json")
card = {
"model_details": {
"repo_id": gate.repo_id, "family": gate.family, "tier": gate.tier,
"format": gate.format, "license": "Apache-2.0",
},
"metrics": {
"exact_span_f1": report.metrics["exact_span_f1"]["f1"],
"residual_leakage_rate": gate.residual_leakage_rate,
"critical_leakage_count": gate.critical_leakage_count,
"per_label_recall": dict(gate.per_label_recall),
"release_decision": gate.decision, # RELEASABLE / QUARANTINED
},
"subgroup_analysis": fair.to_dict(), # per-group leakage/recall
"limitations": errs.to_dict()["confusion_matrix"],
}
# Render `card` into Markdown front matter + body (or the HF card template).`error_report` and `fairness_report` carry no plaintext PHI (offsets + hashes), so their output is safe to paste into a public card.
1. **Gather artifacts.** Gate report, fairness report, error report — all from a pinned model + synthetic eval set. 2. **Fill model details** from the `GateReport` identity fields so the card, `models.jsonl`, and the README cannot drift (the gate's `manifest_coherence` and `model_card` checks enforce this). 3. **Write intended use narrowly.** Name the clinical task, language(s), and the deployment envelope. Over-broad intended-use is the most common card failure. 4. **State out-of-scope and the disclaimer** plainly (see template below). 5. **Report metrics with their floors.** For de-id, lead with leakage and the gate decision, not F1. 6. **Report subgroups honestly**, including the documentation gap: if race/ ethnicity isn't available, say so rather than implying parity. 7. **List limitations from real errors**, not boilerplate — cite the confusion matrix's worst cells.
> This model assists clinical text processing and is **not a medical device**. > It does not make autonomous clinical decisions. De-identification output must be > independently verified before any data is shared; residual PHI risk is never > zero. Validate on your own population before deployment.
`benchmarking-clinical-ner` (`error_report`), and `auditing-subgroup-fairness` (`fairness_report`): these are the card's evidence.
(license, task, languages) coherent with the manifest — the gate checks it.
release evidence.
trace to an eval artifact and a pinn
Local-first healthcare AI: clinical NER and HIPAA PII de-identification on hardware you control. 2,200+ medical models, 35 model-backed PII languages, and Python, MLX, Android and browser runtimes. Apache-2.0 SDK.
Repo: maziyarpanahi/openmed
Annotates VCF variants and normalizes HGVS nomenclature with public, license-free annotators…
Choose the first OpenMed workflow skill for an intake, privacy, extraction, exchange, or…
Package multiple FHIR R4 resources produced from OpenMed output into a single valid…
Adversarially scan already-de-identified clinical text for residual identifiers and emit a…
Produce a signed, reproducible, no-PHI audit trail for an OpenMed de-identification run via…
Generates and verifies 21 CFR Part 11-style audit trails — who/what/when, electronic…