Best for
- 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…
maziyarpanahi/openmed/skills/configuring-privacy-policies/SKILL.md
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 fin
Decision brief
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 prof…
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/maziyarpanahi/openmed --skill "skills/configuring-privacy-policies"Inspect the Agent Skill "configuring-privacy-policies" from https://github.com/maziyarpanahi/openmed/blob/c5fd81fef4c144624ba691f7cb81f95bf77db85a/skills/configuring-privacy-policies/SKILL.md at commit c5fd81fef4c144624ba691f7cb81f95bf77db85a. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
note = "Jane Roe, DOB 1979-04-11, lives in Cambridge MA 02139. SSN 123-45-6789."
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).
safe = openmed.deidentify(note, policy="hipaasafeharbor")
gdpr = openmed.deidentify(note, policy="gdprpseudonymization") mapping = gdpr.mapping present because the profile sets keepmapping=True
Review the “Research limited dataset: mask direct identifiers, KEEP quasi-identifiers” section in the pinned source before continuing.
Permission review
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 91/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 5,161 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
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.
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).
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")
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), or
keep. Set per label in the profile's actions map.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_leak uses
high_recall_union across tiers R0–R3 (most aggressive); minimal redaction
uses only R0–R1.hipaa_safe_harbor.hipaa_expert_review_assist, then human Expert Determination.gdpr_pseudonymization.canada_pipeda.research_limited_dataset
(requires a Data Use Agreement).clinical_minimal_redaction.strict_no_leak.When a profile is close but not exact, drive the engine directly with
Anonymizer / AnonymizerConfig, or register custom generators.
from openmed import (
Anonymizer, AnonymizerConfig,
register_label_generator, register_clinical_provider,
)
# 1) Per-instance config (language, locale, deterministic surrogates):
anon = Anonymizer(AnonymizerConfig(lang="en", consistent=True, seed=7))
fake_name = anon.surrogate("John Doe", "PERSON") # type-matched surrogate
# 2) Override the surrogate for one canonical label (e.g. your MRN format).
# Generators take (faker, original, *, locale) and return a string.
def hospital_mrn(faker, original, *, locale):
return f"H{faker.numerify('#######')}"
register_label_generator("ID_NUM", hospital_mrn) # global, all new Anonymizers
# 3) Add a custom Faker provider (e.g. proprietary identifier formats).
register_clinical_provider(MyClinicalProvider) # a faker BaseProvider class
Use register_label_generator(canonical_label, fn) to swap one label's
surrogate; use register_clinical_provider(provider) to add whole Faker
providers. For per-call scoping, pass providers via
AnonymizerConfig.custom_providers instead of the global registry. Validate
custom labels against openmed.CANONICAL_LABELS.
openmed.deidentify(text, policy="<name>") — see
deidentifying-clinical-text.generating-synthetic-surrogates for method="replace"
with consistent/seed/locale and custom providers.auditing-deidentification-runs (audit=True) and
auditing-safe-harbor-checklist (18 identifier categories).openmed_deidentify and REST POST /pii/deidentify
accept the same policy argument.register_label_generator is global and persists for the process. It
mutates a shared registry; prefer AnonymizerConfig.custom_providers for
isolated, per-run behavior.generating-synthetic-surrogates.openmed/core/policies/*.json, openmed/core/anonymizer/.Frequently asked questions
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 prof…
The source record exposes this install command: npx skills add https://github.com/maziyarpanahi/openmed --skill "skills/configuring-privacy-policies". Inspect the command and pinned source before running it.
Alternatives
coreyhaines31/marketingskills
When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program
coreyhaines31/marketingskills
When the user wants to reduce churn, build cancellation flows, set up save offers, recover failed payments, or implement retention strategies. Also use when the user mentions 'churn,' 'cancel flow,' 'offboarding,' 'save offer,' 'dunning,' 'failed payment recovery,' 'win-back,' 'retention,' 'exit survey,' 'pause subscription,' 'involuntary churn,' 'people keep canceling,' 'churn rate is too high,' 'how do I keep users,' or 'customers are leaving.' Use this whenever someone is losing subscribers o
alirezarezvani/claude-skills
App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist
wanshuiyin/Auto-claude-code-research-in-sleep
Use it for operations and research tasks; the detail page covers purpose, installation, and practical steps.