
Stop AI Dev Tools from Leaking Secrets: A 50-Line Claude Code Hook
A working UserPromptSubmit hook for Claude Code that catches accidentally pasted API keys before the prompt ever reaches the Anthropic API, with the full PowerShell script, 18 passing tests, and a comparison to GitHub Copilot.














