Pii Detect
ruvnet/ruflo
Detect and flag personally identifiable information (PII) in text, code, and configurations.
Detect PHI/PII spans in clinical text with OpenMed's extractpii without altering the text.
$ npx skills add maziyarpanahi/openmed --skill extracting-pii-entities -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install maziyarpanahi/openmed extracting-pii-entities --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/maziyarpanahi/openmed.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/extracting-pii-entities .claude/skills/extracting-pii-entities && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "extracting-pii-entities" agent skill from https://github.com/maziyarpanahi/openmed/tree/master/skills/extracting-pii-entities into .claude/skills/extracting-pii-entities/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "extracting-pii-entities", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/maziyarpanahi/openmed/tree/master/skills/extracting-pii-entitiesType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add maziyarpanahi/openmed --skill extracting-pii-entities -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install maziyarpanahi/openmed extracting-pii-entities --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/maziyarpanahi/openmed.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/extracting-pii-entities .agents/skills/extracting-pii-entities && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "extracting-pii-entities" agent skill from https://github.com/maziyarpanahi/openmed/tree/master/skills/extracting-pii-entities into .agents/skills/extracting-pii-entities/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "extracting-pii-entities", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add maziyarpanahi/openmed --skill extracting-pii-entities -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install maziyarpanahi/openmed extracting-pii-entities --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/maziyarpanahi/openmed.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/extracting-pii-entities .cursor/skills/extracting-pii-entities && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "extracting-pii-entities" agent skill from https://github.com/maziyarpanahi/openmed/tree/master/skills/extracting-pii-entities into .cursor/skills/extracting-pii-entities/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "extracting-pii-entities", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/maziyarpanahi/openmed.git --path skills/extracting-pii-entities--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add maziyarpanahi/openmed --skill extracting-pii-entities -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install maziyarpanahi/openmed extracting-pii-entities --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/maziyarpanahi/openmed.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/extracting-pii-entities .gemini/skills/extracting-pii-entities && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "extracting-pii-entities" agent skill from https://github.com/maziyarpanahi/openmed/tree/master/skills/extracting-pii-entities into .gemini/skills/extracting-pii-entities/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "extracting-pii-entities", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install maziyarpanahi/openmed extracting-pii-entitiesInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add maziyarpanahi/openmed --skill extracting-pii-entities -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/maziyarpanahi/openmed.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/extracting-pii-entities .github/skills/extracting-pii-entities && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "extracting-pii-entities" agent skill from https://github.com/maziyarpanahi/openmed/tree/master/skills/extracting-pii-entities into .github/skills/extracting-pii-entities/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "extracting-pii-entities", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add maziyarpanahi/openmed --skill extracting-pii-entities -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install maziyarpanahi/openmed extracting-pii-entities --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/maziyarpanahi/openmed.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/extracting-pii-entities .opencode/skills/extracting-pii-entities && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "extracting-pii-entities" agent skill from https://github.com/maziyarpanahi/openmed/tree/master/skills/extracting-pii-entities into .opencode/skills/extracting-pii-entities/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "extracting-pii-entities", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
extracting-pii-entitiesDetect PHI/PII spans in clinical text with OpenMed's extractpii without altering the text.
Extracting Pii Entities is an agent skill from maziyarpanahi/openmed. Detect PHI/PII spans in clinical text with OpenMed's extractpii without altering the text. Use when the user wants to find names, dates, MRNs, phone numbers, addresses, SSNs, or other identifiers and get their offsets and labels (not redact them), inspect what would be removed before de-identifying, route spans to a custom redactor, normalize labels to a canonical taxonomy, or filter by confidence and language. Covers extractpii, the PIIEntity fields, CANONICALLABELS / normalizelabel, and how it differs from…
Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
The repository describes itself as: Local-first healthcare AI: clinical NER and HIPAA PII de-identification on hardware you control. 2,200+ medical models, 35 model-backed PII languages, and Python, MLX, Android… The licence is Apache-2.0.
Read from SKILL.md and the folder at commit 34d7b8c. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
pipFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
hhs.govhuggingface.coFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Extracting Pii Entities loads about 1.7k tokens when it runs. Until then it costs about 155 tokens; SKILL.md has 502 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from maziyarpanahi/openmed at commit 34d7b8c, republished under its Apache-2.0 licence (© maziyarpanahi). 502 words, ~1,745 tokens.
.claude/skills/extracting-pii-entities/SKILL.md (or your agent's skills folder).openmed.extract_pii finds PHI/PII spans and returns them without changing the
text. Use it when you need to see the identifiers — to audit, route to a
custom redactor, or decide a policy — rather than produce redacted output. It runs
on-device.
deidentify would act on before committing.deidentify).If you instead want redacted/masked output directly, use
deidentifying-clinical-text (openmed.deidentify). If you need reversible
masking, see reidentifying-text.
extract_pii | deidentify | |
|---|---|---|
| Changes the text? | No | Yes (mask/remove/replace/hash/shift) |
| Returns | PredictionResult (spans) | DeidentificationResult (redacted text) |
| Default threshold | 0.5 | 0.7 (safety-biased) |
| Use for | detection, audit, routing | producing safe output |
pip install "openmed[hf]"import openmed
note = "Patient John Doe (MRN 00481726), DOB 1970-01-15, phone 617-555-0142."
result = openmed.extract_pii(note, confidence_threshold=0.5)
for ent in result.entities:
print(f"{ent.label:10} {ent.text!r:18} {ent.confidence:.2f} [{ent.start}:{ent.end}]")extract_pii(...) returns a PredictionResult. Its .entities are PIIEntity
objects (synthetic example fields shown):
ent.text # the identifier surface string, e.g. "617-555-0142"
ent.label # detected label, e.g. "PHONE"
ent.confidence # model score in [0, 1] (NOTE: .confidence, not .score)
ent.start / ent.end # character offsets into the original note
ent.canonical_label # label mapped to OpenMed's canonical taxonomy (if set)
ent.entity_type # same as labelThe text is unchanged — result.text is your original input.
openmed.extract_pii(
text,
model_name="OpenMed/OpenMed-PII-SuperClinical-Small-44M-v1", # default EN model
confidence_threshold=0.5, # raise for precision, lower for recall
use_smart_merging=True, # merge fragmented spans into whole units
lang="en", # en es pt fr de it nl hi te ar tr ja
loader=None, # reuse a ModelLoader across calls
)use_smart_merging=True (default) reassembles fragmented predictions into
complete units (a full phone number, a full date) — keep it on.lang selects the language-appropriate default model and regex patterns.
Pass the right language; do not run the English model on non-English text. Use
openmed.get_default_pii_model(lang) to confirm coverage.Different models may emit slightly different label spellings. Normalize them to OpenMed's canonical set so downstream logic is stable:
import openmed
from openmed import CANONICAL_LABELS, normalize_label
result = openmed.extract_pii("Email jane.roe@example.org; SSN 123-45-6789.")
for ent in result.entities:
canon = ent.canonical_label or normalize_label(ent.label)
assert canon in CANONICAL_LABELS or canon == "OTHER"
print(ent.text, "->", canon)CANONICAL_LABELS is a frozenset of UPPER_SNAKE_CASE labels (e.g. PERSON,
DATE, PHONE, EMAIL, SSN, ID_NUM, LOCATION). normalize_label(label)
accepts messy inputs ("FIRSTNAME", "first_name", "B-EMAIL") and maps unknown
labels to OTHER rather than raising.
extract_pii gives you offsets; you decide the action. A simple offset-based
redactor (replace highest-offset first so positions stay valid):
import openmed
note = "Patient John Doe, MRN 00481726, seen 2024-03-02."
result = openmed.extract_pii(note, confidence_threshold=0.6)
redacted = note
for ent in sorted(result.entities, key=lambda e: e.start, reverse=True):
redacted = redacted[:ent.start] + f"[{ent.label}]" + redacted[ent.end:]
print(redacted) # Patient [PERSON], MRN [ID_NUM], seen [DATE].For production redaction, masking strategies, and policy profiles, hand the work
to openmed.deidentify instead of hand-rolling — it adds a safety sweep and
date-shifting (see deidentifying-clinical-text).
deidentifying-clinical-text: once you have reviewed the spans, call
openmed.deidentify(note, method="mask", policy="hipaa_safe_harbor") to produce
safe output — it re-detects with a higher default threshold for safety.reidentifying-text: if you need reversibility, use
openmed.deidentify(..., keep_mapping=True) and store the mapping securely.extract_pii spans (label, start,
end) translate cleanly into other recognizers' result formats; OpenMed also
ships an Anonymizer (openmed.Anonymizer) for richer surrogate generation..confidence, not .score. PIIEntity extends
EntityPrediction.extract_pii never changes text — if a caller
expected redacted output, they want deidentify.0.5 favors recall (good for finding PHI to review).
For removing PHI, prefer deidentify's safety-biased 0.7 default.lang silently lowers recall. Verify with
get_default_pii_model(lang).openmed.CANONICAL_LABELS / openmed.normalize_label.© maziyarpanahi, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/extracting-pii-entities of maziyarpanahi/openmed.
Open the folder on GitHubat commit 34d7b8c
Extracting Pii Entities next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Extracting Pii Entities this skillmaziyarpanahi/openmed | 5.5k | — | ~1.7k | Automated safety check: Pass | Apache-2.0 | |
| Pii Detectruvnet/ruflo | 74k | — | ~350 | Automated safety check: Notes | MIT | |
| Detecting Model Extraction Attacksmukul975/Anthropic-Cybersecurity-Skills | 34k | — | ~2.9k | Automated safety check: Pass | Apache-2.0 | |
| Entity ExtractionNxcoreAI/EverRoom | 3k | — | ~158 | Automated safety check: Pass | Custom licence | |
| Outcome Extraction For Clinical Trialsaipoch/medical-research-skills | 1.9k | — | ~1.4k | Automated safety check: Pass | MIT | |
| Baseline Extraction For Clinical Trialsaipoch/medical-research-skills | 1.9k | — | ~1.2k | Automated safety check: Pass | MIT |
ruvnet/ruflo
Detect and flag personally identifiable information (PII) in text, code, and configurations.
mukul975/Anthropic-Cybersecurity-Skills
Detect MITRE ATLAS AML.T0024 attacks (model stealing, inversion, membership inference) performed via inference-API abuse, by monitoring per-principal query volume/distribution, rate-limiting and…
NxcoreAI/EverRoom
Extract searchable entities and a concise summary from a document for EverRoom knowledge routing.
aipoch/medical-research-skills
Clinical research outcome extraction for meta-analysis. An agent skill from aipoch/medical-research-skills.
aipoch/medical-research-skills
Extracts clinical trial baseline data (study, region, participants, etc.) from article text or PMID.
davila7/claude-code-templates
Write comprehensive clinical reports including case reports (CARE guidelines), diagnostic reports (radiology/pathology/lab), clinical trial reports (ICH-E3, SAE, CSR), and patient documentation…
maziyarpanahi/openmed
Checks OpenMed de-identified clinical text against the 18 HIPAA Safe Harbor identifier categories and reports gaps and residual re-identification risk.
maziyarpanahi/openmed
Fills in a model card for an OpenMed clinical NER or de-identification model from its evaluation reports: intended use, metrics, subgroups and limitations.
maziyarpanahi/openmed
Walks a data pipeline against the HIPAA Privacy and Security Rule checklist and produces a gap report before it processes patient data.
maziyarpanahi/openmed
Suggests candidate ICD-10-CM diagnosis and ICD-10-PCS procedure codes for clinical text extracted by OpenMed, with rationale for a certified coder to review.
maziyarpanahi/openmed
Maps OpenMed-extracted, terminology-coded conditions, drugs and measurements into OMOP CDM v5.4 tables for OHDSI and ATLAS analytics.
maziyarpanahi/openmed
Finds social risks such as housing instability or food insecurity in clinical notes and proposes matching ICD-10-CM Z-codes for a coder to confirm.
Detect PHI/PII spans in clinical text with OpenMed's extractpii without altering the text. Extracting Pii Entities is an agent skill from maziyarpanahi/openmed. Detect PHI/PII spans in clinical text with OpenMed's extractpii without altering the text.
Extracting Pii Entities fits situations like: the user wants to find names; other identifiers and get their offsets and labels (not redact them); inspect what would be removed before de-identifying; route spans to a custom redactor.
Run `npx skills add maziyarpanahi/openmed --skill extracting-pii-entities -a claude-code`. Or copy the skill folder (skills/extracting-pii-entities in maziyarpanahi/openmed) into .claude/skills/extracting-pii-entities in your project. Claude Code loads it when a task matches its description.
Run `npx skills add maziyarpanahi/openmed --skill extracting-pii-entities -a codex`. Or copy the skill folder (skills/extracting-pii-entities in maziyarpanahi/openmed) into .agents/skills/extracting-pii-entities in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add maziyarpanahi/openmed --skill extracting-pii-entities -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/extracting-pii-entities, .gemini/skills/extracting-pii-entities, .github/skills/extracting-pii-entities and .opencode/skills/extracting-pii-entities in your project.
Going by SKILL.md and its folder, Extracting Pii Entities needs the command-line tools its instructions call (pip). Our summary lists: Python 3.
SKILL.md names 2 domains. As links in the text: hhs.gov and huggingface.co. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Extracting Pii Entities is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.7k tokens (SKILL.md is roughly 7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Extracting Pii Entities: Pii Detect (ruvnet/ruflo, 74k stars), Detecting Model Extraction Attacks (mukul975/Anthropic-Cybersecurity-Skills, 34k stars), Entity Extraction (NxcoreAI/EverRoom, 3k stars) and Outcome Extraction For Clinical Trials (aipoch/medical-research-skills, 1.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
maziyarpanahi (a GitHub user) maintains it in maziyarpanahi/openmed, which has 5,506 GitHub stars. The repository holds 74 skills in this directory. The repository was last updated on October 11, 2026.
Source: maziyarpanahi/openmed on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.