Install any skill in seconds. Free to start, no credit card required.
Get Started Free →De-identify clinical research data before LLM-assisted analysis. Standalone Python CLI detects PHI via regex + heuristics with 10 country locale packs (kr, us, jp, cn, de, uk, fr, ca, au, in). Interactive terminal review. No LLM touches raw data — the script runs locally without any network or AI calls.
.claude/skills/aperivue-deidentify/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 68% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 83% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 121% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 12% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 36% | 0% |
You are guiding a medical researcher through data de-identification. The actual de-identification is performed by a standalone Python script that runs WITHOUT any LLM. Your role is to explain, guide, and verify — not to see or process raw PHI data.
The script processes data locally. You never need to see patient-level data.
(SHA-256 hashes only), and de-identified output (PHI already removed).
English for technical terms (PHI, HIPAA, Safe Harbor, etc.).
${CLAUDE_SKILL_DIR}/references/hipaa_18_identifiers.md — HIPAA Safe Harbor checklist${CLAUDE_SKILL_DIR}/references/korean_phi_patterns.md — Korean-specific regex patterns${CLAUDE_SKILL_DIR}/references/date_shift_guide.md — Date shifting best practicesRead relevant references before advising the researcher.
openpyxl (for .xlsx files): pip install openpyxlAsk the researcher:
Based on answers, recommend the appropriate command:
python deidentify.py full <file> --locale <code>python deidentify.py scan <file> --locale <code> firstAvailable locale codes: kr (Korea), us (USA), jp (Japan), cn (China), de (Germany), uk (United Kingdom), fr (France), ca (Canada), au (Australia), in (India). If --locale is omitted, the script shows an interactive country selection menu. Users can provide a custom locale file via --locale-file custom.json.
Guide the researcher to run the script. The script is located at:
${CLAUDE_SKILL_DIR}/deidentify.pyFull pipeline (recommended for most users):
bashpython ${CLAUDE_SKILL_DIR}/deidentify.py full data.xlsx \ --locale kr \ --output-dir ./deidentified/ \ --auto-accept-safe
Step-by-step (for careful review):
bash# Step 1: Scan python ${CLAUDE_SKILL_DIR}/deidentify.py scan data.xlsx --locale kr --output-dir ./deidentified/ # Step 2: Review (interactive) python ${CLAUDE_SKILL_DIR}/deidentify.py review ./deidentified/scan_report.json # Step 3: Apply python ${CLAUDE_SKILL_DIR}/deidentify.py apply ./deidentified/reviewed_report.json
Options:
--locale CODE: Country locale for PHI patterns (kr, us, jp, cn, de, uk, fr, ca, au, in)--locale-file PATH: Custom locale JSON file (copy locales/_template.json to create one)--auto-accept-safe: Skip confirmation for columns classified as SAFE (faster for large datasets)--hash-mapping: Store SHA-256 hashes instead of original values in mapping file (one-way, more secure)--output-dir: Where to save de-identified file, mapping, and audit log-v/--verbose: Enable debug loggingThe script's terminal review has three passes:
The researcher confirms or overrides each classification.
with more sample values displayed.
individual decisions before confirming.
Coach the researcher. Deliver these prompts in the researcher's preferred language:
After the script completes, help the researcher verify:
bash cat ./deidentified/audit_log.csv | head -20 Verify the number of changes, affected columns, and PHI types.
Read a few rows to confirm pseudonyms (P0001, etc.), date shifts, and REDACTED] markers appear where expected.
Verify no original names, phone numbers, or RRN values remain.
Generate a de-identification methods paragraph for the manuscript or IRB:
Template: > Protected health information was removed from the dataset prior to analysis using > a rule-based de-identification tool (deidentify.py, medsci-skills) with the COUNTRY] > locale pattern pack. The tool scanned column names and cell values using regex patterns > for country-specific identifiers (e.g., national ID numbers, phone numbers), email > addresses, dates, and addresses. Each column classification was reviewed by the > researcher in an interactive terminal session. Names were replaced with pseudonyms > (P0001, P0002, ...), dates were shifted by a random per-patient offset (±365 days) > preserving relative temporal intervals, and direct identifiers (phone numbers, email > addresses, national ID numbers) were suppressed. A total of N] cells across M] > columns were de-identified. The de-identification mapping file was stored separately > under restricted access (file permissions 0600).
Customize based on the actual audit log statistics.
clean-data in the research pipeline/clean-data for data quality profiling/analyze-stats can safely process the de-identified output/write-paper Methods section should reference the de-identification process/write-protocol can use the HIPAA/PIPA reference files for protocol documentation| File | Contains PHI? | Safe for Claude? | Purpose | |------|:------------:|:----------------:|---------| | *_deidentified.xlsx/csv | No | Yes | De-identified data for analysis | | mapping.json | YES | No | Original ↔ pseudonym mapping | | audit_log.csv | No (hashes only) | Yes | What was changed and where | | scan_report.json | No | Yes | Column classification results | | reviewed_report.json | No | Yes | Researcher-reviewed classifications |
Supported (v1):
--locale-file with templateNOT supported (planned for v2):
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 12,137 | 8,310 | -32% | 1 | 1 | 0% | 2,278 | 3,817 | +68% | 0 | 0 | — |
case-02 | fail→pass | 15,815 | 15,242 | -4% | 1 | 1 | 0% | 2,780 | 5,093 | +83% | 0 | 0 | — |
case-03 | fail→pass | 9,626 | 7,496 | -22% | 1 | 1 | 0% | 1,589 | 3,505 | +121% | 0 | 0 | — |
case-04 | pass→pass | 11,685 | 7,833 | -33% | 1 | 1 | 0% | 2,137 | 3,636 | +70% | 0 | 0 | — |
case-05 | pass→pass | 12,155 | 8,395 | -31% | 1 | 1 | 0% | 1,896 | 3,575 | +89% | 0 | 0 | — |
case-06 | fail→pass | 19,455 | 11,493 | -41% | 1 | 1 | 0% | 3,850 | 4,321 | +12% | 0 | 0 | — |
case-07 | fail→pass | 16,889 | 9,126 | -46% | 1 | 1 | 0% | 2,954 | 4,018 | +36% | 0 | 0 | — |
case-08 | fail→pass | 49,786 | 4,471 | -91% | 1 | 1 | 0% | 3,287 | 3,071 | -7% | 0 | 0 | — |
case-09 | fail→pass | 12,882 | 3,209 | -75% | 1 | 1 | 0% | 1,967 | 2,792 | +42% | 0 | 0 | — |
case-10 | pass→pass | 12,824 | 9,347 | -27% | 1 | 1 | 0% | 2,247 | 3,996 | +78% | 0 | 0 | — |
case-11 | fail→pass | 23,989 | 5,012 | -79% | 1 | 1 | 0% | 1,172 | 3,179 | +171% | 0 | 0 | — |
case-12 | fail→pass | 11,728 | 3,509 | -70% | 1 | 1 | 0% | 1,861 | 2,920 | +57% | 0 | 0 | — |
case-13 | fail→pass | 10,792 | 4,057 | -62% | 1 | 1 | 0% | 1,806 | 2,993 | +66% | 0 | 0 | — |
case-14 | pass→pass | 9,536 | 6,387 | -33% | 1 | 1 | 0% | 1,660 | 3,548 | +114% | 0 | 0 | — |
case-15 | pass→pass | 9,818 | 8,413 | -14% | 1 | 1 | 0% | 1,479 | 3,656 | +147% | 0 | 0 | — |
case-16 | pass→pass | 9,657 | 8,455 | -12% | 1 | 1 | 0% | 1,407 | 3,709 | +164% | 0 | 0 | — |
case-17 | pass→pass | 15,200 | 9,004 | -41% | 1 | 1 | 0% | 2,419 | 3,846 | +59% | 0 | 0 | — |
case-18 | pass→pass | 8,455 | 2,479 | -71% | 1 | 1 | 0% | 1,391 | 2,704 | +94% | 0 | 0 | — |
case-19 | fail→pass | 11,279 | 7,020 | -38% | 1 | 1 | 0% | 1,953 | 3,520 | +80% | 0 | 0 | — |
case-20 | pass→pass | 6,278 | 3,332 | -47% | 1 | 1 | 0% | 1,118 | 2,947 | +164% | 0 | 0 | — |
case-21 | pass→pass | 8,030 | 2,482 | -69% | 1 | 1 | 0% | 1,438 | 2,696 | +87% | 0 | 0 | — |
case-22 | fail→pass | 10,977 | 5,029 | -54% | 1 | 1 | 0% | 1,871 | 2,979 | +59% | 0 | 0 | — |
case-23 | fail→pass | 8,346 | 3,704 | -56% | 1 | 1 | 0% | 1,501 | 3,003 | +100% | 0 | 0 | — |
case-24 | fail→pass | 8,937 | 4,478 | -50% | 1 | 1 | 0% | 1,626 | 3,191 | +96% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 24 cases were attempted, and 22 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +58 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.