pydicom DICOM Toolkit
davila7/claude-code-templates
Reads, edits, anonymizes and converts DICOM medical imaging files with pydicom, including pixel data extraction and compressed transfer syntaxes.
Finds social risks such as housing instability or food insecurity in clinical notes and proposes matching ICD-10-CM Z-codes for a coder to confirm.
$ npx skills add maziyarpanahi/openmed --skill extracting-sdoh -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install maziyarpanahi/openmed extracting-sdoh --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/maziyarpanahi/openmed.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/extracting-sdoh .claude/skills/extracting-sdoh && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "extracting-sdoh" agent skill from https://github.com/maziyarpanahi/openmed/tree/master/skills/extracting-sdoh into .claude/skills/extracting-sdoh/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "extracting-sdoh", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/maziyarpanahi/openmed/tree/master/skills/extracting-sdohType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add maziyarpanahi/openmed --skill extracting-sdoh -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install maziyarpanahi/openmed extracting-sdoh --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/maziyarpanahi/openmed.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/extracting-sdoh .agents/skills/extracting-sdoh && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "extracting-sdoh" agent skill from https://github.com/maziyarpanahi/openmed/tree/master/skills/extracting-sdoh into .agents/skills/extracting-sdoh/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "extracting-sdoh", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add maziyarpanahi/openmed --skill extracting-sdoh -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install maziyarpanahi/openmed extracting-sdoh --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/maziyarpanahi/openmed.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/extracting-sdoh .cursor/skills/extracting-sdoh && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "extracting-sdoh" agent skill from https://github.com/maziyarpanahi/openmed/tree/master/skills/extracting-sdoh into .cursor/skills/extracting-sdoh/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "extracting-sdoh", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/maziyarpanahi/openmed.git --path skills/extracting-sdoh--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add maziyarpanahi/openmed --skill extracting-sdoh -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install maziyarpanahi/openmed extracting-sdoh --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/maziyarpanahi/openmed.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/extracting-sdoh .gemini/skills/extracting-sdoh && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "extracting-sdoh" agent skill from https://github.com/maziyarpanahi/openmed/tree/master/skills/extracting-sdoh into .gemini/skills/extracting-sdoh/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "extracting-sdoh", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install maziyarpanahi/openmed extracting-sdohInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add maziyarpanahi/openmed --skill extracting-sdoh -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/maziyarpanahi/openmed.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/extracting-sdoh .github/skills/extracting-sdoh && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "extracting-sdoh" agent skill from https://github.com/maziyarpanahi/openmed/tree/master/skills/extracting-sdoh into .github/skills/extracting-sdoh/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "extracting-sdoh", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add maziyarpanahi/openmed --skill extracting-sdoh -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install maziyarpanahi/openmed extracting-sdoh --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/maziyarpanahi/openmed.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/extracting-sdoh .opencode/skills/extracting-sdoh && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "extracting-sdoh" agent skill from https://github.com/maziyarpanahi/openmed/tree/master/skills/extracting-sdoh into .opencode/skills/extracting-sdoh/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "extracting-sdoh", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
extracting-sdohFinds social risks such as housing instability or food insecurity in clinical notes and proposes matching ICD-10-CM Z-codes for a coder to confirm.
Run after OpenMed named-entity recognition, this skill pulls social determinants of health out of free-text clinical notes and links each finding to a code in the ICD-10-CM Z55–Z65 range. Covered topics are housing instability, food insecurity, unemployment, transportation barriers, social isolation and financial strain.
The workflow de-identifies the note with openmed.deidentify, extracts entities with openmed.analyze_text (adding a zero-shot pass when the model lacks social labels), and maps spans to codes with a lookup in references/sdoh_zcode_map.md. Offsets and confidence stay attached so each suggestion traces back to its source text. Results are staged for human review: the skill proposes codes, a person assigns them, and individual inferences are kept out of coverage and pricing decisions.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 34d7b8c. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are python).
From the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
hl7.orgAlso links to:
cdc.govconfluence.hl7.orgn2c2.dbmi.hms.harvard.educms.govhealthit.govFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Extracting SDOH and Z-Codes loads about 1.9k tokens when it runs, and up to ~2.9k if it reads all its reference files. Until then it costs about 165 tokens; SKILL.md has 725 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from maziyarpanahi/openmed at commit 34d7b8c, republished under its Apache-2.0 licence (© maziyarpanahi). 725 words, ~1,860 tokens.
.claude/skills/extracting-sdoh/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Social determinants of health (SDOH) — the conditions in which people live, work, and age — drive an estimated 80% of health outcomes, yet they live almost entirely in free-text narrative. Multiple chart-review studies find SDOH documented in notes but coded with a Z-code under ~2% of the time. The information is there; the structured signal is not. This skill recovers it: run OpenMed NER over de-identified notes, then map the resulting spans to the ICD-10-CM Z55–Z65 family.
This is a decision-support step. It proposes Z-codes; a human assigns them. SDOH coding is sensitive — never expose individual SDOH inferences outside the care/coding workflow, and never feed them to coverage or pricing decisions.
De-identify first, run NER, then map spans to Z-codes:
import openmed
from sdoh_zcode_map import SDOH_ZCODES # see references/sdoh_zcode_map.md
note = (
"62F with CHF. Reports she lost her apartment last month and is "
"staying in a shelter. Often runs out of food before month-end. "
"No car; misses appointments because the bus does not run to clinic."
)
# 1) Strip PHI before any downstream processing or storage.
deid = openmed.deidentify(note, method="replace", policy="hipaa_safe_harbor")
# 2) Run clinical NER. Use an SDOH/clinical model from the registry; discover
# available keys with openmed.get_models_by_category(...).
result = openmed.analyze_text(deid.text, output_format="dict")
# 3) Map each entity span to a candidate Z-code.
for ent in result["entities"]:
code = SDOH_ZCODES.get(ent["label"].lower())
if code:
print(f"{ent['text']!r:40} {ent['label']:18} -> {code}")analyze_text returns entities shaped as
{"text", "label", "confidence", "start", "end", "metadata"}. The start/end
offsets index into the text you passed in, so you can anchor every suggested
Z-code back to its exact source span for human review.
openmed.deidentify (HIPAA Safe Harbor or a
stricter policy). SDOH text is dense with PHI (addresses, employer names).openmed.analyze_text. Pick a model whose label
set covers social concepts; if your model only emits clinical findings, run a
second pass with a zero-shot model (openmed zero) using SDOH labels such as
housing_instability, food_insecurity, unemployment,
transportation_barrier, social_isolation, financial_strain.references/sdoh_zcode_map.md). Keep the span offsets and the model
confidence on every suggestion.(span, label, suggested_code, confidence)
tuples for a coder or the Gravity Project pipeline to accept or reject. Do not
auto-bill a Z-code from an inference alone.Condition, Observation,
Goal) and USCDI v3 SDOH elements.| Domain | Range | Example |
|---|---|---|
| Education / literacy | Z55 | Z55.0 illiteracy |
| Employment | Z56 | Z56.0 unemployment |
| Occupational exposure | Z57 | — |
| Housing / economic | Z59 | Z59.0 homelessness, Z59.41 food insecurity, Z59.82 transportation insecurity |
| Social environment | Z60 | Z60.2 living alone, Z60.4 social exclusion |
| Upbringing | Z62 | — |
| Family / support circumstances | Z63 | Z63.4 disappearance/death of family member |
| Psychosocial circumstances | Z64–Z65 | Z65.1 imprisonment |
The full curated label→code table lives in references/sdoh_zcode_map.md.
openmed.analyze_text(...) output
(PredictionResult dict). Each entity["start"]/["end"] anchors a Z-code
suggestion to source text.openmed.deidentify upstream so no raw PHI reaches
the SDOH store, logs, or coder queue.Condition/Observation with the
Z-code as code.coding (system http://hl7.org/fhir/sid/icd-10-cm). OpenMed's
openmed.clinical.exporters.fhir helpers (to_bundle, to_operation_outcome)
assemble the envelope; ICD-10-CM itself is public-domain in the US release.openmed.clinical, resolving-clinical-context) before mapping.© maziyarpanahi, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file (references) in skills/extracting-sdoh of maziyarpanahi/openmed.
Open the folder on GitHubat commit 34d7b8c
Extracting SDOH and Z-Codes next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Extracting SDOH and Z-Codes this skillmaziyarpanahi/openmed | 5.5k | — | ~1.9k | Automated safety check: Pass | Apache-2.0 | |
| pydicom DICOM Toolkitdavila7/claude-code-templates | 33k | 11 repos | ~3.3k | Automated safety check: Pass | MIT | |
| Histolab Whole Slide Image Tilingdavila7/claude-code-templates | 33k | 11 repos | ~5.1k | Automated safety check: Pass | MIT | |
| NeuroKit2 Biosignal Processingdavila7/claude-code-templates | 33k | 11 repos | ~3k | Automated safety check: Pass | MIT | |
| PyHealth Clinical ML Toolkitdavila7/claude-code-templates | 33k | 11 repos | ~4.4k | Automated safety check: Pass | MIT | |
| Topic Model ConsolidationTyrealQ/q-skills | 108 | — | ~1k | Automated safety check: Pass | MIT |
davila7/claude-code-templates
Reads, edits, anonymizes and converts DICOM medical imaging files with pydicom, including pixel data extraction and compressed transfer syntaxes.
davila7/claude-code-templates
Processes digital pathology whole slide images with histolab: tissue detection, mask creation, tile extraction and dataset preparation for deep learning.
davila7/claude-code-templates
Processes physiological signals with NeuroKit2 in Python: ECG, PPG, EEG, EDA, respiration, EMG and EOG, including HRV, events and complexity measures.
davila7/claude-code-templates
Builds machine learning pipelines on clinical data with PyHealth: EHR datasets, prediction tasks, medical code mapping, healthcare models and evaluation.
TyrealQ/q-skills
Consolidates BERTopic, LDA or NMF topic output into a theory-driven classification framework and writes the final labels back to an Excel file.
K-Dense-AI/scientific-agent-skills
Supports Gtars for local genomic interval models and set algebra, overlaps and counts, consensus and coverage, tokenization, fragment processing, and refget/BEDbase planning across Python, Rust, and…
maziyarpanahi/openmed
Checks OpenMed de-identified clinical text against the 18 HIPAA Safe Harbor identifier categories and reports gaps and residual re-identification risk.
maziyarpanahi/openmed
Fills in a model card for an OpenMed clinical NER or de-identification model from its evaluation reports: intended use, metrics, subgroups and limitations.
maziyarpanahi/openmed
Walks a data pipeline against the HIPAA Privacy and Security Rule checklist and produces a gap report before it processes patient data.
maziyarpanahi/openmed
Suggests candidate ICD-10-CM diagnosis and ICD-10-PCS procedure codes for clinical text extracted by OpenMed, with rationale for a certified coder to review.
maziyarpanahi/openmed
Maps OpenMed-extracted, terminology-coded conditions, drugs and measurements into OMOP CDM v5.4 tables for OHDSI and ATLAS analytics.
maziyarpanahi/openmed
Converts scanned faxes, images, CSV/TSV exports and C-CDA XML into clean text on-device, ready for OpenMed de-identification and named-entity recognition.
Works with
Categories
Finds social risks such as housing instability or food insecurity in clinical notes and proposes matching ICD-10-CM Z-codes for a coder to confirm. Run after OpenMed named-entity recognition, this skill pulls social determinants of health out of free-text clinical notes and links each finding to a code in the ICD-10-CM Z55–Z65 range. Covered topics are housing instability, food insecurity, unemployment, transportation barriers, social isolation and financial strain.
Extracting SDOH and Z-Codes fits situations like: turning social risks documented in clinical notes into structured, coded data; building health-equity dashboards that need SDOH as discrete fields; finding SDOH that is written in the chart but was never given a Z-code.
Run `npx skills add maziyarpanahi/openmed --skill extracting-sdoh -a claude-code`. Or copy the skill folder (skills/extracting-sdoh in maziyarpanahi/openmed) into .claude/skills/extracting-sdoh in your project. Claude Code loads it when a task matches its description.
Run `npx skills add maziyarpanahi/openmed --skill extracting-sdoh -a codex`. Or copy the skill folder (skills/extracting-sdoh in maziyarpanahi/openmed) into .agents/skills/extracting-sdoh in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add maziyarpanahi/openmed --skill extracting-sdoh -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/extracting-sdoh, .gemini/skills/extracting-sdoh, .github/skills/extracting-sdoh and .opencode/skills/extracting-sdoh in your project.
SKILL.md names no scripts, command-line tools or credentials: Extracting SDOH and Z-Codes is instructions for the agent only. Our summary lists: The OpenMed Python package; Clinical notes that have been de-identified first.
SKILL.md names 6 domains. In commands or code: hl7.org; the agent is likely to contact it when it follows the instructions. As links in the text: cdc.gov, confluence.hl7.org, n2c2.dbmi.hms.harvard.edu, cms.gov and healthit.gov. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Extracting SDOH and Z-Codes is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.9k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Extracting SDOH and Z-Codes: pydicom DICOM Toolkit (davila7/claude-code-templates, 33k stars), Histolab Whole Slide Image Tiling (davila7/claude-code-templates, 33k stars), NeuroKit2 Biosignal Processing (davila7/claude-code-templates, 33k stars) and PyHealth Clinical ML Toolkit (davila7/claude-code-templates, 33k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
maziyarpanahi (a GitHub user) maintains it in maziyarpanahi/openmed, which has 5,506 GitHub stars. The repository holds 74 skills in this directory. The repository was last updated on October 11, 2026.
Source: maziyarpanahi/openmed on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.