SafetyAppears in · Background / Inline / ToastAdded

secret-redactor

Swaps secrets, emails and IPs for placeholders before the model reads them.

secret-redactor · Effect preview · IllustrationIllustrative
> Add pagination to the order list
⏺ I’ll look at the list component first.
$ cat .env
ANTHROPIC_API_KEY=[REDACTED-SECRET-164d0c98]
SUPPORT_EMAIL=[REDACTED-EMAIL-6f096ff7]
EDGE_ORIGIN=[REDACTED-IP-6fc52d2b] · 3 hidden (illustrative)

Runs in the background, with no interface. These are illustrative logs.

❯

Illustration. Actual results depend on the mod, terminal and environment.

Install

/plugin marketplace add ray-amjad/awesome-claude-code-function-hooks
/plugin install secret-redactor@awesome-claude-code-function-hooks
/reload-plugins

Run these commands one at a time in a Claude Code session.

What it accesses

Based on the author’s documentation, checked when listed; use claude plugin validate to check for yourself.

Reads

Yes

Reads your prompts, tool inputs and results, and the context blocks attached to the first message.

Writes files

None

Runs commands

Unspecified

Not stated explicitly in README; no process launches seen in code.

Network

Unspecified

Not stated; makes no requests itself but rewrites prompts and tool results sent to the model.

Introduction

secret-redactor is a Claude Code mod that keeps three kinds of value out of the session transcript: secrets, email addresses and IP addresses.

  • Swapped, not destroyed: each value goes into an in-memory vault for the session, and the transcript gets a stable placeholder such as [REDACTED-SECRET-164d0c98].
  • Restored for tools: the real value goes back into a tool's input (Bash, Write) and is hidden again in its result.
  • Three hooks: pasted prompts, tool results (cat .env, a config Read, an API answer), and context attached to the first message.
  • Detection: vendor shapes (sk-ant-, ghp_, AKIA, JWTs, private keys), high-entropy mixed-case tokens, and tokens after names like API_KEY=; Stripe public ids, word-list names and git SHAs are left alone. Private IPs stay visible by default.

The author states nothing goes to disk and the vault dies with the session; it does not hide a secret the model itself writes. The README still describes the early-access flag CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 and names no version, so its fit with the 2.1.287 baseline is unconfirmed.

Who it is for

  • People who don't want API keys or customer emails in the session transcript

Requirements

  • The README asks for CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 (early-access instructions).
  • The vault is memory only; placeholders are meaningless after a restart.