AI Preflight
See what context your AI coding tools are actually using — before you prompt. Catches secrets, prompt-injection, and wasted tokens, locally, with no data leaving your machine.
ext install KiranChanda.ai-preflight You hardcoded a password to debug something. You meant to remove it. You forgot. The file stayed open. Three prompts later — that secret is on a third-party server.
This is how credentials leak now. Not through commits. Not through pushes. Through prompts.
Every AI coding tool — Cursor, Copilot, Claude Code, Windsurf — reads your open
tabs as context. Your config files. Your credentials.json. That random
abc123.json inside .aws/cli/cache/ you forgot about. All of it becomes the
prompt. All of it goes to a third party.
Pre-commit hooks don’t catch this. GitGuardian doesn’t catch this. GitHub Push Protection doesn’t catch this. They all run too late — by the time your scanner notices, the secret has already left the building.
That’s the gap I built AI Preflight for. It reads your open files the way your AI does — before you prompt.
- 🔴 Hardcoded password buried in YAML? → flagged
- 🔴 Open
.aws/credentialstab? → flagged - 🔴 Random-looking secret? → entropy detection catches it
And it tells you exactly what’s about to happen:
“Sensitive files (~15k tokens) may be sent to Anysphere (Cursor)”
— the company name, the data size, and your decision. One click closes the tab; the secret stays on your machine.
Local-only. No telemetry. No network requests. Free. Open source.
What it does
- Always-on risk indicator — a status-bar badge showing context risk level (LOW / MEDIUM / HIGH) at a glance.
- Context breakdown — a sidebar panel with token estimates, a per-file breakdown, and context-window usage.
- Prompt-aware analysis — an
@preflightchat participant that classifies the task and detects missing context before you send. - Sensitive-file detection — 30+ patterns (SSH keys, certificates,
credentials,
.envfiles). - Data-flow transparency — shows which AI provider would receive sensitive data.
- Integrity scanner — inspects AI instruction files for hidden Unicode and prompt-injection attacks.
- Tool-aware — adapts to GitHub Copilot, Cursor, Claude Code, Windsurf, Amazon Q, Gemini, and ChatGPT.
- Waste detection — 20+ automatic rules, with 1-click fixes.
Install
In VS Code, open Quick Open (Ctrl/Cmd + P) and run:
ext install KiranChanda.ai-preflight
Or grab it from the VS Code Marketplace.
The bigger idea
The real risk isn’t in your repo — it’s in your context. You can’t fix what you can’t see. Preflight makes the invisible context visible, which is the same thesis behind my writing on how coding agents quietly make decisions, and how context quality — not raw model power — is what actually determines results.