Pre-PR validation — working tree status, format, lint, TypeScript check, and protected file check. Workspace-aware: detects which of backend/, frontend/, services/apps/*, services/libs/* were changed and runs only the relevant scripts. Use before submitting any PR, to check if code is ready, or to validate a branch before review.
89%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Run each check in order. Report results clearly and help fix any issues found.
git fetch origin main
git status
git diff --stat origin/main...HEAD
git log --format="%h %s%n%b" origin/main..HEADFetch first — every check below diffs against origin/main, so a stale local copy of it would give wrong commit/diff counts here and a wrong changed-package scope in Check 2–4.
Evaluate:
linuxfoundation/lfx-cdp-insights-ops#<number> reference.--signoff? — Flag any commits without Signed-off-by: lines.Resolve any issues before proceeding.
git diff --name-only origin/main...HEADNote whether backend/, services/**, frontend/, pnpm-lock.yaml, and/or pnpm-workspace.yaml have changed files — used only to decide which of Checks 2–4 apply.
Backend + services — one command covers lint (root pnpm lint / oxlint), format-check (root pnpm format-check / oxfmt), and tsc-check (tsc -b from the repo root):
./scripts/cli lint-changedRun this whenever backend/, services/**, pnpm-lock.yaml, pnpm-workspace.yaml, docs, workflows, or other oxfmt-owned files have changed. Skip only for frontend-only changes.
The three checks run in order (lint → format-check → tsc-check) and stop at the first failure — same fail-fast behavior as the CI job. If lint fails, format/tsc did not run yet; fix and re-run to see the next check, same as watching CI re-run per push.
Fix any errors it reports before proceeding:
pnpm format from the repo root then git add -pFrontend — no dependency-graph tooling exists for it yet; run manually if frontend/ has changed files:
cd frontend && pnpm run lintFrontend has no format-check or tsc-check script — skip both.
git diff --name-only origin/main...HEADFlag any changes to these protected files — they should NOT be modified without code owner approval:
services/libs/data-access-layer/** — shared DAL, high blast radiusservices/libs/common/** — shared utilities, affects all servicesbackend/src/database/migrations/** — append-only Flyway migrationsscripts/cli, scripts/scaffold.yaml, scripts/scaffold.insights.yaml.husky/*, commitlint.config.js.github/workflows/**, .github/actions/**tsconfig*.json, .oxlintrc*, .oxfmtrc*, .eslintrc*, .prettierrc*pnpm-lock.yaml, package.json, */package.jsonAGENTS.md, .claude/settings.jsonIf protected files appear in the diff, warn the contributor and ask them to revert or get code owner approval.
git log --format="%h %s%n%b" origin/main..HEADtype: description subject with a Refs linuxfoundation/lfx-cdp-insights-ops#<number> body, per commit-workflow.md.--signoff on all commits? — Every commit must have Signed-off-by:..github/workflows/pr-title-lint.yml).git diff --stat origin/main...HEADList:
backend/src/api/Present a clear report:
PREFLIGHT RESULTS
─────────────────────────────────────────────────
✓ Working tree — Clean, N commits ahead of main
✓ Lint — backend: OK | frontend: OK | services/...: OK
✓ Format check — backend: OK
✓ TypeScript — backend: OK
✓ Protected files — None modified
✓ Commits — Conventions followed, signed off, issue referenced
─────────────────────────────────────────────────
READY FOR PROr if there are issues:
PREFLIGHT RESULTS
─────────────────────────────────────────────────
✓ Working tree — Clean, N commits ahead of main
✗ Lint — backend: 3 errors (see above)
✓ Format check — backend: OK
✗ TypeScript — backend: 1 error (see above)
✓ Protected files — None modified
✗ Commits — Missing Signed-off-by on 2 commits (run /dco)
─────────────────────────────────────────────────
ISSUES FOUND — Fix before submittingSuggest creating the PR:
"All preflight checks passed! Ready to create a PR. Would you like me to create it with
gh pr create?"
linuxfoundation/crowd.dev
f27ddfb
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.