Saltar al contenido
Skillpedia
Seguridad5,8 mil · #14688

deidentify-a-dataset

Qué hace

Esta skill quita los datos personales de las columnas de texto libre de un archivo de datos local, como un CSV, y escribe una copia redactada aparte. Es para analistas que deben compartir o analizar datos clínicos de forma segura.

Cuándo usarla

  • ✓Cuando necesitas preparar un conjunto de datos clínico en CSV, JSONL o Parquet para analizarlo o compartirlo.
  • ✓Cuando solo algunas columnas de texto libre de un conjunto de datos contienen datos de pacientes.
  • ✓Cuando necesitas un resumen de cuánto se redactó, sin ver los valores.

Link de la skill

https://github.com/maziyarpanahi/openmed/blob/master/skills/deidentify-a-dataset/SKILL.md

Có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

Usa esta skill para ayudarme: https://github.com/maziyarpanahi/openmed/blob/master/skills/deidentify-a-dataset/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Redacta la columna de notas de este CSV de pacientes y guarda un archivo nuevo, sin cambiar el original.”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

El agente confirma el tipo de archivo y las columnas de texto libre indicadas, escribe los datos redactados en un archivo nuevo e informa solo de recuentos y porcentajes agregados.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de GitHub.

De-identify a dataset

Keep the source local, name the free-text columns explicitly, and write to a different destination. Never infer columns or print source and redacted cell values.

Procedure

  1. Confirm that the input is CSV, JSONL/NDJSON, or Parquet.
  2. Confirm which columns contain free text. Do not scan or log values to guess.
  3. Choose a policy and language. Prefer strict_no_leak when recall is the governing safety requirement.
  4. Write to a new path; never overwrite the input.
  5. Inspect only result.summary, which contains aggregate counts and rates.
  6. Validate recall and residual leakage on representative synthetic or approved evaluation fixtures before releasing the output.

Runnable synthetic example

Install the model runtime first with python -m pip install "openmed[hf]".

import csv
from pathlib import Path

from openmed import redact_dataset

source = Path("synthetic-notes.csv")
destination = Path("synthetic-notes.redacted.csv")

with source.open("w", newline="", encoding="utf-8") as handle:
    writer = csv.DictWriter(handle, fieldnames=["record_id", "note"])
    writer.writeheader()
    writer.writerows(
        [
            {
                "record_id": "SYNTH-001",
                "note": (
                    "Taylor Example called 212-555-0198 about a "
                    "metformin refill."
                ),
            },
            {
                "record_id": "SYNTH-002",
                "note": (
                    "Send the synthetic follow-up to "
                    "demo.patient@example.test."
                ),
            },
        ]
    )

result = redact_dataset(
    source,
    text_columns=["note"],
    output_path=destination,
    policy="strict_no_leak",
    lang="en",
)

print(result.output_path)
print(result.summary.to_dict())  # Aggregate counts only; no cell contents.

Use the equivalent CLI for an existing dataset:

openmed redact-dataset notes.csv \
  --text-columns note,comment \
  --policy strict_no_leak \
  --output notes.redacted.csv

Safety checks

  • Keep model inference and files on infrastructure the user controls.
  • Do not print input rows, detected entity surfaces, reversible mappings, or exception payloads that may contain source text.
  • Keep source and output paths separate and access-controlled.
  • Treat the aggregate summary as evidence, not as proof of compliance.
  • Never commit real clinical data or restricted evaluation corpora.

Repository example

Read and run the offline dataset walkthrough when you need a bundled synthetic fixture and first-run download controls.

Preguntas frecuentes

¿Sobrescribe mi archivo original?

No. Escribe en una ruta nueva y nunca cambia el archivo de entrada.

¿Adivina qué columnas revisar?

No. Tú nombras las columnas de texto libre, y la skill no las deduce a partir de los valores.

¿Qué tipos de archivo funcionan?

Se admiten archivos CSV, JSONL o NDJSON y Parquet.

Detalles

Descripción original del autor

De-identify selected free-text columns in a local CSV, JSONL, or Parquet dataset with OpenMed and produce a separate redacted dataset plus a PHI-free aggregate summary. Use when an agent must prepare a clinical dataset for analysis or sharing without overwriting the source or exposing cell values in logs.

repo: maziyarpanahi/openmed

Popularidad

Estrellas en GitHub
5,8 mil
Posición en el ranking
#14688
Licencia
Apache-2.0
Actualizada
2/11/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas