pre-flight-check

pre-flight-check is a cursor rule for Cursor from mirekondro/The-Pre-Flight-Check. It costs 982 tokens per session, scanned B, original, MIT.

A mandatory pre-completion check that runs type checking, linting, tests, and a security audit in order.

In plain words
What is it for?
Use it after edits and before reporting completion, committing code, pushing changes, or marking a pull request ready for review.
Why use it?
It stops at the first failing check so broken or unverified code is not declared finished, committed, or pushed.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 .pre-flight-check/scripts/run-pipeline.py.

Good fit Use it after edits and before reporting completion, committing code, pushing changes, or marking a pull request ready for review.

Compare 6 cursor rules from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/mirekondro/The-Pre-Flight-Check
agentmods
npx agentmods add rules/mirekondro/the-pre-flight-check/pre-flight-check

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pre-flight-check

README.md
[![agentmods](https://agentmods.dev/badge/rules/mirekondro/the-pre-flight-check/pre-flight-check/github.svg)](https://agentmods.dev/rules/mirekondro/the-pre-flight-check/pre-flight-check)
Your own site
<a href="https://agentmods.dev/rules/mirekondro/the-pre-flight-check/pre-flight-check"><img src="https://agentmods.dev/badge/rules/mirekondro/the-pre-flight-check/pre-flight-check/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pre-flight-check

Your own site · 80×15
<a href="https://agentmods.dev/rules/mirekondro/the-pre-flight-check/pre-flight-check"><img src="https://agentmods.dev/badge/rules/mirekondro/the-pre-flight-check/pre-flight-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 982 This file is loaded in full into every session.
When invoked 982 The same file — it is already loaded in full.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00982 $0.00982
Opus 5 $0.00491 $0.00491
Sonnet 5 $0.00196 $0.00196
Haiku 4.5 $0.00098 $0.00098

Measured 8d ago against content hash d4a920818e7b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade B, and why

pre-flight-check scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codemediumSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -fsSL https://raw.githubusercontent.com/mirekondro/The-Pre-Flight-Check/main/install.sh | bash -s -- --project

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -fsSL https://raw.githubusercontent.com/mirekondro/The-Pre-Flight-Check/main/install.sh | bash -s -- --project
adapters/cursor/pre-flight-check.mdc · 111 lines

How it starts

The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Pre-Flight Check

Run this pipeline before declaring a task complete, before committing or pushing, and after applying any bug fix.

How to run

python3 .pre-flight-check/scripts/run-pipeline.py

Auto-detects Node.js (package.json) and Python (pyproject.toml, requirements.txt, etc.). Runs Typecheck → Lint → Test → Security Audit sequentially. Stops on first failure.

Mandatory trigger rule

You MUST run the pre-flight check before:

  • Saying "done", "fixed", "complete", "ready to commit", or any synonym.
  • Staging, committing, or pushing code.
  • Opening or marking a pull request ready for review.
  • Switching to a different task after making code edits.

Output

Block Exit code Meaning
### ✅ PRE-FLIGHT PASSED 0 All gates green — proceed.
### ❌ PRE-FLIGHT FAILURE: [STAGE] 1 Gate failed — stop and fix.
### ⚠️ PRE-FLIGHT SKIPPED: … 1 Runtime undetected or no tools — resolve first.

Strict Fail-Fast Protocol

If you see ### ❌ PRE-FLIGHT FAILURE, you are FORBIDDEN from:

  • Declaring the task done.
  • Committing, staging, or pushing.
  • Switching to another task or file.
  • Using // @ts-ignore, # type: ignore, # noqa, eslint-disable, or any suppress/ignore mechanism.
  • Deleting or skipping a failing test.
  • Adding a package or file to an ignore list to silence the audit/lint.
  • Re-running the pipeline unchanged hoping for a different result.

Only permitted action: fix the exact error shown, re-run, repeat until ### ✅ PRE-FLIGHT PASSED.

Reading the failure block

### ❌ 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'.

Extract in order:

  1. Stage name — selects the repair recipe below.
  2. Command Executed — confirms which tool failed. Never guess.
  3. Context for AI Fix — file path + line:col + rule/error code + message verbatim.

Read the full file on GitHub · 111 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 111 lines · 982 tokens per session scan B d4a920818e7b

Subscribe to this mod's changes

pre-flight-check is a cursor rule published in the GitHub repository mirekondro/The-Pre-Flight-Check (2 stars, last pushed 2mo ago), licensed MIT. It adds 982 tokens to every session, about $0.0049 per session on Opus 5. A static security scan graded it B with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.