agentleFS
mirekondromirekondro/The-Pre-Flight-Check/CLAUDE.md

The-Pre-Flight-Check

CLAUDE.md2 starsChanged 5 months agoMITView on GitHub

This file is loaded by Claude Code when contributors work on this repo itself. It's not the skill that ships to users — that lives in skills/pre-flight-check/SKILL.md. pre-flight-check is a tool-neutral quality gate that ships as a native skill, rule, or instruction file for 10 AI coding agents. The engine is a single vanilla-Python script. The repo is the canonical source for the skill content, the adapter files, and the cross-platform installer. The skill enforces these rules on users; this…

  • Installs packages
  • Commits and pushes

The file

Show its rules and text

We split this CLAUDE.md into the rules it gives an agent

15 rules. About 0 are common, 3 are distinctive, and 12 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 12

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No third-party imports. If you need YAML parsing, use a 20-line stdlib parser for the subset you need.

    line 63
  2. Distinctive:

    After editing, run both fixture pipelines:

    line 65
  3. Very specific:

    Add adapters/<tool>/<file>.<ext> in that tool's native rule format.

    line 83
  4. Very specific:

    Add a row to the matrix in adapters/README.md.

    line 84
  5. Very specific:

    Add a deploy case to install.sh (function install_tool) and install.ps1 (Install-OneTool).

    line 85
  6. Very specific:

    Add the path to adapter_paths_for in install.sh and Get-AdapterPaths in install.ps1.

    line 86
  7. Very specific:

    Add the tool name to SUPPORTED_TOOLS in install.sh and $SupportedTools in install.ps1.

    line 87
  8. Distinctive:

    Add a row to the README install matrix.

    line 88
  9. Very specific:

    Add the expected file path to the installer-multitool CI job's expected array.

    line 89
  10. Very specific:

    Add detection in detect_runtime (signature files).

    line 95
  11. Very specific:

    Add build_<runtime>_stages returning list[Stage].

    line 96
  12. Very specific:

    Use shutil.which(tool) to gate stages — missing tools skip, never fail.

    line 97
  13. Very specific:

    Add a examples/<runtime>-broken/ fixture rigged to fail one stage.

    line 98
  14. Very specific:

    Update the runtime table in README.md and INSTALL.md.

    line 99
  15. Very specific:

    Add a CI fixture job mirroring fixture-node-broken / fixture-python-broken.

    line 100

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

CLAUDE.md — pre-flight-check repository

This file is loaded by Claude Code when contributors work on this repo itself. It's not the skill that ships to users — that lives in skills/pre-flight-check/SKILL.md.

What this project is

pre-flight-check is a tool-neutral quality gate that ships as a native skill, rule, or instruction file for 10 AI coding agents. The engine is a single vanilla-Python script. The repo is the canonical source for the skill content, the adapter files, and the cross-platform installer.

Project philosophy — read before editing

The skill enforces these rules on users; this repo enforces them on itself:

RuleWhy
Zero runtime dependencies in run-pipeline.pyThe engine must install anywhere python3 runs. No pip install step. No supply-chain risk for users.
Two-file skill content (SKILL.md + run-pipeline.py)Auditable in 5 minutes. Easy to fork. Easy to copy manually.
Auto-detect, never configureIf a heuristic is wrong, fix the heuristic, don't add a config knob.
Fail-fast, never paper overThe instruction files explicitly forbid agents from suppressing errors. Code changes that loosen this contract get rejected.
Structured output is load-bearingThe Markdown failure block format is part of the public contract. Any change to its shape is a breaking change — bump major.

Full philosophy in CONTRIBUTING.md. If your change conflicts with one of these, it's probably the wrong change — but the conversation is welcome via issue.

Layout

.
├── skills/pre-flight-check/         # CANONICAL SKILL SOURCE
│   ├── SKILL.md                     #   Agent contract (load-bearing)
│   └── scripts/run-pipeline.py      #   The pipeline engine (vanilla Python 3, no deps)
│
├── adapters/                        # Per-tool instruction file sources
│   ├── cursor/pre-flight-check.mdc
│   ├── copilot/copilot-instructions.md
│   ├── windsurf/pre-flight-check.md
│   ├── cline/pre-flight-check.md
│   ├── kiro/pre-flight-check.md
│   ├── roo/pre-flight-check.md
│   └── README.md                    #   Maintainer index — read when adding a new tool
│
├── AGENTS.md                        # Codex / generic AGENTS.md-based agents
├── GEMINI.md                        # Gemini CLI context file
├── gemini-extension.json            # Gemini CLI extension manifest
│
├── .claude-plugin/                  # Claude Code plugin marketplace manifest
│   ├── plugin.json
│   └── marketplace.json
│
├── install.sh / install.ps1         # Multi-tool installer (--tool flag, see --list-tools)
├── uninstall.sh                     # Thin wrapper around install.sh --uninstall
│
├── examples/                        # Fixtures that double as docs and CI smoke targets
│   ├── node-broken/                 #   Rigged TS2345 failure
│   └── python-broken/               #   Rigged mypy [return-value] failure
│
├── .github/workflows/ci.yml         # ruff + mypy + shellcheck + PSScriptAnalyzer + fixture runs + installer round-trip
└── (README.md, INSTALL.md, CONTRIBUTING.md, LICENSE)

When editing the engine (skills/pre-flight-check/scripts/run-pipeline.py)

  • Python 3.8 is the floor. CI enforces mypy --strict --python-version 3.8.
  • No third-party imports. If you need YAML parsing, use a 20-line stdlib parser for the subset you need.
  • Type annotations are required everywhere. Use the Stage TypedDict for stage dicts.
  • After editing, run both fixture pipelines:
    (cd examples/node-broken && python3 ../../skills/pre-flight-check/scripts/run-pipeline.py)
    (cd examples/python-broken && PATH="$PWD/.venv/bin:$PATH" python3 ../../skills/pre-flight-check/scripts/run-pipeline.py)
    Both should exit 1 with ### ❌ PRE-FLIGHT FAILURE: TYPECHECK.

When editing SKILL.md or any adapter file under adapters/

The fail-fast protocol — the FORBIDDEN actions list, Anti-patterns to refuse, Stage-specific repair rules — is duplicated across 7 files on purpose (one per adapter tool). When you change the protocol, update all of them together.

Find every copy:

grep -rn "FORBIDDEN" skills/ adapters/ AGENTS.md GEMINI.md

When adding a new AI tool

  1. Add adapters/<tool>/<file>.<ext> in that tool's native rule format.
  2. Add a row to the matrix in adapters/README.md.
  3. Add a deploy case to install.sh (function install_tool) and install.ps1 (Install-OneTool).
  4. Add the path to adapter_paths_for in install.sh and Get-AdapterPaths in install.ps1.
  5. Add the tool name to SUPPORTED_TOOLS in install.sh and $SupportedTools in install.ps1.
  6. Add a row to the README install matrix.
  7. Add the expected file path to the installer-multitool CI job's expected array.

adapters/README.md has a longer checklist.

When adding a new runtime (Go, Rust, Ruby, etc.)

  1. Add detection in detect_runtime (signature files).
  2. Add build_<runtime>_stages returning list[Stage].
  3. Use shutil.which(tool) to gate stages — missing tools skip, never fail.
  4. Add a examples/<runtime>-broken/ fixture rigged to fail one stage.
  5. Update the runtime table in README.md and INSTALL.md.
  6. Add a CI fixture job mirroring fixture-node-broken / fixture-python-broken.

Smoke test before pushing

# Engine lint
ruff check skills/pre-flight-check/scripts/run-pipeline.py
mypy --strict --python-version 3.8 skills/pre-flight-check/scripts/run-pipeline.py

# Installer lint
shellcheck -s bash install.sh uninstall.sh

# Installer round-trip in a temp project
TMP=$(mktemp -d) && cd "$TMP" \
  && bash /path/to/this/repo/install.sh --tool all --project --force \
  && bash /path/to/this/repo/install.sh --tool all --project --uninstall

Or just push to dev and let CI run — the workflow does all of the above plus the fixture pipelines.

Commit style

Conventional Commits: <type>(<scope>): <subject>. Types: feat, fix, docs, test, chore, refactor, ci, build. Subject ≤72 chars, imperative. See recent commits for examples.

Release flow

  1. PR dev → main.
  2. Merge with squash or merge commit.
  3. gh release create vX.Y.Z --target main --title "vX.Y.Z — <headline>" --notes "..."
  4. The release notes go on the GitHub Releases page; users see them when checking for updates.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.