Medenor

Secret Preflight — AI skill for Claude Code

AI community

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