CI cost and speed
get_ci_costsCompare CI costs and run speed between GitHub-hosted and self-hosted runners; get per-repo, per-runner-class cost and timing estimates, billing breakdowns, and what-if savings scenarios.
Instructions
Return what this project's CI costs and how fast it runs on GitHub-hosted runners versus your own machines (Plan 022, ADR 0037). Rows per repo × runner class [{ repo, runnerClass (github_hosted | self_hosted | unknown = never picked up), os, labels, runner, machine, jobs, expired, queueP50s, queueP95s, runP50s, runP95s, prPassRate (pull-request jobs only), infraRate, rawMinutes, billedMinutes (each job rounded up to a whole minute), rerunJobs, tinyJobs, monthCost, costBasis (github_list | github_public_free | github_larger_unpriced | self_hosted | unknown), currency }]; repos with visibility (public repos run GitHub-hosted minutes free); accounts per GitHub owner (plan, includedMinutes, monthMinutes, monthListCost, monthCost after included minutes); machines (busyHours as the union of job intervals, busyShare, monthEnergyCost and monthWearCost from the organization's own figures); speed factors (only passed jobs that ran on both classes, at least 5 each, with sample sizes); whatIfs for moving a workflow (minutes moved, jobs that stay and why, speed, cost delta, target wait and busy share, warnings); explain (re-runs, tiny jobs, expired jobs, pinned-to-GitHub jobs with their YAML reason, main and Dependabot runs that always use GitHub); advice with evidence; fields says which numbers are measured and which estimated; rates gives GitHub's list prices and the date they were read. Optional projectId (default: the configured project; an account-level key with none reads every project) and days (1-30, default 30). lowConfidence is true under 7 days of data. Returns { window, dataDays, lowConfidence, source, sourceNote, rates, fields, settings, repos, rows, accounts, machines, speed, whatIfs, explain, advice }. Read-only: it changes nothing on GitHub. Every money figure is an estimate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Window in days (default 30) | |
| projectId | No | Project UUID — defaults to the server-configured project; omitted with an account-level key, every project you can read (`project_id` is accepted too.) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | No | Per repo × runner class: wait, run time, pass rate, minutes, cost | |
| rates | No | GitHub list prices and the date they were read | |
| repos | No | ||
| speed | No | ||
| advice | No | ||
| fields | No | measured | estimated per field | |
| source | No | ||
| window | No | ||
| explain | No | ||
| whatIfs | No | ||
| accounts | No | Included minutes per GitHub owner | |
| dataDays | No | ||
| machines | No | ||
| settings | No | ||
| sourceNote | No | ||
| lowConfidence | No | Under 7 days of data |