pseudonymizing-for-gdpr
Qué hace
Esta skill enseña a un agente a ocultar datos personales en un texto y, al mismo tiempo, guardar una clave aparte que permite volver a vincular los registros más adelante. Sigue las reglas del RGPD para la seudonimización, que son distintas de la anonimización completa.
Cuándo usarla
- ✓Cuando un equipo debe tratar datos personales o de salud de personas de la UE y necesita una protección reversible.
- ✓Cuando un proyecto necesita volver a vincular registros con una persona más adelante, por ejemplo para un seguimiento de pacientes, mientras la clave se mantiene aparte.
- ✓Cuando un revisor pide dejar por escrito la diferencia entre seudonimización y anonimización.
Link de la skill
https://github.com/maziyarpanahi/openmed/blob/master/skills/pseudonymizing-for-gdpr/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“¿Puedes seudonimizar estas notas de pacientes para mi estudio en la UE y guardar la clave de enlace por separado?”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente sustituye los datos personales por máscaras y guarda una correspondencia en un lugar aparte. Solo las personas autorizadas pueden usar esa correspondencia para volver a vincular los datos.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Pseudonymizing for GDPR
Pseudonymization under the GDPR (Art. 4(5)) means processing personal data so it "can no longer be attributed to a specific data subject without the use of additional information" — provided that additional information (the re-linkage key) is "kept separately and is subject to technical and organisational measures." Crucially, pseudonymized data is still personal data (Recital 26): re-linkage is possible, so GDPR still applies. This is the opposite of anonymization, where re-identification is irreversibly prevented and the data falls outside the GDPR.
OpenMed implements this with a single reversible de-identification pass plus a mapping you store away from the data. This skill covers producing that mapping, vaulting the key separately, and re-linking under authorization.
When to use
- You process EU residents' personal or special-category health data (Art. 9) and need a lawful, reversible safeguard rather than full anonymization.
- You need to keep a record-linkage capability (e.g. to recontact a patient, reconcile longitudinal records, or honor a Subject Access Request) but must separate the linkage key from the working dataset.
- A reviewer asks for the pseudonymization-vs-anonymization distinction in writing, or for the ENISA-style "additional information kept separately" control to be demonstrable.
Do not use this when the goal is irreversible anonymization for open release
— there, drop the mapping entirely and gate residual risk with
reviewing-reidentification-risk. Pseudonymization keeps a key; anonymization
must not.
Quick start
import openmed
# Synthetic record — never run this skill's examples on real PHI.
note = "Patient Maria Schmidt (ID 4471) seen 2024-03-02; contact maria@example.de."
result = openmed.deidentify(
note,
method="replace", # realistic surrogates, not [LABEL] holes
policy="gdpr_pseudonymization", # bundled GDPR profile
keep_mapping=True, # produce the reversible re-linkage map
consistent=True, # same input -> same surrogate in the doc
seed=20240302, # cross-run reproducibility of surrogates
)
pseudonymized_text = result.deidentified_text # safe to process / analyze
relink_key = result.mapping # surrogate -> original; SECRET
result.deidentified_text is the pseudonymized payload. result.mapping is the
"additional information" GDPR Art. 4(5) requires be kept separately — it is the
key that makes re-linkage possible, and therefore the most sensitive artifact in
the whole flow.
Workflow
- Choose reversible pseudonymization, not masking. Use
method="replace"withpolicy="gdpr_pseudonymization"andkeep_mapping=True. Replacement surrogates keep the text usable for downstream NLP while remaining non-identifying.consistent=True(optionally withseed=) makes repeated mentions resolve to one stable surrogate so intra-document linkage survives. - Split the data from the key immediately. The moment
deidentifyreturns, routeresult.deidentified_textto your working store andresult.mappingto a separate, access-controlled key vault — different system, different credentials, different backups. Never persist them in the same row, file, bucket, or log line. This separation is the technical-and-organisational measure that makes the data pseudonymized rather than just "personal data with PII in it." - Process the pseudonymized text freely. Run
analyze_text, analytics, model training, or transfer ondeidentified_text. The key never leaves the vault during ordinary processing. - Re-link only under authorization. When a lawful basis exists (e.g. an
authorized SAR or recontact), fetch the mapping from the vault and call
openmed.reidentify(deidentified_text, mapping). Log that a re-linkage happened (who, when, why, record id) — but never log the restored plaintext. - Apply retention to the key. The mapping has its own retention clock. When
the lawful basis for re-linkage ends, destroy the mapping. Once the key
is irreversibly gone and no other re-identification path remains, the
remaining text approaches anonymization and GDPR obligations shrink
accordingly. Verify that claim with
reviewing-reidentification-riskbefore relying on it.
Hand-off to / from OpenMed
- From `extracting-pi
Preguntas frecuentes
¿Siguen siendo datos personales los datos seudonimizados?
Sí. La skill indica que siguen siendo datos personales según el RGPD, porque se pueden volver a vincular.
¿Esto convierte los datos en anónimos?
No. Los datos anónimos no pueden volver a vincularse, mientras que este método permite un reenlace controlado.
¿Dónde debe guardarse la clave?
La skill indica que la clave debe mantenerse separada de los datos de trabajo, con controles técnicos y organizativos.
Detalles
Descripción original del autor
Apply GDPR-grade pseudonymization to clinical or personal text with OpenMed, keeping a separately-held re-linkage key so the data can be controlled-re-linked later. Use when the user must process EU personal/health data under GDPR, asks for pseudonymization vs anonymization, needs Art. 4(5) / Art. 9 / Recital 26 alignment, wants a reversible mapping/key vault held apart from the data, or needs controlled re-linkage. Covers openmed.deidentify(policy=\"gdpr_pseudonymization\", keep_mapping=True), storing the mapping in a separate key vault, reidentify() for authorized re-linkage, and retention.
repo: maziyarpanahi/openmed
Popularidad
- Estrellas en GitHub
- 5,8 mil
- Posición en el ranking
- #14720
- Licencia
- Apache-2.0
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
annotating-variants
5,8 milAyuda a tu agente a predecir qué hace una variante genética, convertir nombres HGVS en posiciones del genoma y añadir frecuencias poblacionales, usando anotadores públicos gratuitos.
ask-openmed
5,8 milAyuda a tu agente a elegir el flujo de trabajo de OpenMed adecuado para una petición de texto clínico, empezando siempre por una comprobación de privacidad si puede haber datos de pacientes.
assembling-fhir-bundles
5,8 milEmpaqueta varios registros de salud FHIR en un único Bundle de transacción listo para enviar a un EHR, con las referencias internas enlazadas correctamente.
auditing-deid-leakage
5,8 milBusca en texto clínico desidentificado restos de identificadores, como números de la seguridad social, de tarjeta, correos y fechas, y bloquea la publicación si queda alguno.
Skills parecidas
gitcrawl
394 milPermite que tu agente busque en un archivo guardado de incidencias y pull requests de GitHub, agrupe duplicados y revise su estado actual en GitHub.
slacrawl
394 milPermite que tu agente busque y cuente mensajes en un archivo local de Slack, revise qué tan reciente es y lo actualice cuando haga falta.
goplaces
394 milAyuda a tu agente a buscar lugares, obtener sus detalles y reseñas, y resolver nombres de lugares usando Google Places, con salida JSON para scripts.