secret-redactor
Swaps secrets, emails and IPs for placeholders before the model reads them.
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-pluginsRun these commands one at a time in a Claude Code session.
claude plugin marketplace add ray-amjad/awesome-claude-code-function-hooks
claude plugin install secret-redactor@awesome-claude-code-function-hooksThen run /reload-plugins in your session, or start a new session.
Please install the Claude Code mod "secret-redactor" (https://github.com/ray-amjad/awesome-claude-code-function-hooks). Before installing, read the Security and Requirements sections of its README and tell me what it reads and writes, which commands it runs, whether it uses the network, and which Claude Code version, OS and terminal it needs. If everything looks fine, run claude plugin marketplace add ray-amjad/awesome-claude-code-function-hooks and claude plugin install secret-redactor@awesome-claude-code-function-hooks, then remind me to run /reload-plugins in my session.Send this to Claude Code so it reads the author’s instructions before installing.
git clone https://github.com/ray-amjad/awesome-claude-code-function-hooks
cd awesome-claude-code-function-hooks
claude --plugin-dir ./plugins/secret-redactorClone the repository and try it in a local session with --plugin-dir.
What it accesses
Based on the author’s documentation, checked when listed; use claude plugin validate to check for yourself.
Reads
YesReads your prompts, tool inputs and results, and the context blocks attached to the first message.
Writes files
NoneRuns commands
UnspecifiedNot stated explicitly in README; no process launches seen in code.
Network
UnspecifiedNot 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 likeAPI_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.