Pre flight check
Skill mirekondro/The-Pre-Flight-Check/skills/pre-flight-check
Run this quality gate pipeline before committing code, completing a task, or when validating if a bug fix worked. It strictly checks Typechecking, Linting, Testing, and Security Audits sequentially.From its SKILL.md
npx -y skills add mirekondro/The-Pre-Flight-Check --skill pre-flight-checkAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 5 commands, including `python .claude/skills/pre-flight-check/scripts/run-pipeline.py` and 4 more.
SKILL.md
5.9 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it
Pre-Flight Check
A mandatory, fail-fast quality gate. Runs Typecheck → Lint → Test → Security Audit sequentially via scripts/run-pipeline.py. The script auto-detects the project runtime (Node.js or Python) and exits with code 1 on the first failing stage, emitting a structured Markdown block you must parse.
When to invoke
Run this skill without being asked at every one of these checkpoints:
- Before announcing a task is "done" — any task involving code edits.
- Before staging, committing, or pushing any change.
- After applying a bug fix — to confirm the fix holds across all gates, not just the failing test.
- Before opening a PR or marking work ready for review.
If you are about to say "done", "fixed", "complete", "ready to commit", or similar — stop and run this skill first.
How to run
Execute from the repository root:
python .claude/skills/pre-flight-check/scripts/run-pipeline.py
The script writes a header per stage as it progresses, then emits one of:
### ✅ PRE-FLIGHT PASSED— exit0. Safe to proceed.### ❌ PRE-FLIGHT FAILURE: [STAGE_NAME]— exit1. Stop and fix.### ⚠️ PRE-FLIGHT SKIPPED: …— exit1. Runtime undetected or no stages resolved. Resolve tooling before proceeding.
Strict Fail-Fast Protocol
If the script outputs ### ❌ PRE-FLIGHT FAILURE: [STAGE_NAME], you are FORBIDDEN from:
- Declaring the task done.
- Committing, staging, or pushing any code.
- Switching to a different task, file, or feature.
- Suppressing the error (no
// @ts-ignore, no# noqa, noeslint-disable, nopytest.skip, no removing the failing test, no wideningignoreglobs). - Re-running the pipeline hoping for a flake. Failures are real until proven otherwise by a fix in source.
Your only permitted next action is to repair the specific error reported by the failing stage and re-run the pipeline. Continue this loop until you see ### ✅ PRE-FLIGHT PASSED.
Stage-specific repair rules
TYPECHECK failure
- Parse
Context for AI Fixfor the file path and line number (e.g.src/foo.ts:42). - Read the offending file at that line with the
Readtool. - Fix the type at its source — narrow the type, add the missing field, correct the signature, or update the call site.
- Do not add
any,as unknown as X,# type: ignore, or equivalent escape hatches to silence the checker. If a cast is genuinely required (e.g. external untyped boundary), it must be the minimum-width cast at the narrowest possible scope, with a one-line comment explaining why. - Re-run the pipeline.
LINT failure
- Identify the rule ID and file from the context block.
- Run the project's auto-fix command first:
- Node:
npm run lint -- --fix/pnpm lint --fix/yarn lint --fix/npx eslint . --fix. - Python:
ruff check . --fixor the equivalent formatter (ruff format .,black .).
- Node:
- For rules the auto-fixer cannot resolve, edit the file manually to satisfy the rule.
- Do not add the file to
.eslintignore/ruffexclude lists, do not add file-level disables, do not weaken the rule globally. Inline rule disables are allowed only for a single line with a comment justifying why. - Re-run the pipeline.
TEST failure
- Read the assertion message and the failing test name from the context block.
- Determine whether the production code is wrong or the test's expectation is wrong. Default assumption: production code is wrong.
- Fix the root cause. Do not delete, skip, or relax the assertion to make it pass.
- Re-run the pipeline.
SECURITY AUDIT failure
- Identify the vulnerable package and CVE / advisory ID from the context block.
- Upgrade to the patched version range. If no patch exists, evaluate whether the package can be replaced or the affected code path is reachable.
- Do not add the advisory to an ignore list to silence the audit without explicitly stating the risk acceptance to the user and getting confirmation.
- Re-run the pipeline.
Reading the structured error context — avoid the lazy loop
The ### ❌ PRE-FLIGHT FAILURE block is engineered so you can act decisively. Use it as follows; do not spin in vague attempts.
Command Executed— confirms which tool produced the error. Use this to pick the correct repair recipe above. If you are guessing what tool failed, you are about to make a wrong fix.Context for AI Fix(the fenced code block) — extract, in order:- The file path (relative or absolute).
- The line and column (e.g.
:42:17). - The rule ID or error code (e.g.
TS2345,E501,no-unused-vars,CVE-2024-xxxxx). - The diagnostic message verbatim.
- Open the named file at the named line first. Do not search the codebase, do not re-read unrelated files, do not refactor surrounding code. Repair the exact diagnostic.
- One failure, one fix, one re-run. Do not bundle speculative changes alongside the repair. If the next pipeline run reveals a new failure, treat it as a new cycle.
Lazy-loop anti-patterns — refuse these
- Re-running the pipeline unchanged hoping the result differs.
- Editing a file you were not directed to by the diagnostic.
- "Fixing" by deleting the failing test, suppressing the rule, or relaxing the type.
- Reporting "done" while a failure is on screen.
- Declaring a flake without evidence (a reproducible non-determinism, a network/timing issue documented in the test).
- Switching strategy after a single failure — repair, re-run, repeat.
Success state
When the script prints:
### ✅ PRE-FLIGHT PASSED
All quality gates verified successfully.
…and exits 0, you may proceed with the original action (commit, mark done, open PR). Not before.
What ships with it: 1 file
17.1 KB alongside SKILL.md, 1 of them executable
scripts/
- run-pipeline.pyruns17.1 KB
Gives 0 of the 12 instructions most quality gates skills give in ~1.4k tokens
Counted across 1,524 of the 2,830 authors here whose files we hold, read 2026-09-06
- Read full output and check exit codein 45 of 1524, across 40 files
- Verify output confirms the claimin 44 of 1524, across 39 files
- Identify the command that proves the claimin 43 of 1524, across 39 files
- Execute the full verification commandin 36 of 1524, across 30 files
- Produce a verification reportin 34 of 1524, across 18 files
- Review git diff changesin 30 of 1524, across 16 files
- Fix build failures immediatelyin 29 of 1524, across 9 files
- Group findings by severityin 28 of 1524
- State claim only with evidencein 27 of 1524, across 22 files
- Verify regression tests with red-green cyclein 26 of 1524, across 22 files
- Run the full test suitein 26 of 1524, across 25 files
- Run test suite with coveragein 25 of 1524, across 10 files
Said here and by no other author read
- run the pipeline before announcing a task is done
- run the pipeline before opening a pull request
- repair the specific error reported by the failing stage
- re-run the pipeline after every repair
- fix type errors at the source
- upgrade vulnerable packages for security audit failures
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.