preflight

Runs mechanical pre-PR checks covering license headers, formatting, lint, build, and commit verification.

12|6|Updated Jul 14, 2025
One-click install
npx skills add https://github.com/linuxfoundation/lfx-self-serve --skill preflight-linuxfoundation
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: preflight
Source: https://github.com/linuxfoundation/lfx-self-serve/tree/main/.claude/skills/preflight
Command: npx skills add https://github.com/linuxfoundation/lfx-self-serve --skill preflight-linuxfoundation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Before submitting a pull request, contributors must manually verify license headers, formatting, lint rules, build success, protected files, and commit conventions. This Skill automates that entire deterministic checklist so nothing is forgotten before a PR is opened. ## Core Features & Use Cases - Sequential Validation Pipeline: Runs working tree status, license header checks, Prettier formatting, ESLint, build verification, protected file detection, and commit verification in a fixed order. - Protected File Guarding: Pipes every changed file through the guard-protected-files.sh hook to flag modifications to protected paths requiring code owner approval. - Commit Convention Enforcement: Verifies signoff lines, ticket references, and conventional commit message formats across all branch commits. - Use Case: A contributor finishes a feature branch in the LFX One Angular monorepo and asks for a readiness check; the Skill runs all checks, fixes formatting, and reports a pass/fail summary before the PR is created. ## Quick Start Ask the assistant to run the preflight checks on your current branch before creating a pull request.

Frequently Asked Questions about preflight

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check if my branch is ready for a pull request?▼

Run the preflight check, which validates your working tree, license headers, formatting, lint, build, protected files, and commit conventions in sequence. It produces a pass/fail report showing exactly what needs fixing before you open the PR.

What checks run before submitting a PR in an Angular monorepo?▼

The pipeline runs git status and diff against origin/main, a license header script, yarn format with Prettier, yarn lint with ESLint, yarn build, a protected files hook check, and commit verification for signoffs and ticket references.

Why run Prettier formatting before ESLint?▼

Prettier auto-fixes whitespace, import ordering, and line-length issues that would otherwise surface as lint errors. Formatting first removes noise so the lint step only reports real problems.

How are protected files detected in a pull request?▼

Each changed file from git diff is piped through the guard-protected-files.sh hook, the same hook used by the PreToolUse guard. Any warning it prints identifies a protected path that needs to be reverted or approved by a code owner.

What commit message conventions are enforced?▼

Commits must follow the type(scope): description format, include a Signed-off-by line from --signoff, and reference a ticket using #XXX or the fully-qualified org/repo#XXX form in the subject or body.