Weekly CircleCI test-health report posted to Slack

Every Monday, get a ranked rundown of your flakiest and slowest CircleCI tests, with the biggest week-over-week regressions flagged, posted straight to Slack.

Agentic Task
CircleCISlack BotGoogle SheetsEngineeringOperationsAI ReportsDaily Digests
PromptCreate

Every Monday at 9:00am, generate a prioritized weekly test-health report for the CircleCI projects I track and deliver it to my team. Run this on a cron schedule. I will give you the list of CircleCI project slugs (in {vcs}/{org}/{repo} form, for example gh/acme/api), the key workflow names for each project, the Slack channel to post to, and the Google Sheet that stores my running trend log.

For each project I track, pull three things from CircleCI. Use Get flaky tests for a project to find tests that passed and failed on the same commit. Use Get test metrics for a workflow, for each important workflow, to surface the slowest tests and the least reliable tests based on the most recent runs. Use Get project summary metrics and trends to read the project's success rate and build-duration metrics along with their trend over the reporting window.

Turn the raw numbers into a ranked report. Rank the worst flaky tests across all my projects, most flaky first, and separately rank the slowest tests by duration. Call out week-over-week regressions: projects or workflows whose success rate dropped or whose median build duration climbed versus last week. Establish last week's baseline from the trend log in my Google Sheet (read the most recent prior row for the previous figures) together with the trend fields CircleCI returns. Because CircleCI's insights window is limited, the Google Sheet is what makes true week-over-week comparison possible over the long run.

Post the report to Slack with Send a Message (Slack Bot) in my chosen channel. Keep the Slack copy short and skimmable: lead with the top offenders, list the handful of worst flaky tests and slowest tests, note any success-rate or build-duration regressions, and end with one plain recommendation on what to fix this week. Use Slack mrkdwn formatting (single asterisks for bold, bullet lines) and keep it tight rather than dumping every metric. Make sure the bot is a member of the channel or has permission to post there.

Then append a one-row summary to the Google Sheet with Append Values so the numbers accumulate into a durable trend log. The row should capture the week (date) plus the headline figures such as overall or per-project success rate, median build duration, the count of flaky tests, the single worst flaky test, and the slowest test. Keep the columns in the same order every week so the sheet builds into something I can chart and compare over time.

Example output

*CircleCI test health, week of Jul 13* :test_tube: *Top flaky tests* 1. checkout_spec.rb applies promo code, flaked 6x (gh/acme/web) 2. PaymentServiceTest.retriesOnTimeout, flaked 4x (gh/acme/api) *Slowest tests* 1. e2e/full-signup-flow, 4m 12s 2. IntegrationTest.bulkImport, 2m 48s *Regressions vs last week* • gh/acme/api success rate 96% to 89% (down 7 pts) • gh/acme/web median build 8m 10s to 11m 30s (up 3m 20s) *Fix this week:* quarantine the promo-code checkout test and investigate the api success-rate drop tied to timeout retries.

Additional information

What does this prompt do?
  • Every Monday morning, pulls test and build data from the CircleCI projects you track and turns it into one prioritized report.
  • Ranks your worst flaky tests and slowest tests so the biggest time-wasters sit right at the top.
  • Flags week-over-week drops in pass rate and jumps in build time, with a plain recommendation on what to fix first.
  • Posts a short, skimmable summary to Slack and logs the week's numbers to a Google Sheet so you can watch the trend over time.
What do I need to use this?
  • A CircleCI account with the projects you want to track
  • A Slack workspace and a channel where the report should be posted
  • A Google Sheet to hold the running week-by-week trend log
How can I customize it?
  • Change the schedule, for example run it every Friday afternoon instead of Monday morning
  • Choose which projects, workflows, and Slack channel are included
  • Adjust how many top offenders the Slack summary lists before pointing to the full detail

Frequently asked questions

Which projects does this cover?
Whatever CircleCI projects you list. You can track a single project or many across your organization, and each one is included in the same weekly report.
How does it know what got worse this week?
It compares this week's pass rate and build times against the running log it keeps in your Google Sheet, so you see real week-over-week movement instead of just a single snapshot.
Will the Slack message be overwhelming?
No. It is kept short and skimmable, with the worst offenders first and one clear recommendation on what to fix this week.
Do I need to keep the spreadsheet updated myself?
No. A new summary row is appended automatically every week, so the trend log builds itself over time.
Can I run it more or less often?
Yes. Monday at 9am is just the default. You can move it to any schedule that fits your team's rhythm.

Stop chasing flaky tests by hand.

Get a ranked CircleCI test-health report in Slack every Monday, with the week's worst offenders and a clear fix-first pick.