kdeldycke/repomatic/.claude/skills/babysit-ci/SKILL.md
babysit-ci
Monitor CI tests, lint, autofix, docs, and Nuitka binary-build workflows, diagnose failures, fix code, commit, and loop until all stable jobs pass. Ignores unstable failures.
- Source repository stars
- 58
- Declared platforms
- 1
- Static risk flags
- 3
- Last source update
- 2026-08-24
- Source checked
- 2026-08-25
Decision brief
What it does: where it fits
Monitor the tests.yaml, lint.yaml, autofix.yaml, docs.yaml, and release.yaml (Nuitka binary matrix, on projects that enable it) workflows in a fix-verify loop until all stable matrix variations pass and type-checking is clean.
Not for
- Tasks that require unconfirmed production actions or broad system permissions.
- Environments where the pinned source and install steps cannot be inspected.
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Declared | Source record | Install path and trigger |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/kdeldycke/repomatic --skill ".claude/skills/babysit-ci"Inspect the Agent Skill "babysit-ci" from https://github.com/kdeldycke/repomatic/blob/33aec65c87cbba1fbb474d2909dcfe5e749eb42d/.claude/skills/babysit-ci/SKILL.md at commit 33aec65c87cbba1fbb474d2909dcfe5e749eb42d. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
Workflow and infrastructure failures
Not all CI failures are code bugs:
Runner timeouts or OOM kills: the log ends abruptly or shows The runner has received a shutdown signal. Re-run; do not change code.Action version mismatches: Unable to resolve action, deprecated-runtime errors. Fix the workflow YAML, not the Python.Network/registry flakiness: uv/pip timeouts, PyPI 503s, ConnectionResetError. Re-run. - 02
Invocation
This skill involves repeated gh, git, uv run pytest, git commit, and git push calls. Run with --dangerously-skip-permissions to avoid manual approval on each step. Sonnet is recommended: the task is mechanical (fetch logs, match patterns, edit code, commit) and doesn't need deep…
This skill involves repeated gh, git, uv run pytest, git commit, and git push calls. Run with --dangerously-skip-permissions to avoid manual approval on each step. Sonnet is recommended: the task is mechanical (fetch lo…[!WARNING] --dangerously-skip-permissions bypasses every permission prompt for the whole session: only use it in an environment you trust, ideally a sandbox or disposable checkout, never against an unfamiliar repository…Because this loop runs autonomously without human review, every commit carries a Co-Authored-By: Claude trailer by default so unattended changes stay traceable, including where a project CLAUDE.md or a global /.claude/C… - 03
Yield to the orchestrator that spawned you
When /repomatic-ship or another orchestrator spawns this loop as a sub-agent, it may reach in to claim a specific fix, usually one touching a deliberately-kept structure that needs its own judgment. Honor that at once: a message telling you to hold, stop, or stand down on a fix…
When /repomatic-ship or another orchestrator spawns this loop as a sub-agent, it may reach in to claim a specific fix, usually one touching a deliberately-kept structure that needs its own judgment. Honor that at once:… - 04
Timeline
Three feedback channels run in parallel after every push, each at a different latency. Fix as soon as the fastest channel reports a failure: do not wait for slower channels.
Three feedback channels run in parallel after every push, each at a different latency. Fix as soon as the fastest channel reports a failure: do not wait for slower channels.After fixing (step 5-7), the loop restarts from the top: push, run all three channels again. - 05
Loop
1. Detect the repo and branch from the current working directory:
Detect the repo and branch from the current working directory:Get the latest runs for the current branch:Run local tests while waiting for CI. Don't idle while polling. Start the full test suite and linters locally in the background immediately:
Permission review
Static risk signals and limitations
Runs scripts
The documentation asks the agent to run terminal commands or scripts.
The one thing run state *does* gate is log retrieval (step 4): job logs stay unreadable until the parent run itself reaches a terminal state.Network access
The documentation includes network, browsing, or remote request actions.
Fetch each failed job's log (`gh api repos/<OWNER>/<REPO>/actions/jobs/<JOB_ID>/logs`) and fix them as one batch: different sources surface different issues, and logs survive cancellation. Batch only what has *already failed*, never what miRuns scripts
The documentation asks the agent to run terminal commands or scripts.
*A completed job's log is readable while the rest of the run drains, but only with `--allow-escape-sequences`.** The run-scoped reads *are* gated on the whole run going terminal (`gh run view --log-failed` answers `run <id> is still in progReads files
The documentation asks the agent to read local files, directories, or repositories.
**Filter first.** Gating and loop cadence read stable (✅) jobs only: an unstable (⁉️) failure never blocks the loop, never sets its tempo, and never queue-jumps a stable red. When an orchestrator like `/repomatic-ship` spawned this loop forEvidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 94/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 58 | Source | Repository attention, not individual Skill quality |
| Compatibility | 1 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- kdeldycke/repomatic
- Skill path
- .claude/skills/babysit-ci/SKILL.md
- Commit
- 33aec65c87cbba1fbb474d2909dcfe5e749eb42d
- License
- GPL-2.0
- Collected
- 2026-08-25
- Default branch
- main
View the original SKILL.md
Babysit CI: monitor and fix tests.yaml + lint.yaml + autofix.yaml + docs.yaml + release.yaml binaries
Monitor the tests.yaml, lint.yaml, autofix.yaml, docs.yaml, and release.yaml (Nuitka binary matrix, on projects that enable it) workflows in a fix-verify loop until all stable matrix variations pass and type-checking is clean.
Invocation
This skill involves repeated gh, git, uv run pytest, git commit, and git push calls. Run with --dangerously-skip-permissions to avoid manual approval on each step. Sonnet is recommended: the task is mechanical (fetch logs, match patterns, edit code, commit) and doesn't need deep reasoning:
$ claude --dangerously-skip-permissions --model sonnet /babysit-ci
[!WARNING]
--dangerously-skip-permissionsbypasses every permission prompt for the whole session: only use it in an environment you trust, ideally a sandbox or disposable checkout, never against an unfamiliar repository or untrusted input.
Because this loop runs autonomously without human review, every commit carries a Co-Authored-By: Claude <[email protected]> trailer by default so unattended changes stay traceable, including where a project CLAUDE.md or a global ~/.claude/CLAUDE.md has not synced that convention. The default yields to one thing: an explicit standing rule from the repository's maintainer against AI attribution, which outranks it because the trailer lands in their permanent history. A parent skill (like /repomatic-ship) spawning this loop does not by itself relax the requirement, but an exemption that skill passes down does, and it binds every commit made from that point on.
Keep the message itself short, per claude.md § Commit messages: an imperative subject naming the fix, under 72 characters, and no body at all unless the why is not evident from the diff. A CI fix rarely needs one — Fix Windows path assertion in `test_cache_paths` is a complete commit message. The exception worth taking: when the red traces to an upstream bug, a dependency release or a linked discussion, put that link in the body, since it is the only place the next reader will find why the fix looks the way it does.
Yield to the orchestrator that spawned you
When /repomatic-ship or another orchestrator spawns this loop as a sub-agent, it may reach in to claim a specific fix, usually one touching a deliberately-kept structure that needs its own judgment. Honor that at once: a message telling you to hold, stop, or stand down on a fix (or on the whole loop) means stop editing the working tree immediately, reply to acknowledge, and neither commit nor push that fix. Mailbox messages are delivered between tool calls, so read yours before every edit and before every commit: a HOLD that landed while you were mid-edit still binds the moment you see it, and you must not race the orchestrator by finishing the edit first. Unless told to stand down entirely, keep polling and reporting the jobs it did not claim, and let it tell you which HEAD to resume on once its fix lands.
Timeline
Three feedback channels run in parallel after every push, each at a different latency. Fix as soon as the fastest channel reports a failure: do not wait for slower channels.
time LOCAL (free) REMOTE (CI minutes)
──── ──────────── ───────────────────
0:00 push
├─ pytest ─┐ ├─ lint.yaml ─────────────────────┐
├─ mypy ───┤ │ (mypy on all files, YAML, │
└─ ruff ───┘ │ secrets, zizmor) │
│ │
└─ tests.yaml ─────────────────┐ │
(12 stable + 6 unstable) │ │
│ │
0:30 GATE 1: local done │ │
fail? ─── yes ──► step 5 (fix now, skip CI) │ │
no ──► poll CI │ │
│ │
3:30 GATE 2: lint.yaml done ◄───────────────│──┘
mypy fail? ─── yes ──► step 4-5 │
no ──► continue │
│
5:00 GATE 3: tests.yaml fast jobs done ◄────┘
stable fail? ── yes ──► step 4-5
no ──► early exit if only macOS left (human runs; orchestrator waits)
8:00 tests.yaml macOS done (often skippable)
all green? ──► DONE
After fixing (step 5-7), the loop restarts from the top: push, run all three channels again.
Loop
-
Detect the repo and branch from the current working directory:
$ gh repo view --json nameWithOwner --jq '.nameWithOwner' $ git branch --show-currentUse the detected branch for all
--branch=flags below. -
Get the latest runs for the current branch:
$ gh run list --workflow=tests.yaml --branch=<BRANCH> --limit=1 $ gh run list --workflow=lint.yaml --branch=<BRANCH> --limit=1 $ gh run list --workflow=autofix.yaml --branch=<BRANCH> --limit=1 $ gh run list --workflow=docs.yaml --branch=<BRANCH> --limit=1 $ gh run list --workflow=release.yaml --branch=<BRANCH> --limit=1Track all five run IDs (
docs.yamlmay have none: itspaths:filter skips pushes touching nothing docs-relevant). An empty run list for the other workflows is not paths-filtering: GitHub can sit on a push event for hours before materializing any run (a 4-hour lag has been observed), so when a freshly pushed SHA shows no runs, keep re-polling instead of concluding the push was filtered, and measure the wait from run creation, not from the push. Thetests.yamlrun exercises the full test matrix;lint.yamlruns mypy on every tracked Python file and lints YAML;autofix.yamlruns the mechanical fix jobs (format-*,sync-*,fix-typos,fix-vulnerable-deps) and turns red when one crashes instead of committing a fix;docs.yamlbuilds and deploys the Sphinx site and runs the broken-links check (an externally cancelled or link-flaky run re-runs cleanly viagh workflow run docs.yaml --ref <BRANCH>, no commit needed);release.yamlruns the Nuitka binary matrix (dev binaries: an ordinary push rebuilds only the[tool.repomatic] nuitka.dev-targetscanary subset, while release commits, the weeklyscheduleandworkflow_dispatchbuild the full target fleet) — but only on projects with[tool.repomatic] nuitka.enabledand a CLI entry point; with Nuitka disabled the per-platform jobs skip on every push, release commits included, and a greenrelease.yamlmeans package build plus dev pre-release sync only. Even with Nuitka enabled, a single push can still skip the matrix:Metadata.skip_binary_build(repomatic/metadata.py) is the authoritative signal, true when the head commit is on a non-code branch, is a user-initiated version-bump commit, or (the common case) its changed files fall entirely outsideMetadata.binary_affecting_paths— a docs-only or workflow-only commit, say. Don't infer the reason from the commit message or assume an unrendered/skipped matrix job name meansnuitka_matrixitself was empty: the matrix data can be fully populated for that exact commit (verify via therelease / 🧬 Project metadatajob's loggedmetadata=JSON output) while the workflow still elects not to build it. Checkskip_binary_build's three conditions before asserting why a matrix skipped. All must pass — see § Autofix job failures and § Nuitka binary build failures below for how to triage them without stalling the loop. -
Run local tests while waiting for CI. Don't idle while polling. Start the full test suite and linters locally in the background immediately:
$ uv run pytest --no-header -q & $ uv run --group typing repomatic run mypy & $ uv run repomatic run ruff -- check repomatic tests docs &Give
run mypyno arguments: the tool runner resolves the same file list CI'slint.yamlruns it on, so the two cannot diverge. Naming directories instead is what used to make mypy pass locally and fail in CI.Gate 1 (local, ~30s): if any local check fails, you already have the diagnosis: skip straight to step 5 without waiting for CI.
If local passes, poll CI every 60 seconds with:
$ uv run repomatic ci-status --branch=<BRANCH> --no-fatalIt reads every workflow a push can start (derived from
.github/workflows/, so its list is wider than the five above), reports each one's latest run, and names the failing jobs that actually gate a merge. Three traps it settles, so no hand-rolledjqhas to: a run's ownstatuslags its jobs (every monitored workflow can readqueuedwhile a dozen jobs have already finished, which is indistinguishable from the runner-cap saturation a busy account genuinely hits); acontinue-on-errorprobe that crashed hides inside asuccessrun conclusion; and a run whoseconclusionisfailurewith no failed job is a workflow-level error (an invalidstrategy.matrixexpression, malformed YAML, a missing secret) with no job log to read, which the command flags rather than letting you write off a persistently-red workflow as a known artifact.The one thing run state does gate is log retrieval (step 4): job logs stay unreadable until the parent run itself reaches a terminal state.
A queue is not a hang, and elapsed time alone cannot tell them apart. A long stall invites the theory that some run is stuck and that cancelling it would free the pool, which is a conclusion worth reaching only on evidence, because acting on it destroys work that was progressing fine. Two readings settle it, and neither is the elapsed clock. Get a baseline from that workflow's recent successful runs (
gh run list --workflow <wf> --repo <owner/repo> --status success --json createdAt,updatedAt): a suite whose normal duration is two hours is not hung at ninety minutes. Then read per-jobcompletedAttimestamps (gh run view <id> --json jobs) rather than an aggregate: a flat count ofin_progressjobs is not evidence of a stall, since jobs finish and others start into the freed slots, holding the count steady while real progress continues. Watch for the self-contradiction that exposes the mistake, a report that the count "dropped from 11 to 9" and that nothing has changed. Two smaller traps live here too:ghreports a pending job'sconclusionas"", notnull, so aselect(.conclusion == null)filter silently matches nothing and reads as "no pending jobs"; and jobs queue against the runner pool theirruns-onnames, so a stall confined to macOS cells says nothing about Linux capacity. Never cancel another repository's run to free slots without the maintainer's explicit go-ahead, and never ask for that go-ahead on a diagnosis you have not backed with a baseline and timestamps.Gate 2 (lint.yaml, ~4 min):
lint.yamlfinishes beforetests.yaml. If "Lint types" (mypy) fails, proceed to step 4 immediately.Gate 3 (tests.yaml, ~5-8 min): once the first stable job fails, or all fast platforms (Linux, Windows) pass, proceed.
Poll in-process; never detach a monitor. Block on
gh run watch <RUN_ID>or loop the polls within your own turn. A detached background monitor (a standalone process, arun_in_background: trueBash poller that re-invokes you when it exits, or aMonitor-tool stream that returns control on each tick) makes a parent-resumed run spawn another monitor per tick instead of driving to a terminal state; worse, a spawned sub-agent that detaches this way orphans the poll from its caller the moment it returns. Hold the turn until the run completes: starting a poller and handing back "to be notified" is the early return this loop must never make.Every wait between polls must be a
sleep, never a busy-wait. A poll loop with no delay (until gh run view ...; do true; done) fires thousands of requests per minute and exhausts the REST quota (5,000/hour) within minutes. The harness blocking a bare foregroundsleepis not a reason to drop the delay: put thesleep 60inside the loop command itself, which runs fine in both foreground and background. Exhaustion does not just blind your own polling — workflows authenticating with the same PAT start failing server-side with misleading errors (see § GitHub API rate-limit exhaustion). -
On any CI failure, cancel the branch's remaining runs to free runners:
$ uv run repomatic cancel-runs --branch=<BRANCH>The command spares any run whose head commit carries
[changelog] Release, mirroring thecancel-in-progresscondition in every workflow's concurrency group. Cancelling a release run costs that version its binaries permanently, so never hand-roll the sweep withgh run cancel.Then download logs from all failed jobs across the workflows (logs are retained after cancellation):
# Failed stable test jobs: $ gh run view <TESTS_RUN_ID> --json jobs --jq '[.jobs[] | select(.conclusion == "failure" and (.name | contains("⁉️") | not))] | .[].databaseId' # Failed lint jobs (especially "🛡️ Lint types" for mypy): $ gh run view <LINT_RUN_ID> --json jobs --jq '[.jobs[] | select(.conclusion == "failure")] | .[].databaseId'The first filter negates the unstable glyph rather than matching a
✅prefix, mirroringJobStatus.required.tests.yamlruns four required jobs whose names carry no✅at all (🧬 Project metadata,1️⃣ Run-once tests,📦 Package install,🖥️ Validate …), and the release engine prefixes the workflow ahead of the glyph, so a prefix test silently drops a real failure from the batch.Fetch each failed job's log (
gh api repos/<OWNER>/<REPO>/actions/jobs/<JOB_ID>/logs) and fix them as one batch: different sources surface different issues, and logs survive cancellation. Batch only what has already failed, never what might still fail. Once every harvested failure is root-caused and fixed, push immediately rather than waiting for undrained cells to surface more: the fresh run supersedes the stale one, and serially waiting out each full matrix is the slow path. Analyze following the error triage discipline: stable-jobFAILED/AssertionErrorlines only.gh run view --log-failedwrites its log cache under~/.cache/gh, which the harness sandbox denies: the resultingfailed to get run log: creating cache entry ... operation not permittedmasquerades as aghbug. Disable the sandbox for that read, exactly like the signing calls in step 7.A completed job's log is readable while the rest of the run drains, but only with
--allow-escape-sequences. The run-scoped reads are gated on the whole run going terminal (gh run view --log-failedanswersrun <id> is still in progress; logs will be available when it is complete), while the job-scopedgh api repos/<OWNER>/<REPO>/actions/jobs/<JOB_ID>/logsanswers a failed cell immediately, twenty minutes into its slowest sibling's build. What makes it look otherwise is aghguard rather than the API: CI logs carry ANSI colour, soghrefuses to emit them and printsthe response contains terminal escape sequences; pass --allow-escape-sequences to output it anyway— one line where a log was expected, indistinguishable from an empty body if the output went to a file. Pass the flag and strip the codes:$ gh api repos/<OWNER>/<REPO>/actions/jobs/<JOB_ID>/logs --allow-escape-sequences \ | sed 's/\x1b\[[0-9;]*m//g' > job.logSo the diagnosis is minutes away, not an hour: harvest every failed cell as it lands and keep the run alive for the cells still to report. Cancelling to read logs is never the reason — logs survive cancellation, but they never needed it. Make the run terminal only when you have a fix, per the batch-and-push rule above: the stale run has no verification value left once superseded.
-
Fix the root cause using the combined picture from CI logs and local results. Fix the codebase, not the tests, unless the tests are genuinely wrong. Address mypy and ruff failures together (see § mypy/ruff fix oscillation).
If the root cause is in a third-party dependency, check whether a change this cycle exposed it before treating it as upstream:
git log <last-release-tag>..HEADfor a runner/image swap, a dependency bump, or a config change that put the dependency in a context it cannot satisfy (a Rust-built package forced to compile from an sdist on an architecture with no published wheel, say). When a cycle change is the trigger, revert or adjust that change; only a failure independent of everything the cycle touched warrants/file-bug-reportfor an upstream report.After applying fixes, re-run the full local validation:
$ uv run pytest --no-header -q $ uv run --group typing repomatic run mypy $ uv run repomatic run ruff -- check repomatic tests docs $ uv run repomatic run ruff -- format repomatic tests docsHard gate: all four must come back clean before step 6. If a fix introduces new failures not in the original set, the fix is wrong: revert it and try a different approach rather than layering another fix on top.
Both ruff commands write in place: read
git diffafter they run and fold any reformat into the fix. Skipping theformatpass does not fail CI — instead theformat-pythonautofix job pushes the reformat as its own commit, a new HEAD that cancels every in-flight run through the shared concurrency group and restarts the whole CI cycle (a wasted Tests + Nuitka round). A parent/repomatic-shiprun's format gate only covered the pre-fix tree: this loop's commits are exactly the ones that would skip it. -
Check autofix status before pushing:
$ gh run list --workflow=autofix.yaml --branch=<BRANCH> --limit=1 $ gh pr list --state=open --json number,title,headRefName,urlIf any open autofix PR already contains your fix — a
format-pythonbranch (ruff's own autofixes), async-repomatic/sync-workflow-pinsbranch (a bumped workflow pin, or a spliced-in--exclude-newer-packagecooldown exemption carrying no version bump at all — that one is the whole fix when themetadatajob cannot resolve its own pin), or anothersync-*/fix-*branch — prefer merging it over authoring your own commit: GitHub signs the merge commit server-side, so this sidesteps a local hardware-key signing prompt entirely. If it resolves the failure, merge it (gh pr merge <n> --squash --delete-branch), pull, and rebase your fix before pushing — or skip your own commit if the merge is the whole fix. Ifgh pr mergeis denied outright (a standingpermissions.denyon the verb, not a retryable prompt), see § PR-merge permission wall. -
Commit the fix with a clear message describing what changed and why, then
git push.When the fix corrects a user-facing bug, add a
changelog.mdentry only when the bug reached a released version. Blame the changed line against the last release tag (git blame, orgit log -S): a bug introduced and fixed within the current unreleased cycle never shipped, so it gets no entry; a bug that predates the last tag is a real regression and does. Making this call here keeps a parent/repomatic-shiprun from having to add or drop entries afterward.Time each push by what its diff rebuilds. A source-affecting fix (
repomatic/**,tests/**,pyproject.toml,uv.lock: whatever the repo's test and binarypaths:filters name) pushes the moment it clears step 5: the runs it supersedes were verifying an obsolete tree, and its own run rebuilds everything it cancels. A commit those filters skip (changelog-only, docs-only, cosmetic prose) is the opposite case on a binaries-enabled project:release.yamlruns on every push in a per-branch cancel-in-progress group, so pushed mid-drain such a commit cancels the in-flight binary matrix while its own run skips the rebuild (Metadata.skip_binary_build), and the lost verification costs a full re-dispatch. That cost scales with what is actually in flight: an ordinary push builds only the[tool.repomatic] nuitka.dev-targetscanary subset, and no push cancels a full fleet at all, since release commits,scheduleandworkflow_dispatchruns each sit in their own concurrency group. Hold it until the heavy matrices on the current HEAD are terminal, or bundle it into the next source-affecting push; with binaries disabled, only a canary build in flight, or nothing heavy in flight, push freely.If commit signing fails, do not loop on it. The sandbox can block the SSH key or socket under
~/.ssh/*(Operation not permitted): fix withdangerouslyDisableSandbox: truefor thegit commitandgit pushcalls only. A hardware-backed key (Secretive, YubiKey, TPM) then prompts the maintainer per signature, and a refused or missed prompt surfaces asagent refused operation?, indistinguishable from a real failure. Retry once at most after disabling the sandbox; if it still refuses, hand off cleanly: stage the specific files you fixed (nevergit add -A), return the exact commit message andgit pushcommand verbatim, and exit the loop. The fix is done — only the signature is missing. If the block is instead a structural permission deny ongh pr merge(not a signing refusal), the escalation differs — a maintainer's in-chat approval cannot clear a deny rule: see § PR-merge permission wall. -
Repeat from step 2 until the monitored workflows are green:
tests.yamlwith all stable (✅) jobs passing,lint.yamlwith no mypy failures (test and docs files included). Stop after 5 iterations without progress (the set of distinct failing stable jobs did not shrink): report what was fixed and what remains, and ask for guidance rather than churning. Productive iterations never trip the cap: a release paying down a long test-debt tail legitimately takes more than five pushes.
Early exit (human-invoked runs only)
This shortcut applies only when a human invoked the loop directly. Once all fast platforms (Linux, Windows) have completed with zero stable failures and only slow runners (macOS) remain queued or in progress, declare success and stop — macOS runners are resource-constrained, and platform-independent fixes gain no diagnostic value from waiting. Announce this exit; never end on a silent idle. Report that the fast channels are green and name what stays unverified (the release.yaml binary-matrix run ID, any still-queued macOS or congestion-delayed cells) so the human takes over that check instead of assuming the whole matrix passed.
When an orchestrator spawned this loop (like /repomatic-ship), do not early-exit — drive every monitored workflow to terminal green before returning. The orchestrator spawned you precisely to own the slow tail it would otherwise poll itself; returning at "fast platforms green" just hands the macOS cells and the release.yaml binary matrix back to a caller that must then detect your stall and re-drive them, and an idle sub-agent is indistinguishable from a dead one. Keep polling — with the step-3 sleep cadence, never a busy-wait — until macOS and the full release.yaml matrix have finished and every stable (✅) job is green, fixing and re-pushing on any stable failure (steps 4-7). Then send the orchestrator a final SendMessage naming each monitored workflow's conclusion. A harness idle/available signal is not that report: end the turn only with that explicit message, or on a blocker you cannot resolve (say which).
When supersession never lets a run conclude
A busy default branch can cancel the same workflow indefinitely. Every push shares the ${{ github.workflow }}-${{ github.ref }} concurrency group, so an unrelated commit landing mid-matrix cancels yours, and the next one cancels its replacement. Three consecutive heads leaving tests.yaml cancelled is an ordinary afternoon, not a fault. Dispatching a fresh run does not escape it: a workflow_dispatch run joins the same group and is cancelled by the next push like any other.
A cancelled run is neither a failure nor a pass, and the run-level conclusion hides which. Read the jobs:
$ gh run view {run-id} --json jobs \
--jq '[.jobs[] | .conclusion] | group_by(.) | map({(.[0] // "running"): length}) | add'
{"cancelled":2,"success":25}
Twenty-five green and zero failures is a strong signal that the tree is fine; it is not a green run, and must never be reported as one.
Establish coverage by union, then close the residue locally. List the cells that never reached success on any head containing your change, across every cancelled run:
$ gh run view {run-id} --json jobs --jq '.jobs[] | select(.conclusion != "success") | "\(.conclusion): \(.name)"'
The residue is almost always macOS, which is the slowest tier and therefore last standing whenever a run is cut short. Discount any ⁉️ cell (it gates nothing) and run whatever stable cells remain on the matching interpreter locally:
$ uv --no-progress run --python 3.10 --all-extras --group test --frozen -- pytest -m "not once"
--group test is required: without it uv resolves an environment with no pytest in it and fails with Failed to spawn: pytest, which reads as a broken command rather than a missing dependency group. A cell whose OS differs from the machine you are on cannot be closed this way — name it as unverified instead of implying otherwise.
Report the union explicitly: which cells passed in CI, which you closed locally, and which remain open and why. "CI was cancelled" on its own tells the caller nothing they can act on.
Stable vs. unstable
- Stable jobs (✅): must pass. So does every job carrying no stability glyph at all (
🛡️ Lint types,1️⃣ Run-once tests,📦 Package install): the test is the absence of⁉️anywhere in the name, never the presence of a✅prefix. - Unstable jobs (⁉️): allowed to fail (an in-development Python, currently 3.15). Their failures never gate the loop; a release context still fixes the repo-fixable ones (see error triage discipline, rule 1).
The workflow uses continue-on-error for unstable jobs, so the run can succeed even when they fail.
repomatic ci-status does this classification, and doing it by hand is where it goes wrong: job-name shapes differ across workflows — tests.yaml names carry no workflow prefix (✅ ubuntu-26.04 / py3.10) while the release engine's arrive through the reusable call (release / ✅ ubuntu-26.04, abc1234 build) — so a test anchored at the start of the name misfiles one shape and a split on " / " misfiles the other, either way masking a real failure as green. Containment is the one test both shapes satisfy. Only ✅/⁉️ carry stability: a job whose name opens on some other emoji (🛡️ Lint types, 1️⃣ Run-once tests) is required, so test for the absence of ⁉️ rather than for the presence of any glyph. If you reformat job names for display, keep the raw string for the test.
Error triage discipline
Read the exact error messages before forming a hypothesis. The most common diagnostic mistake is latching onto a warning or unstable-job failure instead of the actual stable-job error.
- Filter first. Gating and loop cadence read stable (✅) jobs only: an unstable (⁉️) failure never blocks the loop, never sets its tempo, and never queue-jumps a stable red. When an orchestrator like
/repomatic-shipspawned this loop for a release, ⁉️ reds are still work owed under its genuinely-green goal: once no stable red is outstanding, read their logs and fix what is repo-fixable (a crash converted to a clean availability-gated skip, a flaky live install folded into a tolerated-exit set), leaving only genuine dev-interpreter breakage unfixed and named in the final report. Human-invoked runs keep the strict filter: discard ⁉️ logs entirely unless asked. - Quote the error. Before proposing a fix, quote the exact failing line(s) from the log. If you cannot quote a specific error, you have not diagnosed the problem.
- One cause at a time. Multiple failing jobs often share a root cause: identify the common thread before treating each job as independent.
- Distinguish test failures from lint failures. A pytest
AssertionErrorand a mypyerror:have different fixes, but always analyze mypy and ruff failures together before fixing either (see § mypy/ruff fix oscillation). - Do not fix warnings. Deprecation and informational messages are not failures; ignore them unless they cause a stable job to fail.
Common failure patterns
mypy/ruff fix oscillation
mypy and ruff can enter a fix loop where each tool's fix breaks the other. Common triggers:
- Unused import: ruff removes an import (
F401), mypy then complains about a missing name; re-adding triggers ruff again. - Type annotation style: mypy requires an explicit annotation, ruff considers it redundant or wants a different form.
noqavstype: ignore:# noqasilences ruff but not mypy;# type: ignoresilences mypy but ruff flags the unused directive.
When the same lines toggle between fixes across iterations, stop and apply a combined resolution: a # type: ignore[code] with a matching # noqa: XXXX on the same line, or a restructuring that satisfies both at once.
mypy scope mismatch (local vs CI)
The classic false green: mypy passes locally over a subset of directories while CI checks every tracked Python file (tests/ and docs/ included). Run it as a bare repomatic run mypy and the runner resolves that same list, so an error in a test or docs file surfaces before the push rather than after it. A directory list is what reintroduces the gap.
Platform-specific test skips
Some tests are skipped on certain platforms (windows-11-arm has no Python 3.10 ARM64 build). Before investigating missing results, check the matrix exclude section in tests.yaml and the skip_platforms entries in the binary self-test plan (tests/cli-test-suite.toml): individual cases can opt out of platforms without affecting the CI matrix.
Cross-platform divergence
When a test passes locally but fails in CI, check platform differences before changing logic:
- Path lengths:
~/.config/...is shorter on Linux than macOS/Windows equivalents, affecting text-wrapping assertions. - Terminal width: CI runners may default differently than local dev machines.
- Encoding: Windows defaults to
cp1252, notutf-8. - Line endings:
\r\nvs\nbreaks exact-match assertions. - Untracked files: tests that enumerate files (
python_files,doc_filesmetadata) see untracked local files that CI's clean checkout lacks. When updating expected file lists, include only tracked files; rungit statusto spot the divergence.
Workflow and infrastructure failures
Not all CI failures are code bugs:
- Runner timeouts or OOM kills: the log ends abruptly or shows
The runner has received a shutdown signal. Re-run; do not change code. - Action version mismatches:
Unable to resolve action, deprecated-runtime errors. Fix the workflow YAML, not the Python. - Network/registry flakiness:
uv/piptimeouts, PyPI 503s,ConnectionResetError. Re-run. - Permission errors:
Resource not accessible by integration, 403s. Checkgh api rate_limitfirst (§ GitHub API rate-limit exhaustion), then token permissions; never code. - A whole workflow red with nothing executed, every job reporting failure and the
metadatajob unable to resolve its own toolkit pin: the inlineuvx 'repomatic==X.Y.Z'command is missing--exclude-newer-package repomatic=P0D, so the workflow-wideUV_EXCLUDE_NEWERrefuses a pin naming a release younger than the window, and eachneeds: metadatajob dies with it. Splice the flag onto that command line —uvxreads no project configuration, so there is nowhere else the bypass can live — or merge thesync-workflow-pinsPR that backfills it.lint-repo's fatalself-pin-cooldown-exemptioncheck names the offending files. Re-running changes nothing.
For infrastructure, re-run the failed jobs (gh run rerun <RUN_ID> --failed) and continue polling; never modify code to work around transient infra.
GitHub API rate-limit exhaustion
Heavy polling from this loop spends the same REST quota (5,000 requests/hour) as every workflow authenticating as the same user (REPOMATIC_PAT). Exhaustion produces two failure shapes that look unrelated to quotas:
- Local
ghcalls fail withHTTP 403: API rate limit exceeded. - Workflows fail with permission-shaped errors:
lint-reporeports the PAT lacksContents/Dependabot/Workflowsscopes, or aSync pull requeststep (repomatic pr-sync) stalls on the GitHub API until itstimeout-minutesor the concurrency group kills the run.
Diagnose with gh api rate_limit before touching token settings: remaining: 0 on the core bucket confirms it. Recovery: wait for the printed reset epoch, then re-run the failed workflows unchanged (gh run rerun <RUN_ID> --failed); they go green with no commit. While waiting, degrade to the channels that stay live: the GraphQL bucket is metered separately (gh api graphql for a commit's check suites, refs, and releases; gh pr list / gh pr view), and git fetch over SSH covers branch and commit verification.
PR-merge permission wall
gh pr merge — and other write-heavy verbs (force-push, reset --hard, repo or release delete) — is commonly hard-denied in the operator's own Claude Code settings.json as a standing guard against irreversible actions, independent of any conversation. This deny is structural, not a per-call prompt: it fires identically whether or not a maintainer just authorized the exact command in chat, because it blocks the tool call itself rather than asking. Signs you have hit it, not a normal prompt: the denial is immediate with nothing to answer, and it recurs identically after a fresh, explicit, real-time go-ahead. Do not retry it, and do not read a maintainer's chat-level "yes, merge it" as actionable — a deny rule cannot be cleared from inside the session. Report the wall once and ask the maintainer to run the merge themselves, fully outside this session (their terminal, or the GitHub web UI): that is the only path this deny shape leaves open. The same holds when a hardware-key signing refusal blocks a direct commit (step 7): with both remedies walled, the release advances only by a human acting outside the tool.
Nuitka binary build failures (release.yaml)
This section only applies to projects that build binaries ([tool.repomatic] nuitka.enabled with a CLI entry point); on a Nuitka-disabled project the per-platform jobs skip on every push and there is no matrix to fail. When enabled, the engine runs Nuitka across a 6-way OS/arch matrix on release commits, on the weekly schedule and on workflow_dispatch, narrowing an ordinary push to the [tool.repomatic] nuitka.dev-targets canary subset (job names are templated per platform, like ✅ {os}, {sha} build); catching a break while the version is still .dev0 avoids shipping a release with missing or broken binaries, which the immutable-release wall makes unrecoverable. Triage by category:
- Infrastructure (runner OOM, shutdown signal, macOS runner crash, registry timeout): re-run the failed job (
gh run rerun <RELEASE_RUN_ID> --failed); binary builds are resource-heavy and macOS runners crash more than most. - Nuitka configuration (
Error, unsupported ..., an unknown--flag, a missing data file): fix[tool.nuitka]inpyproject.toml, not the Python source; verify each key maps to a current Nuitka option. - Real compile or runtime errors (the binary builds but its smoke test fails, a
ModuleNotFoundErrorat runtime): fix the code or theinclude-package/include-data-filesconfiguration, then push and re-monitor.
The matrix is slow: let tests.yaml and lint.yaml set the loop cadence, but act on a red build cell the moment it lands, like any stable failure (every faster channel has already reported by then): fix, push, supersede. Never idle out the rest of a matrix you already know is doomed.
On a release run, a red build cell means that version ships short, permanently. When the run's head commit is a [changelog] Release vX.Y.Z push, publish-release sits at the end of that same run and flips the draft to published once the asset jobs settle, locking the asset list. Whatever the matrix failed to produce by then is missing from that version forever: no re-run, no later upload. v6.30.0 shipped without windows-arm64, v7.5.0 without either Windows build, and v7.7.0 without any binary at all.
This is by design, so do not try to stop it. Publishing a release short beats holding it, and the recovery is the next version, not a draft the maintainer has to babysit. Keep doing exactly what you do for any stable red: fix the cause, push, and let the fix ride the next release. The one addition is reporting: name the platforms that version lost, so the maintainer knows the gap exists and can note it in the release. A short ship also leaves the changelog section, the release body and docs/install.md still advertising binaries that are not there (the repomatic-ship skill's § Repairing a short ship covers the cleanup); flag it rather than fixing it silently mid-loop.
Autofix job failures (autofix.yaml)
autofix.yaml's jobs normally commit their fixes; a job that crashes turns the workflow red without producing one. Fetch the failed log (gh run view <AUTOFIX_RUN_ID> --log-failed) and triage:
- Tool-runner checksum mismatch (
ValueError: SHA-256 mismatch for https://...): the pinned binary's hash no longer matches the published artifact, usually an upstream re-publish. Regenerate withrepomatic update-checksums, then confirm withrepomatic run <tool>. - External-tool output parse error (a
RuntimeError/KeyErrorin a parser, likefix-vulnerable-depsreadinguv auditJSON): the tool's output schema drifted. Fix the parser and update the test fixture encoding the old shape. - Dependency fails to build on the runner (
Failed to build <pkg>, amaturin/cargo/native-compiler error during install): usually self-inflicted, not upstream: aruns-onchange this cycle moved the job to an architecture with no published wheel, forcing a doomed source build. Checkgit log <last-tag>..HEADfor the runner swap and revert it; a genuinely broken upstream artifact (failing on every platform) is the rarer case. - Genuine content the job fixes (real typos, an actual vulnerability): the job commits the fix and goes green on its own; nothing to do.
End-of-loop retrospective
After the loop converges (or hits the iteration cap), review whether any finding is worth feeding back: a failure pattern that recurred across iterations, or a diagnosis needing non-obvious knowledge, belongs in § Common failure patterns. Propose the addition; do not push it unreviewed.
Frequently asked questions
What to verify before installation and use
What does the babysit-ci source document cover?
Monitor the tests.yaml, lint.yaml, autofix.yaml, docs.yaml, and release.yaml (Nuitka binary matrix, on projects that enable it) workflows in a fix-verify loop until all stable matrix variations pass and type-checking is clean.
How do I install babysit-ci?
The source record exposes this install command: npx skills add https://github.com/kdeldycke/repomatic --skill ".claude/skills/babysit-ci". Inspect the command and pinned source before running it.
Which Agent platforms does the source record declare?
The pinned source record declares support for: claude code.
Which permission-related actions were detected?
Static rules flagged exec-script, network, read-files in the source; the page lists the matching lines and excerpts.
Alternatives
Compare before choosing
upex-galaxy/agentic-qa-boilerplate
agentic-qa-onboard
Walks new users through this repo's QA flow — Playwright + KATA + Allure + Xray stack, Jira QA workflow (Backlog → Shift-Left QA → Estimation → Ready For Dev → Ready For QA → In Test → QA Approved → Ready For Release → Deployed to Production), /shift-left-testing for pre-sprint AC refinement on backlog Stories, /sprint-testing for in-sprint manual QA, /test-documentation for TMS test cases, /test-automation for KATA-compliant E2E/API tests, /regression-testing for CI suite execution, /framework-
almanak-co/sdk
almanak-strategy-builder
Build, test, and deploy DeFi trading strategies using the Almanak SDK. ALWAYS use this skill when the user mentions almanak, DeFi strategy, trading strategy, yield farming, liquidity provision, token swap, borrowing, lending, perpetuals, staking, vault deposit, bridging tokens, backtesting, paper trading, or on-chain execution. Use for writing strategy.py files, composing intents (Swap, LP, Borrow, Supply, Perp, Bridge, Stake, Vault, Prediction), working with config.json strategy parameters, run
brucesongs/kali-claw
physical-security-testing
Physical penetration testing covering mechanical lock bypass (pin-tubular/wafer), RFID/NFC badge cloning (Proxmark3/ESP-RFID-Tool/Walrus), HID iCLASS/Mifare duplication, drop box deployment (LAN Turtle/Packet Squirrel), USB weapons (Rubber Ducky/Bash Bunny), hidden camera placement, and on-site engagement operations including tailgating pretext preparation and physical-docs legal templates.
oaslananka/kicad-mcp-pro
code-review
Use this skill for GitHub Copilot pull request and code reviews in oaslananka/kicad-mcp-pro. Review Python MCP server changes, KiCad adapter and tool-contract changes, tests, npm/package wrappers, Tauri/Rust desktop code, GitHub Actions, security controls, documentation, generated metadata, and compatibility/release surfaces. Use it whenever reviewing a PR or diff in this repository, especially changes under src/, tests/, packages/, src-tauri/, .github/workflows/, or public MCP metadata/configur