deidentify

deidentify is a skill for Claude Code from Aperivue/medsci-skills. It costs 54 tokens per session (3,771 once invoked), scanned A, original, MIT.

A local tool for removing protected health information, such as names, dates, and patient identifiers, from clinical research data before analysis. It uses pattern matching and review rules without sending the raw data to an AI service or the internet.

In plain words
What is it for?
Use it to scan and de-identify files, review detected fields in a terminal, and inspect reports, audit hashes, and the cleaned output.
Why use it?
It lets researchers prepare data for analysis while keeping patient-level information on their own computer. It also avoids requiring anyone else to view the raw records.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_SKILL_DIR} variable.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is --output-dir ./deidentified/.

Part of the medsci-data plugin — 8 skills shipped together

Good fit Use it to scan and de-identify files, review detected fields in a terminal, and inspect reports, audit hashes, and the cleaned output.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/Aperivue/medsci-skills
agentmods
npx agentmods add skills/aperivue/medsci-skills/deidentify

Made for: Claude Code.

Or install medsci-data, the plugin that ships this one along with the rest of its 8 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for deidentify

README.md
[![agentmods](https://agentmods.dev/badge/skills/aperivue/medsci-skills/deidentify/github.svg)](https://agentmods.dev/skills/aperivue/medsci-skills/deidentify)
Your own site
<a href="https://agentmods.dev/skills/aperivue/medsci-skills/deidentify"><img src="https://agentmods.dev/badge/skills/aperivue/medsci-skills/deidentify/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for deidentify

Your own site · 80×15
<a href="https://agentmods.dev/skills/aperivue/medsci-skills/deidentify"><img src="https://agentmods.dev/badge/skills/aperivue/medsci-skills/deidentify.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,771 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 22
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 93
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 202
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00054 $0.03771
Opus 5.5 $0.00022 $0.01508
Sonnet 5.5 $0.00011 $0.00754
Haiku 4.5 $0.00005 $0.00377

Measured 13d ago against content hash bd441874b1d5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

deidentify scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (deidentify.py, tests/test_deidentify_scan.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/deidentify/SKILL.md · 267 lines

How it starts

The opening of the file, as written. The whole thing — 267 lines — stays where its author put it; the contents beside it link to each section on GitHub.

De-identification Skill

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.

Critical Safety Rules

  1. NEVER ask the user to paste, show, or upload raw data containing PHI. The script processes data locally. You never need to see patient-level data.
  2. NEVER read or display the mapping file contents. It contains original PHI values.
  3. You may read the scan and reviewed reports (column classifications; no cell values) and the audit log (keyed hashes; no original values). Read the de-identified output only after the researcher has run the review and confirmed it; it has the identifiers they chose to anonymize removed, and nothing more (see "What the tool does not do").
  4. Always communicate in the user's preferred language about the process, but use English for technical terms (PHI, HIPAA, Safe Harbor, etc.).
  5. The researcher runs the script in their own terminal, not through you (no ! prefix, no Bash tool call): the review prints sample values of every column.
  6. Before you run your own check on a file that may still hold identifiers (a header check, a structure look, a duplicate search), decide what the command will print and keep it to counts and true/false results, for every sheet of a workbook. Compare headers with an expected list without printing the ones not on it, because a header, or a first data row read as a header, can itself be an identifier. A search for an identifier's label (a word such as "MRN" or "name") that prints the matching lines can print the values on those lines, so the intent to only check structure does not keep them off the screen.

Reference Files

  • ${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 practices

Read the full file on GitHub · 267 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 13d ago Changed · +7 lines bd441874b1d5
  2. 14d ago Changed · -6 lines 23889aa8b318
  3. 1mo ago Changed · +4 lines bfc9300df626
  4. 1mo ago Changed · +10 lines 6d393a1b2e68
  5. 1mo ago Changed · +1 lines 6e242ae5ebb3
  6. 2mo ago Changed · +10 lines 689c838b85db
  7. 2mo ago Changed · +1 lines f84201b9adcc
  8. 2mo ago Changed · +36 lines · -22 tokens per session 11bdf7ea91bf
  9. 3mo ago First seen · 204 lines · 76 tokens per session scan A 04e6883fad7b

Subscribe to this mod's changes

deidentify is a skill published in the GitHub repository Aperivue/medsci-skills (418 stars, last pushed 4d ago), licensed MIT. It adds 54 tokens to every session and 3,771 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

deidentify compared with skills from other repositories

deidentify next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
deidentifyAperivue/medsci-skillsSkill4184d agoMITA54Claude Code
clinical-trials-searchbeita6969/ScienceClawSkill1.0kyesterdayMITB28Claude Code, Codex
shidiIcyCreamDAS/shidi-skillSkill151mo agoMITA126Claude Code, Codex
shidiIcyCreamDAS/shidi-skillSkill151mo agoMITA69Claude Code, Codex
clinical-researchbestagentkits/agency-skillsSkill285mo agoMITA152Codex
sr-search-recordqiaomiaojoe/ai-academic-workflowSkill1313d agononeA447Claude Code, Codex
critical-paper-readingqiaomiaojoe/ai-academic-workflowSkill1313d agononeA191Claude Code, Codex