Skip to main content
ClaudeWave

Redacta — a Claude/Agent Skill that pseudonymises medical documents before AI processing

SkillsRegistry oficial2 estrellas0 forksTypeScriptMIT-0Actualizado today
Install as a Claude Code skill
Method: Clone
Terminal
git clone https://github.com/nickjlamb/redacta ~/.claude/skills/redacta
1. Clone the repository into your ~/.claude/skills directory (or copy the skill folder containing SKILL.md).
2. Start a new Claude Code session so the skill registry reloads.
3. Invoke it by name, or let Claude trigger it automatically when the task matches.
💡 If the repo bundles several skills, copy only the folders you need.

1 items en este repositorio

redactaSkill

Pseudonymises medical and clinical documents by replacing patient identifiers with labelled tokens (e.g. [PATIENT_NAME_1], [NHS_NUMBER_1], [DATE_OF_BIRTH_1]) so the text can be safely processed by AI or shared, with clinical meaning intact. Combines a deterministic pattern layer (NHS numbers with Modulus-11 validation, UK National Insurance numbers, dates of birth, UK postcodes, phone numbers, emails, hospital/MRN numbers) with contextual reasoning for patient names, postal addresses and identifying ages, then returns the redacted document plus a redaction report. Use when the user wants to redact, de-identify, anonymise or pseudonymise a medical letter, clinical note, discharge summary, referral or patient record, or before pasting clinical text into another AI tool. Can also re-identify (reverse the redaction) by restoring original values from a token map, and offers a stricter HIPAA Safe Harbor mode for US de-identification (all dates, ages, and the remaining HIPAA identifiers).

Instalar
Casos de uso

Resumen de Skills

# Redacta

Pseudonymise medical and clinical documents before they're processed by AI or
shared. Redacta replaces patient identifiers with labelled tokens —
`[PATIENT_NAME_1]`, `[NHS_NUMBER_1]`, `[DATE_OF_BIRTH_1]`, … — while leaving the
clinical meaning intact, and returns a redaction report alongside the cleaned
text.

It's an [Agent Skill](https://agentskills.io) (the open standard used by Claude
and other agents), so it drops into Claude Code, the Claude apps, or the API.

## How it works

Two layers:

- **Patterns (deterministic).** A bundled script (`scripts/redact_structured.py`,
  Python standard library only, no network) matches fixed-format identifiers:
  NHS numbers (Modulus-11 validated), UK National Insurance numbers, dates of
  birth, UK postcodes, phone numbers, emails, and hospital/MRN numbers. US SSN
  and ZIP codes are also handled.
- **Reasoning (judgement).** The skill then has the agent handle what patterns
  can't: patient names (told apart from the clinicians treating them), relatives
  and carers, postal addresses, and identifying ages.
- **Self-check.** A final pass re-reads the output for any identifier that slipped
  through before the report is written.

It also works in reverse. **Re-identification** (`scripts/reinstate.py`) takes the
token map from an earlier redaction and restores the original values — so you can
redact a document, run it through another AI tool, and put the real details back
locally. Redact → process → re-identify is a complete round trip, and identifiers
only ever exist on your machine.

**Safe Harbor mode.** Ask for HIPAA Safe Harbor (or "US de-identification") and
Redacta applies a stricter pass: *all* dates (not just the date of birth), all
specific ages, and the remaining HIPAA identifiers — fax, certificate/licence,
device serial, VIN, and health-plan beneficiary numbers.

## Install

**Claude Code**

```bash
git clone https://github.com/nickjlamb/redacta ~/.claude/skills/redacta
```

Then invoke it with `/redacta`, or let it trigger automatically when you ask to
redact or de-identify clinical text.

**Claude apps / API**

Zip the repository folder and upload it as a skill.

## Contents

| Path | What it is |
|------|------------|
| `SKILL.md` | The skill — instructions plus metadata |
| `reference.md` | Pattern specs, the Modulus-11 algorithm, NI prefix rules, the date-of-birth vs clinical-date rule, token vocabulary, limitations |
| `scripts/redact_structured.py` | The deterministic pattern layer |
| `scripts/reinstate.py` | The re-identification layer (restore originals from a token map) |
| `scripts/test_redact_structured.py` | Tests for the pattern layer |
| `scripts/test_reinstate.py` | Tests for the re-identification layer |
| `evaluations.json` | Example evaluation scenarios |

Run the tests:

```bash
python3 scripts/test_redact_structured.py
python3 scripts/test_reinstate.py
```

## A note on limits

Redacta is a strong first line of defence, not a guarantee. It won't catch every
possible identifier and isn't a substitute for formal data-protection processes.
Always review the redaction report before sharing text.

## License

[MIT-0](LICENSE) (MIT No Attribution). Built by
[PharmaTools.AI](https://www.pharmatools.ai/redacta).
agent-skillanonymizationclaudehealthcarellmpii

Lo que la gente pregunta sobre redacta

¿Qué es nickjlamb/redacta?

+

nickjlamb/redacta es skills para el ecosistema de Claude AI. Redacta — a Claude/Agent Skill that pseudonymises medical documents before AI processing Tiene 2 estrellas en GitHub y se actualizó por última vez today.

¿Cómo se instala redacta?

+

Puedes instalar redacta clonando el repositorio (https://github.com/nickjlamb/redacta) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.

¿Es seguro usar nickjlamb/redacta?

+

nickjlamb/redacta aún no ha sido auditado por nuestro agente de seguridad. Revisa el repositorio original en GitHub antes de usarlo en producción.

¿Quién mantiene nickjlamb/redacta?

+

nickjlamb/redacta es mantenido por nickjlamb. La última actividad registrada en GitHub es de today, con 0 issues abiertos.

¿Hay alternativas a redacta?

+

Sí. En ClaudeWave puedes explorar skills similares en /categories/skills, ordenados por popularidad o actividad reciente.

Despliega redacta en tu cloud

Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.

¿Mantienes este repo? Añade un badge a tu README

Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.

Featured on ClaudeWave: nickjlamb/redacta
[![Featured on ClaudeWave](https://claudewave.com/api/badge/nickjlamb-redacta)](https://claudewave.com/repo/nickjlamb-redacta)
<a href="https://claudewave.com/repo/nickjlamb-redacta"><img src="https://claudewave.com/api/badge/nickjlamb-redacta" alt="Featured on ClaudeWave: nickjlamb/redacta" width="320" height="64" /></a>

Más Skills

Alternativas a redacta
farion1231
cc-switch
yesterday

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io

99.4k6.6kRust
Skillsai-toolsclaude-codeInstall
code-yeongyu
oh-my-openagent
today

omo/lazycodex: The coding agent for tokenmaxxers;the one and only agent harness for complex codebases. For your Codex, for your OpenCode

62k5kTypeScript
Skillsaiai-agentsInstall
Egonex-AI
Understand-Anything
yesterday

Graphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.

58.2k4.8kTypeScript
Skillsantigravity-skillsbusiness-knowledgeInstall
K-Dense-AI
scientific-agent-skills
today

Turn any AI agent into an AI Scientist. The #1 Agent Skills library for science, used by 160,000+ scientists worldwide. 140 ready-to-use skills plus 100+ scientific databases covering biology, chemistry, medicine, and drug discovery. Compatible with Cursor, Claude Code, Codex, Antigravity, and the open Agent Skills standard.

28.1k2.9kPython
Skillsagent-skillsai-scientistInstall
VoltAgent
awesome-agent-skills
today

A curated collection of 1000+ agent skills from official dev teams and the community, compatible with Claude Code, Codex, Gemini CLI, Cursor, and more.

25.2k2.7k
Skillsagent-skillsai-agentsInstall
JimLiu
baoyu-skills
today

No description provided.

21.4k2.5kTypeScript
Skillsagent-skillsclaude-skillsInstall