본문으로 건너뛰기
Skillpedia
보안5.8k · #14688

deidentify-a-dataset

하는 일

이 스킬은 CSV 같은 로컬 데이터 파일의 자유 텍스트 열에서 개인 정보를 제거하고, 가려진 별도의 사본을 만듭니다. 임상 데이터를 안전하게 공유하거나 분석해야 하는 분석가를 위한 스킬입니다.

사용하는 경우

  • ✓분석하거나 공유하기 위해 임상 CSV, JSONL, Parquet 데이터 세트를 준비해야 할 때.
  • ✓데이터 세트의 일부 자유 텍스트 열에만 환자 정보가 들어 있을 때.
  • ✓값을 보지 않고도 얼마나 가려졌는지에 대한 요약이 필요할 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/maziyarpanahi/openmed/blob/master/skills/deidentify-a-dataset/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 환자 CSV의 노트 열을 비식별화하고, 원본은 바꾸지 않은 채 새 파일로 저장해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 파일 형식과 지정된 자유 텍스트 열을 확인하고, 비식별화된 데이터를 새 파일에 쓴 뒤, 값은 제외하고 집계 수치와 비율만 보고합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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.

자주 묻는 질문

원본 파일을 덮어쓰나요?

아니요. 새 경로에 쓰며 입력 파일은 절대 바꾸지 않습니다.

검사할 열을 추측하나요?

아니요. 사용자가 자유 텍스트 열을 지정하며, 스킬은 값을 보고 열을 추론하지 않습니다.

어떤 파일 형식을 지원하나요?

CSV, JSONL 또는 NDJSON, Parquet 파일을 지원합니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
5.8k
순위
#14688
라이선스
Apache-2.0
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬