Secret Preflight — AI skill for Claude Code
Go/no-go check for leaked secrets before you commit or push.
How to install Secret Preflight
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open Medenor/secret-preflight and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Secret Preflight does
Go/no-go check for leaked secrets before you commit or push. A Claude Code skill with a masking scanner: raw values never reach the model, pushed secrets are flagged CRITICAL, and PII is checksum-validated. Pure Python, no dependencies.
Alternatives in AI
- Cl4r1t4s — LEAKED SYSTEM PROMPTS FOR CHATGPT, CLAUDE, GEMINI, GROK, PERPLEXITY, CURSOR, LOVABLE, REPLIT, AND MORE 47.2k ★
- Codex Plugin — 's /codex:adversarial-review command 9.6k ★
- Skill Debate — Structured four-way AI debates between Claude, Sonnet, Gemini, and Codex — use for critical decisions 2.8k ★
README
secret-preflight
**A go/no-go check for leaked secrets before you commit or push.** An agent skill for [Claude Code](https://docs.claude.com/en/docs/claude-code) and Claude.
Ask *"is it safe to push?"* and Claude runs a deterministic scanner over exactly what is about to leave your machine, then answers **GO**, **HOLD** or **NO-GO**, with the one action to take first.
## 🛫 Secret preflight — NO-GO
`push` · `my-repo` · 3 commits ahead of `origin/main` · 412 files
**1 blocker must be fixed before pushing.** 1 item to review · 37 notices.
### ⛔ Blockers
| ID | Where | What | Exposure | First action |
|---|---|---|---|---|
| C1 | `deploy.sh:2` | GitHub token `ghp_****… (40 chars)` | pushed in `a1b2c3d` | Revoke the token now |
| H1 | `keys/server.pem` | Private key file | untracked, not ignored | Add to `.gitignore` |
...
Why another secret scanner?
Most agent-based scanners ask the model to grep for patterns. That has three problems this skill is built to avoid.
| Problem | What secret-preflight does |
|---|---|
| Grep puts the raw secret into the conversation (and into logs and transcripts) | Detection runs in scripts/scan.py, which masks every value before printing. The agent only sees ghp_****… (40 chars). |
| The wrong scope. Scanning the working tree misses what actually gets pushed. | Three modes: staged (pre-commit), push (every unpushed commit, including a secret added and then deleted) and tree (including files committed despite .gitignore). |
| "Delete the line" is the wrong fix once a secret is pushed | The script checks remote-tracking history. Pushed secrets become CRITICAL, and the first action is rotate, not edit. |
Other differences:
- Fewer false positives. Placeholders,
${ENV}references, variable names and field-name keys (password_field_name) are filtered out. PII is reported only when its checksum validates (Luhn, IBAN mod-97, Chinese ID, Belgian national number). Test, fixture
Related Skills
Claude Code Redact
Claude Code mod that redacts secrets and PII before the model reads them, stores placeholders in the conversat
DontFeedTheAI
Transparent anonymization proxy for AI-assisted pentesting. Strips IPs, credentials, hostnames and PII before
PIIGuardAI
A macOS menu bar app that blocks messages containing PII before they reach Claude, ChatGPT, Gemini, and other
Local Secure Prompt Agent
Browser extension that redacts PII (emails, phone numbers, Aadhaar/PAN, API keys, names, locations) from promp
Klarion
AI-powered secret scanner for code and git history. Finds leaked API keys, tokens and credentials with near-ze
Ranwhat
Flight recorder and secret scanner for AI coding agents. Reads what Claude Code, Codex, Gemini CLI and 9 more
Related Agents
ForensicAgent
Forensic security analyst — PII detection, secret scanning, identity leak auditing across git history, staged
Opensource Sanitizer
Pre-public-push safety net. Scans a diff or working tree for leaked secrets, PII, internal references, interna
Data Quality Engineer
Adds schema, freshness, volume, idempotency, and PII-handling checks to a data pipeline before it ships. Cover