v0.5.0 A mod for Claude Code

Your secrets never
leave the prompt.

redact-secrets masks emails, phone numbers, API keys, passwords, cards, IBANs and national IDs in your prompts, and in the files and command output Claude's tools read, before the model sees them. Locally, with no network and no setup.

Install the mod Try it live →
> /plugin install redact-secrets --marketplace webdiego/redact-secrets
Playground

Type something you shouldn't.

This runs the mod's own patterns in your browser. Nothing you type leaves this page.

You type
The model reads
What it masks

Seven kinds of data. One placeholder.

Every match becomes ⟦kind:abc•••⟧: the model still knows what was there, you still know which value it was.

01 · key

API keys & tokens

OpenAI, Anthropic, Stripe, GitHub, AWS, Google, Slack, JWTs, Bearer tokens, private key blocks and any long mixed token.

sk-ant-… → ⟦key:sk-•••⟧
02 · secret

Passwords & secrets

Values of PASSWORD=, api_key:, *_TOKEN and the password in user:pass@host URLs. Env lookups stay.

PASSWORD=hunter2 → PASSWORD=⟦secret:hun•••⟧
03 · email

Email addresses

Any address, Unicode letters included.

josé@müller.de → ⟦email:jos•••⟧
04 · phone

Phone numbers

International formats and native numerals: Arabic, Persian, Devanagari.

+39 333 123 4567 → ⟦phone:+39•••⟧
05 · card

Card numbers

13 to 19 digits, with spaces or dashes.

4111 1111 … → ⟦card:411•••⟧
06 · bank_account

IBANs

Every country, spaces optional.

DE89 3704 … → ⟦bank_account:DE8•••⟧
07 · id

National IDs

Nine countries, switchable from /config.

RSSMRA85T10A562S → ⟦id:RSS•••⟧
— · left alone

Not secrets

Dates, times, IP addresses, commit hashes, UUIDs, years, prices and ports. Logs stay readable.

192.168.1.20 → 192.168.1.20
How it works

A safety net between Enter and the model.

One hooks module, running inside Claude Code on the exact text you send and every tool result the model reads.

1

You press Enter

prompt.submit fires before the prompt enters the session. Slash commands pass through untouched.

2

It masks locally

Matches become placeholders. The engine, the model, the stored transcript and other plugins only see the masked text.

3

Tools are masked too

tool.call masks what Read, Bash, WebFetch and MCP tools return. An Edit or Write that would put a placeholder over a real value is refused.

4

It fails closed

If the check ever breaks, the prompt is dropped and the tool output withheld, never passed on unmasked.

claude — redact-secrets
> write to 🔒 mar•••, tel 🔒 +39•••, my tax code is 🔒 RSS•••
🔒 Sensitive data masked before sending: 📧 1 · 📞 1 · 🪪 1
Configure

Your countries. Your color.

Pick the national ID formats to cover and the highlight color at install, or later from /config. The toast speaks 35 languages.

🇮🇹 Italy codice fiscale
🇺🇸 United States SSN
🇬🇧 United Kingdom NINO
🇪🇸 Spain DNI / NIE
🇫🇷 France NIR
🇧🇷 Brazil CPF
🇮🇳 India PAN
🇲🇽 Mexico CURP
🇨🇳 China resident ID

Install it in one line.

Free, open source, MIT licensed. Active immediately, no restart.