running-ci-preflight

Runs scoped pre-push checks on changed files to catch deterministic CI failures locally.

713|118|Updated Aug 11, 2020
One-click install
npx skills add https://github.com/PostHog/posthog-foss --skill running-ci-preflight
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: running-ci-preflight
Source: https://github.com/PostHog/posthog-foss/tree/main/.agents/skills/running-ci-preflight
Command: npx skills add https://github.com/PostHog/posthog-foss --skill running-ci-preflight

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Pushing code that fails the full CI matrix on deterministic issues like formatting, lint errors, broken lockfiles, OpenAPI drift, or migration conflicts wastes expensive CI runs. This Skill runs hogli ci:preflight to catch those failures locally before pushing.

Core Features & Use Cases

  • Scoped pre-push checks: Maps checks to the files your branch touched, covering formatting, lint, lockfiles, OpenAPI drift, migration conflicts, and branch staleness.
  • Auto-fix loop: --fix formats, lints, and auto-fixes what is safe, then reports pass/fail/warning/advisory per check.
  • Branch freshness detection: Uses git merge-tree to detect textual merge conflicts, dual-side migration additions, and stale branches without touching the working tree.
  • Use Case: Before reporting a task done or when the pre-push hook blocks your push, run the preflight loop to resolve every failure and advisory, then push a clean branch.

Quick Start

Run hogli ci:preflight --fix and resolve every reported failure and advisory before pushing my branch.

Frequently Asked Questions about running-ci-preflight

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

FAQPage Schema
How do I run pre-push CI checks locally before pushing?

Run hogli ci:preflight --fix to format, lint, and auto-fix safe issues scoped to your changed files. Resolve every fail result and act on advisories, then re-run until clean before pushing.

What checks does hogli ci:preflight run on my branch?

It scopes checks to files your branch touched, covering formatting, lint, lockfile integrity, OpenAPI drift, migration conflicts, and branch staleness. Each check maps to a CI failure class that has taken master down.

Why did the pre-push hook block my push?

The hook runs ci:preflight --strict, which exits non-zero on any failed check such as a real lint error, broken lockfile, or migration conflict. Fix what it reports rather than bypassing with --no-verify.

Does ci:preflight run type checking on changed files?

No, type-check is advisory only because only a repo-wide mypy run matches CI behavior and costs minutes cold. Preflight names the command so you can judge whether your change is type-risky and run it yourself.

Why does ci:preflight show skipped checks in my environment?

Skipped checks mean a capability is absent: needs stack wants a running dev stack via hogli start, needs node wants pnpm install, and needs python-env wants uv sync. Satisfy what you can locally or let CI cover the rest.

Can I disable the ci:preflight pre-push hook?

Setting HOGLI_PREFLIGHT_DISABLED=1 makes the command and hook a no-op with exit 0. It is intended as a rollout or emergency lever and should be respected, not unset to force a run.