running-ci-preflight

running-ci-preflight is a skill for Claude Code, Codex from PostHog/posthog-foss. It costs 119 tokens per session (1,653 once invoked), scanned A, original, MIT.

A pre-push checklist for PostHog code changes that runs targeted checks based on the files you edited. CI, or continuous integration, is the automated system that tests changes before they are merged.

In plain words
What is it for?
Use it before pushing changes, after a blocked push, or when editing Python, serializers, migrations, workflows, or dependency files.
Why use it?
It catches predictable formatting, lint, dependency, migration, workflow, and API-drift failures before they reach the shared CI system. It also points out branch freshness and other issues that could cause CI to fail later.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it before pushing changes, after a blocked push, or when editing Python, serializers, migrations, workflows, or dependency files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/posthog/posthog-foss/running-ci-preflight
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PostHog/posthog-foss --skill running-ci-preflight
Clone the repo
git clone --depth 1 https://github.com/PostHog/posthog-foss

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for running-ci-preflight

README.md
[![agentmods](https://agentmods.dev/badge/skills/posthog/posthog-foss/running-ci-preflight/github.svg)](https://agentmods.dev/skills/posthog/posthog-foss/running-ci-preflight)
Your own site
<a href="https://agentmods.dev/skills/posthog/posthog-foss/running-ci-preflight"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/running-ci-preflight/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for running-ci-preflight

Your own site · 80×15
<a href="https://agentmods.dev/skills/posthog/posthog-foss/running-ci-preflight"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/running-ci-preflight.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 119 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,653 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00119 $0.01653
Opus 5.5 $0.00048 $0.00661
Sonnet 5.5 $0.00024 $0.00331
Haiku 4.5 $0.00012 $0.00165

Measured 14d ago against content hash 92fa9b99abe7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

running-ci-preflight scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 14d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/running-ci-preflight/SKILL.md · 52 lines

How it starts

The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Running ci:preflight

hogli ci:preflight scopes a curated set of checks to the files your branch touched — each mapped to a CI failure class that has taken master down — plus an always-on branch-freshness check. It is the pre-push counterpart to hogli ci:insights (what is already broken on master).

The pre-push hook runs ci:preflight --strict automatically and blocks the push on failed checks. Never bypass it with --no-verify — fix what it reports instead.

The loop (when the hook blocks, or before reporting done)

hogli ci:preflight --fix
  1. Run with --fix — it formats, lints, and auto-fixes what is safe.
  2. Read each line: ✓ pass, ✗ fail, ⚠ warning (non-blocking finding), → advisory (do it yourself), · skipped (capability absent).
  3. Resolve every ✗ fail — these are what --fix could not (real lint error, broken lockfile, migration conflict). These block the push.
  4. Act on every → advisory — e.g. openapi advisory → run hogli build:openapi and commit the drift; staleness advisory → git merge origin/master. Advisories never block, but ignoring them ships the failure to CI. Resolve them before pushing, including drift you didn't introduce — you own the branch state you push.
  5. Re-run until clean, then push.

Notes

  • Strict = failures only. --strict (what the hook runs) exits non-zero only on ✗ fail — advisories are unverifiable-locally classes, so they warn without blocking. A clean exit means "nothing left to fix", not "CI will pass" — CI stays the authoritative gate. Non-blocking is a mechanism limit, not permission to skip.
  • type-check is a nudge, not a run. Only a repo-wide mypy run matches CI (mypy follows imports, so a changed-file subset misses reverse-dependency breakage), and that costs minutes cold — too much to tax every push with. So preflight names the command instead of running it: judge whether your change is type-risky and run it yourself. CI blocks on the same command, so a type error you skip here comes back as a full re-run.
  • complexity warns only. Cyclomatic complexity above 10 in a changed file shows as ⚠ warning and never blocks; CI annotates the same warning and posts it to the CI report comment. Simplify the function when you next touch it rather than gaming the number.
  • semgrep-devex advises on findings your branch introduced. It scans the changed files and their merge-base copies within one 15-second budget. Both scans use the cached version SEMGREP_IMAGE pins in .github/workflows/ci-security.yaml, with network access disabled. A missing tool skips the scan and starts its download in the background, so the next run scans. A cloud task or CI job does not start that download: run hogli ci:preflight --prepare-semgrep there with network access. An incomplete scan skips with a reason. A finding already on master is not reported. CI blocks on a new one, so fix it before you push. The advisory prints the command that shows the rule.
  • snapshot-baselines advises when frontend/snapshots.yml loses entries for stories your branch did not change. This is what a bad merge-conflict resolution looks like. When the stories still render, the merge queue fails the batch that carries the file. Run the git diff the check prints and restore the entries you did not mean to remove. The entries of a story you deleted, renamed or retitled in the same branch pass.
  • merge-queue-lane warns only, and the pre-push hook skips it. It fires when a few cross-cutting files (a CI workflow, a lane script) make the whole PR claim every merge queue lane, which makes the queue merge in series behind it. Move those files to their own PR when the other changes do not need them.
  • Staleness is risk-based. It fires when merging master now would actually break something — textual merge conflicts (computed via git merge-tree, working tree untouched), migrations added on both sides, generated-file inputs changed on both sides, or CI workflows changed on master — plus a behind/age backstop, aggressive by default (5 commits / 2 days; env-tunable via HOGLI_PREFLIGHT_STALE_COMMITS/HOGLI_PREFLIGHT_STALE_DAYS) so we over-warn to start and tune down from telemetry. Merge master in when it fires. Advisory only, never auto-merged.
  • · skipped (needs …) is expected on a bare checkout or sandbox. needs stack/needs clickhouse want a running dev stack (hogli start), needs node wants pnpm install, needs desktop-node wants pnpm --dir products/desktop install and needs agent-node wants pnpm --dir packages/agent install (both nested workspaces are excluded from the root install and have their own lockfiles), and needs python-env wants uv sync, so the synced project environment is the python on PATH. Satisfy what you can, or let CI cover the rest. No hooks in your environment (no node_modules)? Run the loop yourself before pushing.
  • migrations skips under flox by default. Flox sets POSTHOG_SKIP_MIGRATION_CHECKS, which turns hogli migrations:check into a no-op, so preflight reports it as skipped rather than passed. When the check runs, it also fails on migrations your local database lacks. The detail then names them, and hogli migrations:up applies them: that is local state, not a migration conflict.
  • Untracked files are out of scope. Without --strict, preflight checks the branch diff plus uncommitted edits to tracked files, and says how many untracked files it left out. git add a new file that belongs to the change, or pass --include-untracked, so that --fix lints and formats it too.
  • Flags. --against <ref> diffs against an explicit base; --include-untracked adds files git does not track; --json emits a machine-readable summary.
  • Kill switch. HOGLI_PREFLIGHT_DISABLED=1 makes the command (and the hook) a no-op with exit 0. It is a rollout/emergency lever — respect it; never unset it to force a run.

Read the full file on GitHub · 52 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 14d ago Changed · +2 lines 92fa9b99abe7
  2. 1mo ago Changed 1c91dc386d16
  3. 1mo ago Changed · +3 lines f1c0f6eec413
  4. 2mo ago Changed 90d0bc374315
  5. 3mo ago First seen · 47 lines · 119 tokens per session scan A 9bd6c1611ead

Subscribe to this mod's changes

running-ci-preflight is a skill published in the GitHub repository PostHog/posthog-foss (736 stars, last pushed today), licensed MIT. It adds 119 tokens to every session and 1,653 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

running-ci-preflight compared with skills from other repositories

running-ci-preflight next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
running-ci-preflightPostHog/posthog-fossSkill736todayMITA119Claude Code, Codex
merge-batchdiegosouzapw/OmniRouteSkill91k5d agoMITA46Claude Code
prowler-commitprowler-cloud/prowlerSkill15ktodayApache-2.0A44Claude Code, Codex
gh-auth-isolationgithub/gh-awSkill5.8ktodayMITA20Claude Code, Codex
github-skillzeenie-ai/OpenCompanySkill1.1k2d agoMITA51Claude Code
comet-githubrpamis/cometSkill3.3ktodayMITA72Claude Code, Codex
re0-mergeLilMGenius/paperthinSkill1.5ktodayMITA51Claude Code, Codex