preflight

Run format, build, lint, unit tests, and export checks on affected libraries.

294|147|Updated May 27, 2018
One-click install
npx skills add https://github.com/SAP/fundamental-ngx --skill preflight-sap
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: preflight
Source: https://github.com/SAP/fundamental-ngx/tree/main/.claude/skills/preflight
Command: npx skills add https://github.com/SAP/fundamental-ngx --skill preflight-sap

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Run all local quality gates for the affected library. If no argument provided, detect the library from changed files via git diff --name-only. Map changed file paths to library names: libs/core/ to core, libs/platform/ to platform, etc.

Core Features & Use Cases

  • Format: Ensure code is formatted before running quality gates.
  • Build: Build affected libraries to verify compilation.
  • Lint: Run lints to catch style and correctness issues.
  • Unit tests: Execute tests and report results.
  • Export check & Breaking change check: Verify exports and detect breaking changes.

Quick Start

Use the preflight command to automatically detect the changed library and run the full quality-gate sequence.

Frequently Asked Questions about preflight

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

FAQPage Schema
How do I run local quality gates before creating a pull request?

To run local quality gates before a pull request, execute the preflight command. It automatically detects affected libraries from changed files and runs format, build, lint, and unit test checks.

How do I automatically detect affected libraries for lint and build checks?

You can automatically detect affected libraries for lint and build checks by analyzing changed files via git diff. The system maps file paths like libs/core/ to the core library to target checks.

Can I validate breaking changes in my exports before submitting a PR?

Yes, you can validate breaking changes in exports before submitting a PR by running an export check. This deterministic check uses git diff and nx commands to verify exports and guard against breaking changes.

What is the best way to ensure code is formatted before running build checks?

The best way to ensure code is formatted before running build checks is to run a formatting step first. This pre-PR quality gate step validates changes and verifies formatting before compilation.

Does preflight work with nx commands to verify PR readiness?

Yes, preflight works with nx commands to verify PR readiness. It validates deterministic checks using nx commands alongside git diff to ensure affected libraries are ready for a pull request.

Why do I need to run unit tests before creating a pull request?

You need to run unit tests before creating a pull request to execute tests and report results. This local quality gate step ensures PR readiness and guards against breaking changes before submission.