lfx-preflight

Automate pre-PR validation with repo-type detection and auto-fixes.

8|1|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/linuxfoundation/lfx-skills --skill lfx-preflight
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lfx-preflight
Source: https://github.com/linuxfoundation/lfx-skills/tree/main/lfx-preflight
Command: npx skills add https://github.com/linuxfoundation/lfx-skills --skill lfx-preflight

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Pre-Submission validation checks ensure code quality and compliance before you open a PR. Phase 1 automatically fixes formatting, license headers, and basic checks across repo types, while Phase 2 provides a targeted Angular code-review pass.

Core Features & Use Cases

  • Phase 1 Validation & Auto-Fix: license headers, formatting, lint, and build checks across all repo types.
  • Phase 2 Code Review (Angular): 15 report-only checks tailored for Angular repos.
  • Repo-Type Detection & Modes: Automatically detects repo type and supports default (both phases), --skip-review (Phase 1 only), and dry-run report-only modes.

Quick Start

Run preflight before submitting a PR to run Phase 1 validations and optionally skip Phase 2 with --skip-review.

Frequently Asked Questions about lfx-preflight

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

FAQPage Schema
How do I automate pre-PR validation for license headers and formatting?

Automating pre-PR validation detects your repository type to apply auto-fixes for license headers, formatting, and lint issues before submission. It runs a Phase 1 validation pass to ensure baseline code quality and compliance across LFX repositories.

Can I run pre-PR code review checks for Angular repositories?

Yes, pre-PR validation includes a Phase 2 code review with 15 report-only checks specifically tailored for Angular repositories. This pass runs automatically after Phase 1 auto-fixes to identify remaining framework-specific issues.

How do I skip Angular code review and run only formatting and lint auto-fixes?

You can run only formatting and lint auto-fixes by executing the pre-PR validation in --skip-review mode. This skips the Phase 2 Angular code review and restricts processing to Phase 1 compliance fixes.

Does pre-PR validation support dry-run mode for lint and formatting checks?

Yes, pre-PR validation supports a dry-run mode that generates a report-only output without applying any auto-fixes. This allows you to preview formatting and lint issues before modifying your files.

What is the best way to ensure Go code compliance before opening a pull request?

Running pre-PR validation is the best way to ensure Go code compliance, as it automatically detects Go repositories and applies tailored Phase 1 auto-fixes for formatting, lint, and license headers before submission.