Skip to main content

Triage and cut GitHub Actions minutes with a qbash Task

Mitchell Tessier

Every push to GitHub can start your workflows again, and coding agents push far more often than people do. GitHub's usage metrics show the minutes each workflow uses, but turning those minutes into a cost and finding the runs nobody needs is usually a manager's job, done by hand. This video shows a qbash Task that does it. The Task counts every run and job in a repo, prices them at GitHub's published rates and looks for savings such as runs that a newer push replaced before they finished.

What's covered

  • What a qbash Task is and how it runs
  • How the GitHub Actions cost report Task was built
  • The cost report from one week of one repo
  • Superseded runs and the YAML fix the Task suggests
  • Versions and run logs

What a qbash Task is

A Task is an AI cloud function written in Python that qbash hosts on secure cloud infrastructure. A Task can call connectors like GitHub and Slack, run inline prompts on the model you choose, and keep results in qbash Memories between runs. It can run on a schedule, start from a webhook or a GitHub event, or be called from Claude Code, Codex or Cursor through the qbash MCP.

How the Task was built

Claude Code built the GitHub Actions cost report through the qbash MCP, with two messages to the Task builder. The Task builder wrote the Python and confirmed which GitHub and Slack accounts to use. qbash keeps those credentials out of the Task, the logs and your model calls.

The Task page lists GitHub and Slack under Tools, one inline prompt called actions-yaml-fixes.prompt, and a Manual trigger. The video also shows a Schedule trigger set to every Monday at 9:00 AM, America/Toronto.

The comment at the top of main.py says the report is read-only by default. Writes (a Slack post, cancelling superseded runs, opening a fix PR) only happen when the matching input is switched on.

The cost report

The Task calls the GitHub connector for every workflow run and job in the repo. It rounds each job up to a whole minute and prices it at GitHub's published per-minute rates, which sit in a RATES_PER_MINUTE table in the code (0.006 for Linux 2-core, 0.010 for Windows, 0.062 for macOS, with separate rates for larger runners).

In the run shown, the Task scanned one repo for a week. The report header reads:

Nov 2 to Nov 9, 2026, 7 days: 1,866 runs, 4,230 jobs, 12,555 billed minutes.

The first table is the estimated cost per workflow. API Test is the most expensive, with 356 runs, 1,750 jobs, 5,928 billed minutes and an estimated $35.57. UI CI comes next at $18.98 and API E2E at $10.43.

A note in the run output says the figures are estimates from job durations at list rates, and that free minutes, discounts, rounding of larger runners and multipliers can make the real invoice differ.

Superseded runs and the YAML fix

A superseded run is one where a newer push started the workflow again before the original run had finished. The report lists them per workflow. API Test had 50 superseded runs and 869 billed minutes. UI CI had 32 and 451, and API E2E had 25 and 124. None of these workflows had a concurrency block. A third table lists jobs that ran for under a minute, since each one is billed as a full minute.

The numbers come from Python. After that, a model call reads the findings and the workflow files and suggests a YAML change where it is safe. The inline prompt, actions-yaml-fixes, runs on Claude Sonnet 5.5 with structured output and opens with:

You are a CI cost reviewer. You receive precomputed findings per GitHub Actions workflow

For the API tests, the suggested change is a concurrency block that cancels superseded runs on pull requests only:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: ${{ github.event_name == 'pull_request' }}

Versions and logs

Every save and update to the Task is a version you can compare or go back to. The Versions tab in the video shows two. Every run keeps a step-by-step log. The run shown passed in 6m 36s with writes blocked, and its log lists each github.list_workflows and github.list_workflow_runs call alongside the Task's own qbash.log lines, such as the time window and "16 workflows".

GitHub Actions cost has the full walkthrough of this Task and how to build your own. Task editor covers versions and run logs, and Official MCP server has the setup steps for Claude Code, Codex, Cursor and other MCP clients. The GitHub connector page lists what the Task can call.

Connect the qbash MCP free →

Stay in the loop

Product updates, tutorials, and AI insights. No spam.