Every time Claude Code, Codex CLI, Cursor, Antigravity, Windsurf, OpenCode, or Aider reads a .env file, runs env, or logs an API error, those live keys get written permanently into plaintext .jsonl transcripts and caches on your disk (~/.claude/projects/, ~/.codex/sessions/, ~/.cursor/, ~/.gemini/antigravity/brain/, etc.).
I audited my own machine and found 286 MB of local AI agent transcripts across 4 tools — with real live keys sitting in plaintext.
So I built agent-scrub — a zero-dependency, 100% offline Rust CLI + Browser Scanner + Agent Skill (MIT).
Option 1 — 100% offline Browser Scanner (zero install, zero uploads): https://rm-rf-enjoyer163.github.io/agent-scrub/.
Option 2 — Prebuilt native binaries (Windows / macOS / Linux): https://github.com/rm-rf-enjoyer163/agent-scrub/releases/tag/v1.0.1.
Option 3 — Install as an Agent Skill (Claude Code / Cursor / Codex / Antigravity):.
Recent findings suggest that in v1.0.0, compiling all 27 full regexes with Unicode \b and large bounded repetitions ({36,255}) directly into a single RegexSet caused real multi-megabyte JSONL files to slow down dramatically. Splitting detection into a pure-ASCII literal RegexSet prefilter ((?-u) — compiled by Rust's regex crate into SIMD Teddy/Aho-Corasick) followed by targeted rule extraction with length bounds checked in Rust pushed throughput to 1,827 MB/s on Linux CI and 1,760 MB/s on a 12-thread desktop.
Would love feedback on any other AI coding agents or secret formats I should add next!
