vieko/pi-redact ? reverse-engineered prompt
Reverse engineered prompt
Build me a pi extension that keeps secrets out of my session transcripts.
I want it to automatically spot things like API keys, passwords, tokens, and secret values in my prompts, context files, tool output, and saved session history, then replace them with stable placeholders like [REDACTED SECRET abc12345]. The model should only see the placeholder, but if I use that placeholder in a local tool call, the real value should be put back just before the tool runs, so normal commands still work.
It should also hide secrets in tool results and in anything that gets persisted at the end of a message. I want a simple /redact command to show status and let me turn it on or off for the session. If there is already old session data on disk, add a script that can scan and rewrite leaked secrets safely and produce a report. Use the current pi extension docs if you need to, and keep it working cleanly with local tools and session resumes.
Are you gonna build this?
make sure you review the code using coderabbit