Skip to content
cccskills
FreePublished on GitHub

ci-churn

Measure CI churn cost for a pull request: how many commits and how many CI-compute seconds were burned on avoidable "fix the CI" push rounds. Use when you want to understand the efficiency cost of a PR's iteration cycle, get actionable pre-push check suggestions, or include a churn summary in a pipeline report. Triggers: "ci churn", "how much CI did we burn", "avoidable commits", "ci efficiency", "wasted CI time", "churn report", "/ci-churn". Called automatically by /fp-drift at pipeline close.

The English summary is being prepared. Showing the original description.

Works withGitHub
See how to install

Files included (1)

  • SKILL.md6.1 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

ci-churn — CI Efficiency Report

Measure how many commits and CI-compute seconds were spent on avoidable "fix the CI" push rounds for a pull request, and surface the pre-push checks that would have prevented them.

When to use

  • At the end of any feature pipeline run (/fp-drift calls this automatically)
  • Standalone after any PR you want to audit for iteration efficiency
  • As a retrospective tool: "we spent N minutes of CI compute on churn"

How it works

1. Commit classification

Every commit in the PR is classified by its subject line:

LabelPattern examplesMeaning
featurefeat(...), add ..., refactor ...Intentional work
review-fixper review, address review findingsFixed after code review
ci-fixfix import, restore export, codeql, lazy-import, wheel smokeFixed because CI caught something locally-detectable

feature commits are the signal. ci-fix and review-fix are churn.

2. CI duration fetch

For each commit SHA, the GitHub Actions API is queried for every workflow run triggered by that push. Duration is computed as updated_at − run_started_at (no run_duration_ms field exists in the API).

3. Metrics computed

MetricFormula
Churn ratioavoidable_commits / total_commits
CI compute burnedSum of all run durations on avoidable commits
Agent blocked-wait (min)Sum of failed run durations — the minimum time the agent was blocked waiting for bad results
Agent blocked-wait (max)Same as CI compute burned — the agent also waited during the fix runs
Session timeParsed from --session-log if provided (pi/claude-code JSONL)

4. Root cause hints

Based on which ci-fix commit messages matched which patterns, the script suggests concrete local pre-push checks that would have caught the same failure before it hit CI.

Run it

# Basic — auto-detects repo from git remote
python3 scripts/ci_churn.py <pr-number>

# With session log for agent time estimate (pi or claude-code JSONL)
python3 scripts/ci_churn.py <pr-number> --session-log ~/.pi/sessions/latest.jsonl

# Machine-readable JSON output
python3 scripts/ci_churn.py <pr-number> --json

# Explicit repo
python3 scripts/ci_churn.py <pr-number> --owner myorg --repo myrepo

Reading the output

CI Churn Report — PR #1017  (gaia-research/gaia-skill-tree)
════════════════════════════════════════════════════════

Commits: 5 total  (1 feature · 1 review-fix · 3 ci-fix)
Churn ratio: 80.0%  (4 of 5 commits were avoidable)

CI compute burned on avoidable commits : 22m 49s
CI compute on failed runs (all commits): 4m 16s
Agent blocked-wait estimate (min / max): 4m 16s / 22m 49s

Commit breakdown
────────────────────────────────────────────────────────
      SHA  Label         CI (s)  Fails  Message
─────────  ────────────  ──────  ─────  ─────────────────────────────────
5f418b26b  feature            0      0  feat(intake): batch skill intake…
ff99b6165  △ review-fix     187      2  fix(intake): address review findings…
3f3f98776  ⚠ ci-fix         391      1  fix(prWriter): restore open_pr export…
e1b612175  ⚠ ci-fix         398      0  fix(pushFromFile): lazy-import yaml…
78e0028b5  ⚠ ci-fix         393      0  fix(pushFromFile): replace substring…

Suggested local pre-push checks
────────────────────────────────────────────────────────
  • python3 -c "from gaia_cli.main import main"   # import chain smoke test
  • python3 -m pytest tests/ -x -q --timeout=30   # fast local test gate
  • bandit -r src/ -ll                             # security lint (CodeQL class)

Interpreting churn ratio

RatioSignal
0%Perfect — every commit was intentional feature work
1–20%Healthy — minor CI surprises, typical for new code paths
20–50%Elevated — pre-push checks are missing or not being run
>50%High churn — the local development loop is not catching what CI catches

Optional: session log integration

If you pass --session-log PATH, the script parses durationMs (pi) or duration_ms (claude-code) fields from assistant turns in the JSONL log and reports total agent session time alongside CI compute. This lets you answer: "of the N minutes this agent spent on this PR, how many were blocked waiting for CI results on avoidable failures?"

Session log paths:

  • pi: ~/.pi/sessions/<project>/<session-id>.jsonl (check pi session ls)
  • claude-code: ~/.claude/projects/<project>/<session-id>.jsonl

Notes

  • run_started_at → updated_at delta is used because the GitHub Actions API has no run_duration_ms field. This slightly over-counts (includes queue time), but is consistent across all runs.
  • The first commit on a PR branch often has 0 runs because CI hadn't fired yet when the PR was opened — this is expected, not a bug.
  • gaia push --from-file, gaia dev add, and pure tooling PRs will almost always show 0 feature commits and high churn ratios. That is accurate — the entire PR was iteration cost, not new capability.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Produce the rendered evidence a human-gated frontend PR owes its reviewer: capture each changed surface (plus the before state for anything modified, plus mobile width), then generate one self-contained local HTML page the founder can open and review without checking anything out. Use when a PR is gated by the "Frontend changes are HUMAN-GATED" section of CLAUDE.md, or when the user says "/design-gate", "screenshot evidence for this PR", "prep this for founder review", "build the design evidence page", "what does this look like before and after". The page comes from a template script, not hand-written markup. Output is session-local and never committed. Do NOT use for non-gated changes: typo/grammar/factual fixes in an unchanged block, dead link targets, alt/ARIA fixes with no visual change, cache-bust bumps, or refactors with no rendered diff.

The English summary is being prepared. Showing the original description.

gaia-research/gaia-skill-tree23Updated Oct 17, 2026

One-fix-at-a-time, approval-gated design fix recovery. Given a checklist of fixes (handover doc, CHECKLIST.md, or inline list), applies each individually, presents a diff, and waits for an explicit APPROVE / REJECT / NO CHANGES decision before committing. Trigger phrases: /design-iteration, "go through the checklist one by one", "fix these one at a time", "bucket recovery", "design fix pass".

The English summary is being prepared. Showing the original description.

gaia-research/gaia-skill-tree23Updated Oct 17, 2026

Playbook for correcting a named skill's star level to match its computed Trust Magnitude grade, with an independent post-calibration verification pass and a CLI-logged timeline event (never hand-written). Use when: recalibrating a skill's level, fixing a stale or drifted star rating, running a batch of `gaia dev calibrate` corrections, or confirming a past calibration actually landed. Triggers: "calibrate <skill>", "recalibrate the trust magnitude backlog", "promote/demote <skill> to N stars", "why is <skill> still N stars", "verify a calibration actually landed", "Hall of Heroes ranking is wrong".

The English summary is being prepared. Showing the original description.

gaia-research/gaia-skill-tree23Updated Oct 17, 2026

Close out a completed EPIC / sprint end-to-end: author a fact-verified meta-post announcing what shipped, archive the EPIC's handovers, snapshot orchestrator memory, gate the integration→main merge on CI-green + explicit human go, drive the version bump (merge-commit conventions that auto-sync classifies), and verify the release reached the registry/PyPI. Use when the user says "close out EPIC <n>", "wrap up the sprint", "ship the meta shift", "/epic-close", or asks to finalize an integration branch that is ready to merge to main. Generalizes the EPIC 1002 (Yggdrasil II) close-out. This skill orchestrates — it authors founder docs directly (superadmin) and delegates code/regen to workers; it NEVER merges to main without the human gate.

The English summary is being prepared. Showing the original description.

gaia-research/gaia-skill-tree23Updated Oct 17, 2026

Run this skill for Phase 3 of the evidence verification pipeline — the adversarial audit step. Use when you need to check the evidence data lake for bad data before ingestion: dead links, wrong URL formats (tree/ vs blob/), subjective wording ("elite", "high-quality"), stale migration notes, benchmark catalog misuse/vendor-claim leakage, or skills whose star evidence conflicts with classified evidence level. Triggers on phrases like: "audit the data lake", "adversarial check", "ev-adversarial-audit", "check for noise in evidence", "flag bad evidence", "run the audit phase", "quality check the by-type files", or any reference to Phase 3 of the pipeline.

The English summary is being prepared. Showing the original description.

gaia-research/gaia-skill-tree23Updated Oct 17, 2026

Phase 2B of the Gaia evidence verification pipeline. Verifies benchmark-result rows and benchmark-source candidates against registry/benchmark-sources.json before adversarial audit, link validation, catalog promotion, or ingestion. Use when running /ev-pipeline, checking benchmark-result evidence, reviewing benchmark-source candidates, or preparing benchmark rows for /gaia-ingest-batch.

The English summary is being prepared. Showing the original description.

gaia-research/gaia-skill-tree23Updated Oct 17, 2026

See all skills by gaia-research

Report a problem with this skill