Agent skill

reidentifying-text

Reversibly de-identify clinical text with OpenMed and later restore the original PHI from a saved mapping. Use when the user needs pseudonymization rather than permanent anonymization, wants to mask PHI now and re-link it later under authorization (e.g. recontact, adjudication, GDPR pseudonymization), asks about deidentify keep_mapping, reidentify, or how to store and protect the re-identification mapping. Covers when reversibility is and is not appropriate (pseudonymization vs HIPAA Safe Harbor anonymization). Pairs after extracting-pii-entities and deidentifying-clinical-text.

Maziyar Panahi4,851★ · 1 repos on radarProfile →
claude-codeApache-2.0
Install
npx skills add maziyarpanahi/openmed --skill reidentifying-text --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 7 KB
Bundled scripts: none
Version: 1.0
Path: skills/reidentifying-text/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 4,851
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Reidentifying Text Some workflows need to remove PHI **for processing** but keep the ability to restore it later under authorization — adjudication, patient recontact, linking results back to a record. That is **pseudonymization** (reversible), not **anonymization** (irreversible). OpenMed supports it with `deidentify(..., keep_mapping=True)` to capture a mapping, and `reidentify` to restore. Everything runs on-device. ## When to use - You need to **re-link** redacted output to the original record later. - You are doing **GDPR pseudonymization** (Art. 4(5)): identifiers held separately, reversible under controlled conditions. - A reviewer must **spot-check** redactions against originals. **Do NOT use reversibility when:** - The goal is **HIPAA Safe Harbor anonymization** or a true **anonymous** release — a re-identification mapping defeats anonymization. Use `method="remove"` and keep **no** mapping. - The redacted text leaves your trust boundary and the mapping might travel with it. The mapping is the secret; never co-locate it with the de-identified output. ## Install ```bash pip install "openmed[hf]" ``` ## Quick start: reversible round-trip ```python import openmed note = "Pa

What's inside
Steps it walks through
  1. When to use
  2. Install
  3. Quick start: reversible round-trip
  4. Use consistent surrogates for stable pseudonyms
  5. Store the mapping securely — separate from the text
  6. Reversible vs irreversible: pick deliberately
  7. Hand-off to / from OpenMed
  8. Edge cases & gotchas
  9. Standards & references
Commands it runs
pip install "openmed[hf]"
More from openmed
All skills →
About this skill
What does the reidentifying-text skill do?

Reversibly de-identify clinical text with OpenMed and later restore the original PHI from a saved mapping. Use when the user needs pseudonymization rather than permanent anonymization, wants to mask PHI now and re-link it later under authorization (e.g. recontact, adjudication, GDPR pseudonymization), asks about deidentify keep_mapping, reidentify, or how to store and protect the re-identification mapping. Covers when reversibility is and is not appropriate (pseudonymization vs HIPAA Safe Harbor anonymization). Pairs after extracting-pii-entities and deidentifying-clinical-text.

How do I install it?

Run `npx skills add maziyarpanahi/openmed --skill reidentifying-text --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From maziyarpanahi/openmed, a repository with 4,851 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going