pre-flight-check
Skill2 starsChanged 5 months agoMITView on GitHub
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.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- Heverton-web/fabrica-universaltheir own version, first seen Oct 13, 2026
- MyAiFreedomSystems/pre-flight-checktheir own version, first seen Aug 14, 2026
- pskoett/pskoett-ai-skillstheir own version, first seen Apr 13, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- pskoett/pskoett-ai-skills★ 327same name
- Heverton-web/fabrica-universal★ 0same name
- MyAiFreedomSystems/pre-flight-check★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 8 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Run this skill without being asked at every one of these checkpoints:
- Distinctive: line 19
If you are about to say "done", "fixed", "complete", "ready to commit", or similar — stop and run this skill first.
- Very specific: line 37
If the script outputs ### ❌ PRE-FLIGHT FAILURE: [STAGE_NAME], you are FORBIDDEN from:
- Very specific: line 51
Read the offending file at that line with the Read tool.
- Very specific: line 53
Do not add any, as unknown as X, # type: ignore, or equivalent escape hatches to silence the checker.
- Distinctive: line 58
Run the project's auto-fix command first:
- Very specific: line 62
Do not add the file to .eslintignore / ruff exclude lists, do not add file-level disables, do not weaken the rule globally.
- Distinctive: line 66
Read the assertion message and the failing test name from the context block.
- Distinctive: line 74
Do not add the advisory to an ignore list to silence the audit without explicitly stating the risk acceptance to the user and getting …
- Distinctive: line 87
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.
- Distinctive: line 88
One failure, one fix, one re-run: Do not bundle speculative changes alongside the repair.
- Distinctive: line 101
When the script prints:
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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.pyThe 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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

