AI Preflight
See your prompt's risk level, token budget, context waste, and security exposures before you send it to your AI tool. Live in the editor, with a @preflight chat helper.
ext install KiranChanda.ai-preflight Part of the AI Preflight family — one detection engine, two surfaces: this VS Code extension, a CLI, and the shared engine they’re both built on.
What it is — An editor companion that inspects your IDE context before you prompt your AI coding assistant, so you send lean, safe context instead of noise and risk.
What it does
- Context budget & token estimate — see how heavy your prompt context is, with configurable “heavy/bloated” bands, before you hit the model’s limits or degrade its answers.
- Waste detection — flags large/lock/env/generated files, too many open tabs, merge-conflict markers, and unsaved changes, with one-click cleanup.
- Security surfacing — hardcoded secrets (with credential-lifetime awareness), trap
files, prompt-injection / hidden-unicode in instruction files (
CLAUDE.md,.cursorrules, …), and MCP server-config hygiene. - Risk at a glance — a status-bar risk level and a sidebar panel that updates live as you switch files.
@preflightchat participant — ask it, right in chat, what to add or remove for the task at hand.
Why it matters: Most AI coding mistakes start with bad context — too much, too little, or something sensitive. Preflight makes that visible while you still control it.
Tech: TypeScript, Preact webview, esbuild.
Updates
-
Three new local checks for Cybersecurity Awareness Month — see what an agent can read, run, and use before you give it access.
- 🪤 Trap-file scanner — flags files that may be safe to inspect but dangerous to auto-process.
- 🔐 MCP hygiene — flags overly broad tool permissions and unpinned servers.
- 🪪 Credential lifetime — stronger warnings for static, non-expiring secrets than for short-lived ones.
Crossed 100 downloads 🙂 — thank you. Every check runs locally: nothing modified, nothing sent anywhere. Flag, explain, you decide.