Find flaky tests in your CI runs

Tests that fail and then pass on the same commit, with the count and the error, from your recent runs.

  • You start it: When you start it

What it does

The task

Open the GitHub Actions runs of the workflow workflow in the repository repo from the last days days, at most 200 runs. Find the tests that failed in one run and passed in another run on the same commit. For each test, count the failures, read the error message and note the job and the runner. Put a table in a new Google Sheet, the most frequent first, with links to two failed runs. Do not run again or cancel any workflow.

  • It works in GitHub and Google Sheets, in the workspace you pick, and signs in with passwords from your Cuiar vault.
  • It runs once, when you start it.

What you give it

BlankWhat to giveExample
workflowThe name of the workflowCI
repoThe GitHub repositorybrightleaf/web
daysHow many days of runs to read14

What you get back

An example run with the example values above. Your run uses your own data.

CI in brightleaf/web, last 14 days: 186 runs, 7 flaky tests

TestFailuresErrorJob
checkout.spec.ts, applies coupon19Timeout of 5000 ms for #totale2e (ubuntu-latest)
export.test.ts, large CSV11JavaScript heap out of memoryunit
auth.spec.ts, magic link8Expected 200, received 429e2e

... 4 more with 2 to 4 failures

Saved to "Flaky tests 2026-11-04" with links to the failed runs.

Run it in Cuiar

  1. 01

    Open it

    Click Use in Cuiar on this page. The side panel opens with the task in the composer.

  2. 02

    Fill in 3 blanks

    Type workflow, repo and days. Tab moves to the next blank.

  3. 03

    Run it

    Run sends it to the agent. Follow each step in the panel, and stop it at any time.

From the terminal

cuiar exec "Open the GitHub Actions runs of the workflow CI in the repository brightleaf/web from the last 14 days, at most 200 runs. Find the tests that failed in one run and passed in another run on the same commit. For each test, count the failures, read the error message and note the job and the runner. Put a table in a new Google Sheet, the most frequent first, with links to two failed runs. Do not run again or cancel any workflow."

Run it from your AI agent

Claude Code, Codex, Cursor and other MCP clients reach Cuiar at https://mcp.cuiar.com/mcp. Add the server one time, then ask for the task in plain words, or call run_task yourself.

1. Add Cuiar to Claude Code

claude mcp add --transport http cuiar https://mcp.cuiar.com/mcp

2. Ask your agent

Use the Cuiar tool run_task to run my "Find flaky tests in your CI runs" template with workflow = CI; repo = brightleaf/web; days = 14.

Setup for other agents: AI agents.

The tool call

{
  "name": "run_task",
  "arguments": {
    "task": "Open the GitHub Actions runs of the workflow CI in the repository brightleaf/web from the last 14 days, at most 200 runs. Find the tests that failed in one run and passed in another run on the same commit. For each test, count the failures, read the error message and note the job and the runner. Put a table in a new Google Sheet, the most frequent first, with links to two failed runs. Do not run again or cancel any workflow."
  }
}
All engineering templates