configuring-privacy-policies
What it does
This skill helps choose and customize the privacy profile used when de-identifying clinical text, such as HIPAA Safe Harbor, GDPR pseudonymization or a research dataset. It is for teams who need the right level of protection for their regulatory setting.
When to use it
- βWhen you need to pick a privacy profile for HIPAA Safe Harbor, GDPR, PIPEDA or a research dataset.
- βWhen research work must keep dates and locations while removing direct identifiers.
- βWhen you need a custom surrogate format, such as your own record number pattern.
Skill link
https://github.com/maziyarpanahi/openmed/blob/master/skills/configuring-privacy-policies/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βWhich de-identification profile should I use for a research dataset that still needs dates and ZIP codes?β
5 new skills a week. 1 minute to read.
How it works
The agent matches your regulatory context to one of the seven bundled profiles, explains what it changes, and adjusts the settings for research or custom formats when needed.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Configuring privacy policies
A policy profile is a named bundle of de-identification decisions: which
action (mask/redact/replace/keep) applies to each label, how aggressively
detectors arbitrate, whether the mandatory safety sweep runs, and whether a
reversible mapping is produced. OpenMed ships seven profiles. Pass one by name
to deidentify(policy=...) and you get a compliance-aligned default without
hand-wiring 50+ per-label actions. Everything runs on-device.
When to use this skill
Use it to pick the right policy= for a regulatory context, to understand what
a profile actually changes, or to go beyond the bundle β keeping quasi-
identifiers for research, or registering a custom surrogate generator (e.g. your
own MRN format).
Quick start
import openmed
note = "Jane Roe, DOB 1979-04-11, lives in Cambridge MA 02139. SSN 123-45-6789."
# HIPAA Safe Harbor: mask every identifier class.
safe = openmed.deidentify(note, policy="hipaa_safe_harbor")
# GDPR pseudonymization: replace with fakes AND keep a reversible mapping.
gdpr = openmed.deidentify(note, policy="gdpr_pseudonymization")
mapping = gdpr.mapping # present because the profile sets keep_mapping=True
# Research limited dataset: mask direct identifiers, KEEP quasi-identifiers
# (dates, age, ZIP, geography) so the data stays analytically useful.
lds = openmed.deidentify(note, policy="research_limited_dataset")
The seven bundled profiles
Each profile lives in openmed/core/policies/<name>.json. Summary of what each
actually configures:
| Profile | Default action | Quasi-identifiers | Mapping | Safety sweep | Use case |
|---|---|---|---|---|---|
hipaa_safe_harbor |
mask all | masked | none | mandatory | HIPAA Β§164.514(b)(2) Safe Harbor β strip all 18 identifier classes |
hipaa_expert_review_assist |
redact | redacted; clinical concepts kept | none | optional | Assist Expert Determination (Β§164.514(b)(1)); keeps microbiology/clinical terms for a statistician to assess residual risk |
gdpr_pseudonymization |
replace | replaced; clinical kept | kept + reversible | mandatory | GDPR Art. 4(5) pseudonymization β reversible under controlled key |
canada_pipeda |
replace (IDs masked) | replaced | kept + reversible | mandatory | PIPEDA-aligned; like GDPR but masks ID_NUM/SSN outright |
research_limited_dataset |
mask direct ids | keeps dates, age, ZIP, geography, org, job | none | mandatory | HIPAA Limited Data Set (Β§164.514(e)) β usable for research with a DUA |
clinical_minimal_redaction |
mask direct ids | keeps quasi-identifiers | none | optional | Internal clinical use where readability matters; lighter cascade |
strict_no_leak |
mask everything | masked; even clinical concepts masked | none | mandatory | Maximum-recall, union arbitration, all cascade tiers β zero-leakage posture |
Key dimensions to reason about:
default_actionβmask([NAME]),redact,replace(fake value), orkeep. Set per label in the profile'sactionsmap.policy_label_actionsβ coarse action by class:DIRECT_IDENTIFIER/QUASI_IDENTIFIER/CLINICAL_CONCEPT. Research and minimal-redaction profiles keep quasi-identifiers; strict-no-leak masks even clinical concepts.keep_mapping/reversible_idβ only GDPR and PIPEDA produce a reversible mapping. Treat that mapping as PHI.safety_sweep_mandatoryβ deterministic structured-ID sweep (SSN, MRN- like, emails) that runs regardless of model confidence. Off only for the two "minimal/assist" profiles.arbitration_mode/forced_cascade_tiersβstrict_no_leakuseshigh_recall_unionacross tiers R0βR3 (most aggressive); minimal redaction uses only R0βR1.
Choosing: map regulation β profile
- Publish or share data with no DUA, US β
hipaa_safe_harbor. - Statistician will certify low risk (keep clinical signal) β
hipaa_expert_review_assist, then human Expert Determination. - EU subjects, need reversibility under a key β
gdpr_pseudonymization. - Canadian subjects β
canada_pipeda. - Research cohort needing dates/age/geography β
research_limited_dataset(requires a Data Use Agreement). - Internal clinical workflow, readability first β
clinical_minimal_redaction. - Adversarial / zero-tolerance leakage β
strict_no_leak.
Customizing beyond the bundle
When a profile is close but not
FAQ
How many profiles are there?
OpenMed ships seven bundled privacy profiles, each one a named set of de-identification decisions.
Does the text leave my computer?
No. The profiles run on the device, so the text stays there.
Can I make my own generator?
Yes. The skill covers registering a custom surrogate generator, such as one for an MRN format.
Details
Original description by the author
Select and customize OpenMed's seven bundled privacy policy profiles for de-identification, and build custom surrogate generators. Use when the user asks which policy fits HIPAA Safe Harbor vs Expert Determination vs GDPR vs PIPEDA vs a research limited dataset vs strict no-leak, wants to pass policy= to deidentify(), needs to keep quasi-identifiers for research, or must register a custom MRN/name/address surrogate provider. Covers the profile-to-use-case map, AnonymizerConfig/Anonymizer for fine control, and register_clinical_provider / register_label_generator. Pairs with OpenMed deidentifyi
repo: maziyarpanahi/openmed
Popularity
- GitHub stars
- 5.8k
- Ranking position
- #14686
- License
- Apache-2.0
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
annotating-variants
5.8kHelps your agent predict what a genetic variant does, convert HGVS names to genome positions and attach population frequencies, using free public annotators.
ask-openmed
5.8kHelps your agent pick the right OpenMed workflow for a clinical text request, starting with a privacy check whenever patient data may be present.
assembling-fhir-bundles
5.8kPackages several FHIR health records into one transaction Bundle ready to send to an EHR, with the internal references linked correctly.
auditing-deid-leakage
5.8kScans de-identified clinical text for leftover identifiers such as SSNs, card numbers, emails and dates, and blocks release if any remain.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.