---
description: "Grep staged changes or a prompt for keys, passwords and connection strings before they leave the machine"
when_to_use: "Before you push code, or right before you paste a config file or log into a prompt"
allowed-tools: Read, Grep, Glob, Bash
argument-hint: "[what to run it on]"
---

Scan before commit or before sending a prompt: $ARGUMENTS (staged diff, files, or prompt text). Run `git diff --cached` and grep for patterns such as AKIA, sk_live, sk-, ghp_, xox, -----BEGIN, password=, Bearer, and URL credentials (://user:pass@). Also check for .env contents, MCP configs (.mcp.json, .cursor/mcp.json), and real customer data. Paste the commands used. Output: FOUND (file:line, type, first 6 characters only) / FILES TO UNSTAGE / REPLACEMENT (environment variable or secret-manager reference for each) / ROTATE (credentials already exposed, even in a local commit) / CLEAN (only when every command ran and returned nothing). Never print a full secret value.
 Even a known example key must never be called safe; print at most 6 characters of any value; if commands did not actually run, output only NOT RUN, never FOUND or CLEAN.
