Analyzing CI
usage, top, time, why, speedup, and labels — attribute cost, rank hotspots, decompose wall-clock, diagnose failures, and launch a local CI audit
Six commands that answer analytical questions rather than listing records. Each is a first-class product surface, not a dashboard export.
sling usage
sling usage [--org <slug> | --repo <owner/name>] [--group-by <axis>] [--order-by <col>]
[--asc | --desc] [window] [--json | --agent]Attributes StarSling Runner minutes and dollar cost over a time window.
| Flag | Meaning |
|---|---|
--org, --repo | Scope. --repo owner/name narrows to one repo; mutually exclusive. Defaults to your default org. |
--group-by | label (default) · workflow · job · repo · day. Not afterburner — to compare Afterburner, use sling time --group-by afterburner. |
--order-by | cost (default) · minutes · jobs · key |
--asc / --desc | Sort direction, default --desc. Naming both is a usage error. Not valid with --group-by day. |
--window <n>d | Trailing window, e.g. 30d. Defaults to 30 days. |
--month <YYYY-MM> | A calendar month. |
--from / --to | An explicit half-open range [from, to). Both required together. |
--json, --agent | Machine mode. |
sling usage --org acme --window 7d --group-by repo
StarSling usage — by repo
2026-07-07 → 2026-07-14
KEY RUNNER MIN JOBS COST $ % TOTAL
acme/api 25459.0 10784 $202.85 89.3%
acme/web 3040.2 1120 $24.22 10.7%The window flags are mutually exclusive — passing two is a usage error, not a silent precedence rule. A single-row result omits % TOTAL, since a lone row's share is always 100%. --group-by day renders a burn-down chart instead of a table.
A job's bound meter determines its billed time and rate. New paid subscriptions round each job up to a whole second, with no one-minute minimum; runner_minutes reports those billed seconds divided by 60. Existing paid subscriptions use max(1, ceil(duration / 60s)) per job until migrated. GPU and Review Runner rates are SKU-specific, so cost is not universally minutes × vCPU × $0.002.
The plan block
Every response carries a top-level plan describing the caller's billing state, which shapes both the window and the human chrome on any --group-by axis:
| Field | Meaning |
|---|---|
status | paid · free · blocked. Paid orgs get no bar or banner. |
period_source | stripe · install_cycle · calendar_month · explicit — labels the window. |
free_minutes_limit / free_minutes_used | Free orgs only — the remaining lifetime grant, drawn as a bar. |
blocked_reason | Blocked orgs only — why jobs will not dispatch, shown as a red banner. |
Fields that do not apply are omitted, not null. Machine mode passes the whole block through verbatim.
Exit codes: 0 ok · 2 usage error · 4 not signed in · 5 control-plane failure. Calls GET /api/usage.
sling top
sling top [--by <axis>] [--metric <col>] [--asc | --desc] [--org | --repo]
[-n <count>] [window] [--json | --agent]Ranks what burns the most runner time and money — the hotspots worth optimizing. Groups the same facts as usage, but sorts by a chosen metric and adds a period-over-period trend so a regression stands out.
| Flag | Meaning |
|---|---|
--by | workflow (default) · job · label · repo · branch |
--metric | runner-minutes · cost · jobs · p95-duration · p99-duration · queue-wait |
--asc / --desc | Sort direction, default --desc. |
--org, --repo | Scope; mutually exclusive. |
-n, --limit | Row count. |
--json, --agent | Machine mode — ranked rows plus a local block. |
sling top --by workflow --metric cost --window 30d
sling top — by workflow · cost · last 30d
KEY · WORKFLOW REPO COST TREND
Build acme/api $528.35 ↑55.2%
Test (multiple) $203.11 ↓12.3%
Lint acme/web $44.90 —(multiple) marks a key spanning several repos. The trend compares against the prior equal-length window, or shows — when there is no prior data. Calls GET /api/top.
For both sling top and sling usage, a seconds-plan organization's runner-minute values are billed whole seconds divided by 60. A fractional value therefore represents billed seconds, not fractional-second metering.
sling time
sling time <run|job|attempt id | URL>
sling time --repo <owner/name> [--workflow <name>] [--group-by afterburner|provider|tier] [window]Decomposes CI wall-clock into phases — so you can see whether time goes to infrastructure or to your workload. Polymorphic, with a different analysis at each level:
- A job or attempt splits wall-clock into the phase enum, with a per-step breakdown inside
steps. - A run adds DAG analysis: the critical path, parallelism efficiency (busy-runner-seconds ÷ wall-clock × width), and the blocking job — the single job whose speedup most reduces run wall-clock, so optimization effort lands where it pays.
--repoaggregates p50/p95/p99 per phase, per runner label, over a window — answering whether a repo's time goes to queue, provisioning, cache, or actual work. Add--workflowfor that workflow's critical path, and--group-byto compare the runners jobs ran on.
| Flag | Meaning |
|---|---|
<id | URL> | A run, job, or attempt id, or a pasted GitHub Actions URL. |
--repo <owner/name> | The repo aggregate instead of a single target. Required for the repo view — see below. |
--workflow <name> | Only with --repo. Only that workflow's jobs, plus its dominant critical path, hop by hop. |
--group-by <dimension> | Only with --repo. Split by the runner each job ran on: afterburner, provider, or tier. |
--window, --month, --from / --to | Only with --repo. Defaults to the last 30 days. Passing one alongside an id is a usage error — a single target already names its window. |
--json, --agent | Machine mode. |
sling time does not read the repo from your checkout's git remote. Without --repo or an id it prints its usage to stderr and exits 2, even inside a clone of the repo. It also rejects --org: the org comes from the --repo owner, or from the resolved id.
sling time
Job Name: Lint, typecheck, test & spell · Wall-Clock: 58s · Queue-Wait: 2s
PHASES TIME %-SHARE TIMELINE
provision 4.0s 7.14% ██░░░░░░░░░░░░░░░░░░░░░░
checkout+patch 2.0s 3.57% ░░█░░░░░░░░░░░░░░░░░░░░░
steps 46.0s 82.14% ░░░███████████████████░░
Set up Bun 1.0s ░░░█░░░░░░░░░░░░░░░░░░░░
Set up mise tools 2.0s ░░░█░░░░░░░░░░░░░░░░░░░░
Install dependencies 1.0s ░░░░█░░░░░░░░░░░░░░░░░░░
Lint (Biome) 2.0s ░░░░█░░░░░░░░░░░░░░░░░░░
Lint shell (shellcheck) 14.0s ░░░░░██████░░░░░░░░░░░░░
Lint Dockerfiles (hadolint) 0.0s ░░░░░░░░░░░█░░░░░░░░░░░░
▸ Typecheck 18.0s ░░░░░░░░░░░████████░░░░░
Test 7.0s ░░░░░░░░░░░░░░░░░░░███░░
Catalog drift 1.0s ░░░░░░░░░░░░░░░░░░░░░░█░
Spell (typos) 0.0s ░░░░░░░░░░░░░░░░░░░░░░█░
teardown 4.0s 7.14% ░░░░░░░░░░░░░░░░░░░░░░██
Top Steps
STEP TIME
Typecheck 18.0s
Lint shell (shellcheck) 14.0s
Test 7.0s
Set up mise tools 2.0s
Lint (Biome) 2.0sThe timeline column places each phase and step on the job's wall-clock, so you can see what ran when and what overlapped — not just what was slow. ▸ marks the single largest contributor. Top Steps then ranks the steps outright, which is the list to optimize from: here Typecheck and Lint shell are 32 of the 46 seconds inside steps.
Phases come from a frozen vocabulary shared by the runner hooks and the facts store: queue_wait, provision, image_pull, cache_restore, checkout+patch, steps, cache_save, teardown. Only the phases with time recorded against them are shown. Percentages are share of phase time, so they sum across the phase rows — the nested steps are a breakdown of steps, not extra rows in that sum.
The repo view
sling time --repo acme/api --window 30d
Repo: acme/api · Window: 2026-06-23 → 2026-07-23
PHASE RUNNER LABEL P50 P95 P99 JOBS
steps starsling-ubuntu-26.04 69.0s 326.0s 512.0s 318With --workflow, sling time also infers the workflow's critical path: for each run, it walks back from the last job to finish, each hop to the latest job that ended by the time the next one was created. The most common path across the window is shown, with the share of runs that followed it. Each hop's time is the p50 of started → completed for successful jobs with that name, on that hop's runner label, in the window.
Group by Afterburner
--group-by afterburner splits jobs by whether the runner had Afterburner available:
| Group | Meaning |
|---|---|
on | The job ran on a runner with Afterburner available. |
off | The job ran on a runner without Afterburner. Every other group is compared against off. |
unknown | Nothing was recorded where the job ran, for example because the job started before recording began. Never compared, and never counted as off. |
Each group also shows how many of its jobs engaged: went over their label's resources at any point. The split is by capability, not by engagement. Heavy jobs are the ones that engage, so splitting on engagement would make Afterburner look slower.
This is the only sling command that can group by Afterburner. sling usage --group-by takes label, workflow, job, repo, or day, and not afterburner.
sling time --repo acme/api --workflow Build --window 7d --group-by afterburner
Repo: acme/api · Workflow: Build · Window: 2026-10-10 → 2026-10-17
Critical path Install → Lint → Build (97% of 421 runs)
JOB afterburner=on afterburner=off Δ n (on / off)
Install 51s 1m 19s −28s (−35%) ±3s 212 / 198
Lint 1m 28s 2m 58s −1m 30s (−51%) ±9s 212 / 198
Build 1m 18s 2m 6s −48s (−38%) ±5s 212 / 198
───────────────────────────────────────────────────────────────────────────────────────────────
Path (p50, sum of hops) 3m 37s 6m 22s −2m 46s (−43%) ±11s
Hops are started→completed of successful jobs on each hop's runner label. Below n=20 on either side, no delta is claimed.
Groups afterburner=on: 636 jobs, Afterburner engaged on 452 of 636 (71%) · afterburner=off: 594 jobs
Δ is each group minus afterburner=off.
Engaged: the job went over its billed size at any point.
Phases, p50 on off n (on / off)
checkout+patch 2s 5s 636 / 594
steps 1m 18s 2m 6s 636 / 594
Phases pool every job in each group, so they differ by job mix as well as by box. --workflow compares like with like.The hop medians in this example are the install, lint, and build phases of StarSling's public TypeScript build benchmark on starsling-ubuntu-26.04-2, with Afterburner on and off.
How to read it:
Δis each group's p50 minus theafterburner=offp50. A negativeΔmeansonwas faster.±is an approximate 95% error range onΔ. AΔsmaller than its error range is not a measurable difference.nis the number of jobs on each side. Below n=20 on either side, the cell readsinsufficient sampleinstead of a number.- The path row is the sum of the per-hop p50s along the dominant critical path. The share in the header is how many runs followed that path.
- The phase table has no
Δon purpose. Each group pools whatever jobs ran in it, so a phase difference measures the job mix, not the runner. Use--workflowfor a like-for-like comparison.
What is approximate prints as a Note: line. With --group-by and --workflow, one note says that critical-path p50s are weighted by UTC day, over the days when both groups ran the job. That way a window that spans a rollout compares the same days. The note says how many runs fell on other days.
--group-by provider and --group-by tier read where each job's runner was placed instead. They compare every group against the group with the most jobs. Placement is not yet recorded for every organization, and until it is, every job reads unknown.
Other commands that show Afterburner
| Command | How Afterburner shows up |
|---|---|
sling jobs list --afterburner engaged|not-engaged | Filters jobs by engagement, and shows each job's Afterburner rate and coverage. |
sling jobs show <id> | Each attempt's own engagement, rate, and coverage. |
sling bill | The share of jobs that engaged, per runner label, for the billing period. |
JSON output
--json and --agent emit the response body on stdout, plus a local block. Grouped, it adds:
| Field | Meaning |
|---|---|
grouping.group_by | afterburner, provider, or tier. |
grouping.baseline | The group the others are compared against — always off for afterburner. |
grouping.groups[] | key, jobs, and for Afterburner captured (jobs with Afterburner available and a known capture) and engaged. |
grouping.phases[] | phase, group, p50_ms, p95_ms, p99_ms, jobs. |
critical_path.path | The hop names, in order. runs and path_runs give the share of runs that followed it; min_sample is the n floor. |
critical_path.hops[] | job_name, label, and cells[]. |
critical_path.hops[].cells[] | group, p50_ms, n, and delta. |
critical_path.total[] | The path row per group: group, p50_ms, delta. |
meta.truncated[] | Notes on what is approximate — key and reason. |
A delta appears only on compared cells — never on the baseline or unknown. It is either { "kind": "estimate", "ms", "pct", "error_ms", "baseline_p50_ms" } or { "kind": "insufficient_sample" }.
Recipes
Afterburner's effect on one job. There is no per-job flag, so filter the JSON. For example, the Lint job in a Build workflow:
sling time --repo acme/api --workflow Build --group-by afterburner --json \
| jq '.critical_path.hops[] | select(.job_name == "Lint")'Match job_name exactly as the JOB column prints it. Only jobs on the dominant critical path appear in hops.
Change the window with --window 14d, --month 2026-09, or --from 2026-09-01 --to 2026-10-01. A longer window gives more jobs per side, and a smaller error range.
Script it with --json. Human output goes to stderr, so pipe --json rather than the table.
Exit codes: as elsewhere, plus 6 for partial — telemetry was incomplete, and the body is still emitted. The repo view currently always reports 6, because its infrastructure phases are approximated from step timing; read meta.truncated for the details. Calls GET /api/time.
sling why
sling why <run | job | attempt id | URL> [--json | --agent]A server-authored diagnosis — why a CI job failed, so an agent can fix the failure instead of re-deriving it from logs. It is read straight from the facts store: the last failing step, a bounded ##[error] window, and run context. No LLM sits in the request path, so the same job always classifies the same way. A run id diagnoses that run's most-diagnosable job.
Every diagnosis carries a classification, evidence references, suggested actions with ready-to-run commands, and an agent-ready remediation prompt.
Classifications: step_failure · hang · oom · timeout · cancelled · terminated · infra · network_egress · unknown.
On a cancelled target, why identifies the canceller — a user, a concurrency group, or a merge-queue flush — so an external cancellation is not misdiagnosed as a code failure.
sling why job_88886665361
JobID: 88886665361 · JobName: test (3)
Failure Reason: The step 8 "Test" step failed (exit code 101).
Evidence
Classification: step_failure
Phase: step 8 "Test"
Logs:
##[error]Process completed with exit code 101
Suggestions:
1. Verify the logs
sling logs 88886665361 --grep '##\[error\]'Every diagnosis carries evidence, a suggested next step, and a ready-to-run prompt for a downstream agent. Calls GET /api/why.
sling speedup
sling speedup [--repo <owner/repo>] [--org <slug>] [--agent-cli claude|codex]Runs the pinned ci-speedup audit locally. Sling asks StarSling which skill commit to use, downloads that archive directly from GitHub, verifies its SHA-256 digest, and starts Claude Code or Codex with the audit instructions. Repository contents and CI logs stay on your machine and with your coding-agent provider; StarSling receives the authenticated pin request (and the CLI's usual background update check), not the audit data.
| Flag | Behavior |
|---|---|
--repo <owner/repo> | Target repository. Defaults to the checkout's origin remote, which must point to github.com. The owner and repository name are validated against GitHub's character rules. |
--org <slug> | Optional, but it must equal the repository owner, case-insensitively. It does not select a different organization. |
--agent-cli claude|codex | Agent to launch. Defaults to claude when installed, then codex. For an interactive launch, naming an unavailable agent, or having neither installed, exits 2. |
--json, --agent, --no-input | Print a launch plan instead of starting an agent. |
--help, -h | Print the command help. |
The command rejects positional arguments, unknown flags, and the otherwise global --yes, --compact, and --no-color flags with exit 2.
Prerequisites and repository access
You need a signed-in Sling CLI, Python 3.9 or newer with PyYAML, and the GitHub CLI installed and signed in to github.com. The repository must belong to a GitHub organization with the StarSling GitHub App installed, and you must be a member of it. For an interactive launch, claude or codex must also be on PATH.
When --repo is omitted, Sling reads the current checkout's origin remote. When --org is supplied, it must match the repository owner; the skill pin is always requested for that owner.
Launch-plan mode
Sling prints a launch plan and never starts a nested agent when:
--json,--agent, or--no-inputis passed;- stdin or stdout is not a terminal, including piped output; or
CLAUDECODE,CODEX_THREAD_ID, orCODEX_SESSION_IDis set.
The pretty-printed JSON object contains:
| Field | Meaning |
|---|---|
commit | The pinned starslingdev/skills commit. |
skill_dir | The fresh directory containing the verified ci-speedup files. |
repo | The resolved owner/name. |
prompt | The initial agent prompt, including the complete skill instructions, their file location, the target repository and pinned commit, and the non-interactive defaults to save the report without applying fixes. |
env | Reserved environment overrides; currently {}. |
argv | [agent, prompt], included only when an agent was named or found on PATH. |
The plan contains no credentials. Plan mode needs no installed agent and does not check a named agent's executable, but Python, PyYAML, and an authenticated gh are still required. It leaves skill_dir for the caller; later runs remove launch directories older than 24 hours. Failures always write plain text to stderr and nothing to stdout, even under --json or --agent.
Cache and integrity
Archives are cached at ${XDG_CACHE_HOME:-$HOME/.cache}/sling/skills/ci-speedup/<commit>/skill.tar.gz and rechecked against the server-provided SHA-256 on every use. A cached archive that fails verification is not downloaded again: remove the named file before retrying. Old archives are not pruned.
Every run unpacks into a fresh <commit>/launch-* directory. Interactive launches remove that directory when the agent exits; stale launch directories older than a day are removed by later runs.
StarSling validates its pin's URL against its commit when the control plane starts, and Sling re-validates every pin it receives: the URL must target codeload.github.com/starslingdev/skills at the named commit. Sling refuses redirects. Extraction permits regular files under the skill directory only, rejects unsafe paths and more than 256 MiB of content, and requires SKILL.md.
The pin itself is never cached. A StarSling outage, a 15-second pin timeout, or a server 5xx stops the run with exit 5; Sling never falls back to an older pin. Archive downloads have a 60-second timeout.
Exit codes
| Code | When |
|---|---|
2 | Invalid arguments, no valid GitHub repository, or --org not matching the owner. |
2 | A missing local prerequisite; gh not signed in to github.com, or gh auth status failing or not answering within 15 seconds; or no Claude Code or Codex for an interactive launch. |
2 | The inferred repository owner is not a StarSling organization you belong to. |
3 | StarSling does not know the requested skill. Not expected: the CLI always requests ci-speedup. |
4 | Sling is not signed in or the credential is rejected. When --org was supplied, a membership refusal also exits 4; its current message suggests sling login, even though signing in again will not fix missing organization membership. |
5 | Pin lookup, download, checksum, extraction, cache filesystem, or pin-validation failure. |
7 | The control plane rate-limited the request. |
| agent's code | After an interactive launch, the command returns the coding agent's exit status, which can overlap Sling's own codes. |
Calls GET /api/skill/{name} to resolve the pin. A 422 validation error maps to exit 2.
sling labels list
sling labels list [--json | --agent]The catalog of available runner labels and their specs, so runs-on mapping and cost hints reference concrete options instead of hardcoded names. The catalog is static and global — identical for every caller — so the usual --org, --repo, and window flags are accepted but inert. list is the only subcommand.
sling labels list
StarSling runner labels
LABEL CPU MEM (GiB) ARCH $/MIN
starsling-ubuntu-26.04 4 16 x64 $0.008
starsling-ubuntu-26.04-2 2 8 x64 $0.004
starsling-ubuntu-26.04-8 8 32 x64 $0.016
starsling-ubuntu-26.04-16 16 64 x64 $0.032
starsling-ubuntu-26.04-32 32 128 x64 $0.064
starsling-ubuntu-26.04-64 64 256 x64 $0.128| Field | Meaning |
|---|---|
label | The runs-on runner label. |
cpu | vCPU count. |
memory_gb | RAM in GiB — a strict 4 GiB per vCPU. |
arch | CPU architecture; x64 today. |
price_per_min_usd | The normalized per-minute rate used for comparison and display. The job's bound meter determines whether billing is in whole seconds or whole minutes. |
See Instance types for the same catalog in context. Calls GET /api/labels.