rea-ci-tests-audit
MOmorluto/rea486k8,943 new stars in the last 7 days
When you want to cut GitHub Actions minutes and wait time across one repo or a whole portfolio. Measures queue, setup and run time per job, billed minutes with per-job minute rounding and the macOS 10× multiplier, and cron runs per month. Finds pipelines that have been failing quietly, ranks fixes by minutes saved, then ships them as small PRs with warm-cache before/after numbers. Triggers on "/ci-audit," "audit our CI," "why is CI so slow," "cut Actions minutes," "we're over our Actions minutes," "optimize GitHub Actions," "CI costs," "speed up CI." Not for designing CI from scratch or picking a CI vendor.
Measure first, then fix the few things that matter. In real audits the biggest win was rarely a slow test suite. It was a scheduled pipeline that had failed every day for months, a 30-second hourly cron billed as 730 minutes a month, or an SDK silently retrying a dead request three times.
A stdlib script, scripts/ci_audit.py in this skill's folder, does the measuring. You read its output, decide what's worth fixing, and ship it.
python3 <skill-dir>/scripts/ci_audit.py inventory <owner> # which repos run Actions, private vs public
python3 <skill-dir>/scripts/ci_audit.py month <owner/repo> # billable minutes by workflow, 30 days
python3 <skill-dir>/scripts/ci_audit.py jobs <owner/repo> --runs 150 # queue / setup / run per job
python3 <skill-dir>/scripts/ci_audit.py steps <owner/repo> <run-id> # per-step seconds for one run
python3 <skill-dir>/scripts/ci_audit.py schedules <owner/repo> # every cron as runs per month
It needs the GitHub CLI (gh) logged in. month and jobs make one API call per run, so a busy repo takes a minute or two. Run them in the background.
Before measuring, settle with the user:
development, say) by default. Releasing to the default branch is a separate yes, but crons and scheduled fixes only take effect after it (Step 6).Read references/gotchas.md now.
ci_audit.py inventory <owner> for each owner. Note private vs public: only private repos cost money, but every repo's wait time matters when agents block on CI.gh api "/organizations/<org>/settings/billing/usage?year=YYYY&month=M". For a personal account, use ci_audit.py month on each private repo and compare the total with the plan's included minutes.For every repo with scheduled workflows:
gh api repos/O/R/actions/runs/<id>/logs > logs.zip).actionlint on .github/workflows/. A file GitHub can't parse never runs its schedule.Expect layered errors. See references/fixes.md §1.
ci_audit.py schedules <repo> on each repo with crons. Multiply runs/month by the billed minutes per run (from jobs). Flag:
For the top repos: ci_audit.py jobs <repo> --runs 150, then steps on one recent green run of each expensive job. Classify each job's time:
| Bucket | What it points to |
|---|---|
| Queue high | Runner contention or concurrency groups. Usually not fixable cheaply; note it. |
| Setup high | Dependency install and caching (references/fixes.md §3–4). |
| Run high, app tests | Real test time. Leave it unless a step is plainly redundant. |
| Run high, data pipeline | Instrument phases and fix the code, not the CI (references/fixes.md §6). |
| Failures > 5% | Flaky tests or broken pipelines (references/fixes.md §1, §7). |
Write one table, sorted by estimated minutes saved per month:
| Repo | Finding | Evidence | Fix | Est. saved/mo | Risk |
|---|
Include findings you won't fix (off-limits repos, owner decisions such as cron frequency or parallelism) with the numbers the owner needs to decide. Show it to the user and get a go on which rows to ship. Archive it as ${MAKERSKILLS_CONFIG:-$HOME/.config/makerskills}/ci-audit/archive/<YYYY-MM-DD>-<scope>.md.
One repo, one worker. On hosts that support subagents, run repos in parallel with the same brief: fresh clone, issue first, branch named for the issue, small commits, before/after numbers in the PR body.
For each fix:
loopify) works well.loopify — schedule a monthly re-audit or a next-morning check of the first scheduled run.castmate — get a second model's review on a risky workflow change.unstuck — when a fix that should work measures slower, before giving up on it.project-manager — track owner decisions (cron frequency, paid runners) that the audit surfaced but didn't make.MOmorluto/rea486k8,943 new stars in the last 7 days
MOmorluto/rea486k8,943 new stars in the last 7 days
MAmattpocock/skills337k4,978 new stars in the last 7 days
MAmattpocock/skills337k4,978 new stars in the last 7 days
MAmattpocock/skills337k4,978 new stars in the last 7 days
Block dangerous git commands like push and reset --hard before they execute.
MAmattpocock/skills337k4,978 new stars in the last 7 days