0xelitesystem

Agent Leaks — AI skill for Claude Code

AI community

Scan and redact leaked secrets sitting in your AI agent session transcripts.

How to install Agent Leaks

This entry records only its repository, not the path inside it, so there is no exact command to give. Open 0xelitesystem/agent-leaks and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Agent Leaks does

Scan and redact leaked secrets sitting in your AI agent session transcripts. Your agent ran `cat .env` once, and that key is in ~/.claude/projects forever.

Alternatives in AI

  • Cl4r1t4s — LEAKED SYSTEM PROMPTS FOR CHATGPT, CLAUDE, GEMINI, GROK, PERPLEXITY, CURSOR, LOVABLE, REPLIT, AND MORE 47.2k ★
  • System Prompts Leaks — Extracted system prompts from ChatGPT (GPT-5.4, GPT-5.3, Codex), Claude (Opus 4.6, Sonnet 4.6, Claude Code), G 38.6k ★
  • Claude Fable 5 System Prompt Clean — the optimized, token-efficient version of the leaked Claude Fable 5 / Mythos 5 system prompt 475 ★

README

agent-leaks

Your agent read your `.env` three weeks ago. **That key is still sitting in a plaintext transcript.**

`agent-leaks` scans Claude Code session transcripts for leaked secrets and redacts them in place. It finds the API keys, tokens, connection strings, and private keys that ended up in `~/.claude/projects/`, from every `cat .env`, every grep hit on a credentials file, every API error body your agent ever saw, and scrubs them without breaking the transcript.

Zero dependencies. Pure Python stdlib. Works offline, no API keys, nothing leaves your machine.

The problem

Claude Code persists everything an agent sees to plaintext JSONL transcripts in `~/.claude/projects//.jsonl`, forever. File contents your agent read, including secrets, are stored verbatim. This is [a known, open issue](https://github.com/anthropics/claude-code/issues/44868): read file contents are persisted to disk in plaintext, and a `CLAUDE.md` rule saying "never read .env" is advisory, the model can ignore it, and one `cat .env` inside a script's output bypasses it entirely.

This is not theoretical. [agentfluent#72](https://github.com/frederick-douglas-pearce/agentfluent/issues/72) documents **two live Anthropic API keys** found sitting in session JSONL files. Every transcript viewer, every backup, every synced home directory carries them along.

Tools like claude-vault work on *prevention*, keeping secrets out of the agent's view in the first place. agent-leaks is the other half: **detection + remediation for what's already in your transcripts**. You probably have months of session history from before you hardened anything. This is the tool that goes back and cleans it.

What it finds

  agent-leaks, secrets in your agent transcripts

  demo-session.jsonl  -  examples  -  8 lines
  ⚠ HIGH anthropic-api-key        line 3     sk-a...(47 chars)  ×3
  ⚠ HIGH aws-access-key-id        line 3     AKIA...(20 chars)  ×3
  ⚠ HIGH connection-string        line 3