com um clique
preflight
// Pre-PR validation — license headers, format, lint, build, and protected file check. Use before submitting any PR, to check if code is ready, validate changes, or verify a branch before review.
// Pre-PR validation — license headers, format, lint, build, and protected file check. Use before submitting any PR, to check if code is ready, validate changes, or verify a branch before review.
Review a pull request against LFX architecture standards. Requires the reviewer's HEAD to be the PR's branch (author scenarios are natural; external reviewers run `gh pr checkout <N>` first). Fetches main fresh, then launches the `lfx-self-serve-code-reviewer` subagent with the canonical full-branch prompt — the subagent audits the PR branch's diff against `origin/main` and renders a markdown review covering general code review, upstream API contracts, and repo conventions (rules, checklists, architecture). This skill body adds what only a post-PR skill can do: verifying prior review comments are addressed, walking the PR-shape checklist (branch/ JIRA/commits/DCO+GPG/rebase/diff-size/protected-files/PR-title/external-refs), applying new-contributor educational tone, presenting a draft for explicit approval, and posting via /review only after user go-ahead. NEVER auto-posts comments or submits reviews. Use when reviewing PRs, checking PR quality, validating code changes, or when the user says "review", "check
Pre-PR shape check on local lfx-self-serve work. Audits PR-shape sanity (branch name, JIRA reference, conventional-commit format, rebase status, DCO + GPG signing per commit, total diff size, and protected files touched) against the target base branch. Does NOT audit code — code audits run post-commit via the `lfx-self-serve-code-reviewer` and `lfx-self-serve-learnings-reviewer` subagents (launched via the Agent tool), drained before this check. Use once before opening a PR, after the post-commit review queue has returned clean.
Recover from missing DCO sign-off on commits. Handles the single-commit amend, older-commit recovery via interactive rebase or cherry-pick, and explains the Probot DCO check that blocks PRs without sign-off. Use when a PR fails the DCO check, when a commit needs a Signed-off-by trailer added retroactively, or when sign-off was forgotten during rebase / cherry-pick / amend.
Guided development workflow for building, fixing, updating, or refactoring code — components, services, backend endpoints, shared types, or full features. Use whenever someone wants to add a feature, fix a bug, modify existing code, create something new, refactor, or implement any code change.
Environment setup from zero — prerequisites, clone, install, env vars via 1Password, and dev server. Use for getting started, first-time setup, broken environments, install failures, or missing env vars.
| name | preflight |
| description | Pre-PR validation — license headers, format, lint, build, and protected file check. Use before submitting any PR, to check if code is ready, validate changes, or verify a branch before review. |
| allowed-tools | Bash, Read, Glob, Grep, AskUserQuestion |
You are running a comprehensive validation before the contributor submits a pull request. Run each check in order, report results clearly, and help fix any issues found.
Before running any validation, check the state of the working tree:
git status
git diff --stat origin/main...HEAD
git log --format="%h %s%n%b" origin/main...HEAD
Evaluate:
LFXV2- references in subject or body.--signoff? — Flag any commits without Signed-off-by: lines (visible in the full commit body above).Resolve any issues before proceeding to the checks below.
./check-headers.sh
Every source file (.ts, .html, .scss) must have the license header:
// Copyright The Linux Foundation and each contributor to LFX. + // SPDX-License-Identifier: MIT<!-- Copyright The Linux Foundation and each contributor to LFX. --> + <!-- SPDX-License-Identifier: MIT -->If any files are missing headers, add them.
yarn format
This applies Prettier formatting with Tailwind class sorting. It modifies files in place.
Why format before lint: Prettier auto-fixes whitespace, import ordering, and line-length issues that would otherwise appear as lint errors. Running format first eliminates noise from the lint step.
yarn lint
If there are lint errors, fix them. Common issues:
lfx-)If any fixes were applied in Checks 1-3, re-run lint to confirm the fixes are clean:
yarn lint
If lint still fails, fix and repeat until clean.
yarn build
The build must succeed. If it fails:
Verify no protected infrastructure files were modified:
git diff --name-only origin/main...HEAD
Flag any changes to these files — they should NOT be modified without code owner approval:
apps/lfx-one/src/server/server.tsapps/lfx-one/src/server/server-logger.tsapps/lfx-one/src/server/middleware/*apps/lfx-one/src/server/services/logger.service.tsapps/lfx-one/src/server/services/microservice-proxy.service.tsapps/lfx-one/src/server/services/nats.service.tsapps/lfx-one/src/server/services/snowflake.service.tsapps/lfx-one/src/server/services/supabase.service.tsapps/lfx-one/src/server/services/ai.service.tsapps/lfx-one/src/server/services/project.service.tsapps/lfx-one/src/server/services/etag.service.tsapps/lfx-one/src/server/helpers/error-serializer.tsapps/lfx-one/src/app/app.routes.ts.husky/*eslint.config.*.prettierrc*turbo.jsonangular.jsonCLAUDE.mdcheck-headers.shpackage.json / */package.jsonyarn.lockIf protected files appear in the diff, warn the contributor and ask them to revert those changes or get code owner approval.
Before the final report, verify all changes are properly committed:
git status
git log --format="%h %s%n%b" origin/main...HEAD
type(scope): description format per commit-workflow.md.--signoff on all commits? — Every commit must have Signed-off-by: (check in the full body output above).LFXV2- references.Generate a summary of all changes for the PR description:
git diff --stat origin/main...HEAD
List:
Present a clear report:
PREFLIGHT RESULTS
─────────────────────────────────
✓ Working tree — Clean, N commits ahead of main
✓ License headers — All files have headers
✓ Formatting — Applied
✓ Linting — No errors
✓ Build — Succeeded
✓ Protected files — None modified
✓ Commits — Conventions followed, signed off
─────────────────────────────────
READY FOR PR
Or if there are issues:
PREFLIGHT RESULTS
─────────────────────────────────
✓ Working tree — Clean, N commits ahead of main
✓ License headers — All files have headers
✓ Formatting — Applied
✗ Linting — 3 errors (see above)
✗ Build — Failed (see above)
✓ Protected files — None modified
✓ Commits — Conventions followed, signed off
─────────────────────────────────
ISSUES FOUND — Fix before submitting
Suggest creating the PR:
"All preflight checks passed! Ready to create a PR. Would you like me to create it with
gh pr create?"