Weekly CircleCI credit spend review posted to Slack
Every Monday, see which CI pipelines burned the most credits last week, what they cost in dollars, and the few fixes that would save the most.
Every Monday at 9am, review where my CircleCI credits went last week and tell me what to fix.
Review these projects: [list your CircleCI projects here]. Project slugs take the form {vcs}/{org}/{repo}, for example gh/acme/api. There is no operation that lists every project on an account, so this list is user-supplied. If it is empty, ask me for it rather than guessing.
For each project, use the CircleCI operation "Get summary metrics for a project's workflows" and collect, for every workflow: total_credits_used, success_rate, total_runs, and duration_metrics, paying particular attention to median and p95. The reporting window is capped at 90 days and the underlying data refreshes once daily, so a Monday morning run reflects activity through Sunday.
Rank every workflow across all projects by total_credits_used. Then take the top three credit burners and call "Get summary metrics for a workflow's jobs" on each one to break the spend down to individual jobs, so I can see exactly which jobs are consuming the credits rather than just which pipeline.
Call out the waste patterns explicitly instead of just dumping numbers. First, workflows with a low success rate, where credits are being burned re-running failures. Estimate roughly how many credits and dollars the failed runs account for, since that is usually the biggest single lever. Second, jobs whose median or p95 duration has climbed compared with the longer 90 day baseline, because a job that is quietly getting slower is getting more expensive every week. If you want explicit trend figures rather than computing the deltas yourself, use "Get project summary metrics and trends". Third, jobs sitting on expensive resource classes. macOS, Windows, GPU, and Arm executors burn credits far faster than standard Linux containers, so flag them wherever they show up among the top spenders.
Post the ranked review to my engineering Slack channel using the Slack Bot "Send a Message" operation. Lead with the headline numbers: total credits spent across all projects, and the approximate dollar cost at 0.0006 USD per credit. Present the dollar figure as an estimate, because credit attribution comes from build insights metrics rather than a billing endpoint. Follow that with the ranked workflow list, then the waste patterns, then the two or three changes that would save the most credits, most valuable first. Keep it short enough to read on a phone.
Also append one row per workflow to my CI spend tab using the Google Sheets "Append Values" operation, so we can trend spend week over week and month over month. Each row should carry the run date, project slug, workflow name, total credits used, estimated dollar cost, total runs, success rate, and median and p95 duration. Append rather than overwrite so the history accumulates.
If a project returns no data for the window, say so in the report rather than skipping it silently, since that usually means the slug is wrong or my token cannot see that project. Write the whole thing for an engineering lead who owns the CI budget, not for a developer debugging a single test. The question I want answered is where the money went and what to change.
What does this prompt do?
- Ranks your CI pipelines by how many credits they burned last week, with an estimated dollar cost for each
- Digs into the three most expensive pipelines to find the specific jobs running up the bill
- Calls out the usual money wasters: pipelines that fail and get re-run, jobs that have quietly gotten slower, and jobs running on pricey machine types
- Posts the ranked review to Slack and adds one row per pipeline to a spreadsheet, so you can watch CI spend week over week and month over month
What do I need to use this?
- A CircleCI account with access to the projects you want reviewed
- The list of projects to include, written the way CircleCI names them, for example gh/acme/api
- A Slack workspace and the channel where the review should land
- A Google account and a spreadsheet with a tab set aside for the weekly log
How can I customize it?
- Change the day and time it runs. A Monday morning run covers the week that just ended.
- Add or remove projects from the list, and change how many top pipelines get the deep dive
- Adjust the credit price if your plan bills differently, or set a spend threshold so you only hear about it when the bill jumps
FAQs
How accurate is the dollar figure?
Will this work on the CircleCI free plan?
Why does it only look at the past week?
Do I have to list my projects, or will it find them?
Does this change anything in my CI setup?
Related templates
Stop buying stale lists. Reps run a saved search, work the results like an inbox, and only the accounts they approve ever reach your CRM.
See how your brand's news coverage and sentiment stack up against four competitors, then let an assistant write the weekly report for you.
One screen showing every social post waiting on approval, sorted by deadline, so reviewers can approve or reject without leaving the page.
Every Monday, find the past champions and closed-won contacts who changed jobs, update Attio, and get the moves worth chasing in Slack.
Staff submit what happened, your social manager edits the copy, picks the accounts and puts it on the calendar without a single spreadsheet.
Drag creators through Sourced to Wrapped on a board grouped by campaign, with audience stats on every card and a one-click brief for each creator.
Stop guessing where your CI budget goes.
Get a ranked, dollarized review of your CircleCI spend in Slack every Monday morning, with the fixes that would save the most listed first.