Fail-fast quality gate for AI coding agents: Typecheck → Lint → Test → Security Audit. Stops the agent declaring 'done' on broken code.
Project description
✈️ pre-flight-check
Stop your AI coding agent from declaring "done" on broken code.
A universal quality gate that runs Typecheck → Lint → Test → Security Audit before any task is marked complete. Auto-detects Node.js and Python. Works with 10 AI coding tools.
Website · Install · How it works · Supported AI tools · Full guide
🌐 The landing-page source now lives in
site/and auto-deploys to GitHub Pages.
┌───────────┐ ┌──────┐ ┌──────┐ ┌────────────────┐
→ │ TYPECHECK │ → │ LINT │ → │ TEST │ → │ SECURITY AUDIT │ → ✅ cleared for takeoff
└───────────┘ └──────┘ └──────┘ └────────────────┘
↓ first failure halts the pipeline → ❌ exit 1
🛑 The problem
Your AI agent writes a function, watches it not throw at runtime, and reports "done" — while tsc
would have caught a type error in 50ms, eslint would have flagged dead code, and pytest would
have failed three tests.
pre-flight-check closes that loop. One command, four gates, structured failure output the agent
has to act on. No more "I've successfully implemented the feature!" while the build is on fire.
📦 Install
Pick the install path that matches your platform.
🍎 macOS · 🐧 Linux (Homebrew)
brew tap mirekondro/pre-flight-check
brew install pre-flight-check
🪟 Windows (Scoop)
scoop bucket add pre-flight-check https://github.com/mirekondro/The-Pre-Flight-Check
scoop install pre-flight-check
🐍 Any platform (pipx)
pipx install pre-flight-check
⚡ One-line install (no package manager)
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/mirekondro/The-Pre-Flight-Check/main/install.sh | bash
# Windows (PowerShell)
irm https://raw.githubusercontent.com/mirekondro/The-Pre-Flight-Check/main/install.ps1 | iex
🤖 Claude Code plugin marketplace
claude plugin marketplace add mirekondro/The-Pre-Flight-Check
claude plugin install pre-flight-check
Then in any project:
pre-flight-check init --tool claude # or cursor, codex, gemini, copilot, …
pre-flight-check init --tool all --project # install for every supported AI tool at once
See INSTALL.md for the full per-tool matrix and troubleshooting.
⚙️ What it does
When your AI agent says "I'm done," it doesn't always mean the code works. pre-flight-check
interposes a strict, fail-fast pipeline:
Typecheck → Lint → Test → Security Audit
The first stage that fails halts the pipeline, prints a structured Markdown block, and exits 1.
The agent reads that block and must fix the exact error before continuing.
Here's what the agent actually sees on a failure:
### ❌ PRE-FLIGHT FAILURE: TYPECHECK
**Command Executed:** `npx --no-install tsc --noEmit`
**Context for AI Fix:**
src/auth/session.ts(42,18): error TS2345: Argument of type 'string | undefined'
is not assignable to parameter of type 'string'.
It knows: which file (session.ts), which line (42:18), which rule (TS2345), and
what's wrong. No more "I think the auth flow is implemented."
On success:
### ✅ PRE-FLIGHT PASSED
All quality gates verified successfully.
🤖 Supported AI tools
| Tool | Native delivery path | One-liner |
|---|---|---|
| Claude Code | .claude/skills/pre-flight-check/ |
pre-flight-check init --tool claude |
| OpenAI Codex / AGENTS.md | AGENTS.md at repo root |
pre-flight-check init --tool codex --project |
| Gemini CLI | GEMINI.md + gemini-extension.json |
pre-flight-check init --tool gemini --project |
| Cursor | .cursor/rules/pre-flight-check.mdc |
pre-flight-check init --tool cursor --project |
| GitHub Copilot | .github/copilot-instructions.md |
pre-flight-check init --tool copilot --project |
| Windsurf | .windsurf/rules/pre-flight-check.md |
pre-flight-check init --tool windsurf --project |
| Cline | .clinerules/pre-flight-check.md |
pre-flight-check init --tool cline --project |
| Kiro | .kiro/steering/pre-flight-check.md |
pre-flight-check init --tool kiro --project |
| Roo Code | .roo/rules/pre-flight-check.md |
pre-flight-check init --tool roo --project |
| Agent Skills standard | .agents/skills/pre-flight-check/ |
pre-flight-check init --tool agents-skills --project |
Several tools (Codex, Copilot Coding Agent, Windsurf, Kiro) read
AGENTS.mdat the repo root as a fallback. Installing--tool codexalone gives broad ecosystem coverage.
✅ What it checks
| Stage | Node.js | Python |
|---|---|---|
| 1. Typecheck | tsc --noEmit (or npm run typecheck) |
mypy . |
| 2. Lint | eslint . (or npm run lint) |
ruff check . → flake8 . |
| 3. Test | jest / vitest (or npm test) |
pytest -q |
| 4. Security Audit | npm audit --audit-level=high |
pip-audit → bandit -r . |
Stages whose tools aren't installed are skipped silently — no false positives from missing optional gear.
🔍 How it works
- 🔎 Auto-detects the runtime from manifest files (
package.json,pyproject.toml,requirements.txt, …). - 📦 Picks the right package manager from the lockfile:
pnpm-lock.yaml→ pnpm,yarn.lock→ yarn,package-lock.json→ npm. - 🛠️ Prefers your existing scripts — if
package.jsondefineslint, the pipeline callsnpm run lintinstead of invokingeslintdirectly. - 🛑 Halts on first failure — no point linting code that doesn't typecheck.
- 🚫 Forbids escape hatches. The instruction file the AI agent reads (
SKILL.md,AGENTS.md,.cursorrules/*.mdc, etc.) explicitly bans// @ts-ignore,# type: ignore, deleting failing tests, adding to ignore lists, and other ways to mark the gate green without fixing the bug.
The whole engine is one Python file with zero runtime dependencies. Audit it in five minutes.
📋 Requirements
- Python 3.8+ on
PATH(the engine — no other Python dependencies) - Your project's existing dev tooling —
tsc,eslint,pytest, etc. We orchestrate, we don't replace.
That's it.
🚦 Project status
Stable. Used in production on the maintainer's own projects. The failure-block Markdown format is part of the public contract — any change to its shape is a major version bump.
Contributions welcome — see CONTRIBUTING.md. The bar for new features is high; the bar for new runtime adapters (Go, Rust, Ruby, …) and additional AI-tool adapters is low.
📄 License
pre-flight-check catches a bug for you that would have shipped —
⭐ star the repo so the next developer finds it too.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pre_flight_check-1.2.2.tar.gz.
File metadata
- Download URL: pre_flight_check-1.2.2.tar.gz
- Upload date:
- Size: 226.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38379270910a02a0595e4620c3b1a33ee29ff9eaab36bad52bd2ead04d3eb868
|
|
| MD5 |
a5dc37a24d5fa3b6761aba583e817459
|
|
| BLAKE2b-256 |
e82da736d7e99b42dd35b78b26f442c2633f5751004cc414de79debee0882bba
|
Provenance
The following attestation bundles were made for pre_flight_check-1.2.2.tar.gz:
Publisher:
release.yml on mirekondro/The-Pre-Flight-Check
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pre_flight_check-1.2.2.tar.gz -
Subject digest:
38379270910a02a0595e4620c3b1a33ee29ff9eaab36bad52bd2ead04d3eb868 - Sigstore transparency entry: 1802518962
- Sigstore integration time:
-
Permalink:
mirekondro/The-Pre-Flight-Check@4846701621348e3a03a7c684684c087516f801f6 -
Branch / Tag:
refs/tags/v1.2.2 - Owner: https://github.com/mirekondro
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4846701621348e3a03a7c684684c087516f801f6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pre_flight_check-1.2.2-py3-none-any.whl.
File metadata
- Download URL: pre_flight_check-1.2.2-py3-none-any.whl
- Upload date:
- Size: 35.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a1a9392ff68e0b4e4bc26d66243c5112f99101ccf2d55621199abd3f784532e
|
|
| MD5 |
02cd748cf226c5c1dd031e2223e66f45
|
|
| BLAKE2b-256 |
b09a01d3ee3bfcbbfcc52023a7fb77a9200444441ce184c439e2692e31c7f99e
|
Provenance
The following attestation bundles were made for pre_flight_check-1.2.2-py3-none-any.whl:
Publisher:
release.yml on mirekondro/The-Pre-Flight-Check
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pre_flight_check-1.2.2-py3-none-any.whl -
Subject digest:
9a1a9392ff68e0b4e4bc26d66243c5112f99101ccf2d55621199abd3f784532e - Sigstore transparency entry: 1802519411
- Sigstore integration time:
-
Permalink:
mirekondro/The-Pre-Flight-Check@4846701621348e3a03a7c684684c087516f801f6 -
Branch / Tag:
refs/tags/v1.2.2 - Owner: https://github.com/mirekondro
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4846701621348e3a03a7c684684c087516f801f6 -
Trigger Event:
push
-
Statement type: