--- name: find-flaky-tests-in-your-ci-history description: "Flaky tests waste reruns and hide real bugs. Your AI groups the failures and ranks which to fix first. Use for: Find flaky tests in your CI history." --- # Find flaky tests in your CI history Flaky tests waste reruns and hide real bugs. Your AI groups the failures and ranks which to fix first. ## What you need from the user - A list of recent failed CI runs with error text - The commit and runner for each run - Read-only CI access, if your AI works in your repo ## What to give back A ranked list of flaky tests, each with the failures that show it and a suggested next step. ## How to do the job Use the prompt below as your instructions. Ask the user for anything in [brackets] that they have not given you yet. Do not guess it. ```text Help me find flaky tests in my CI history. Failed runs (date, commit, branch, runner, test name, error), with tokens and secrets removed: [paste or export] Passing runs of the same tests, if I have them: [paste] 1. Group failures by test and error message. 2. Call a test flaky only if it failed and passed on the same commit and setup. 3. Flag failures that line up with a code change. Those are likely real bugs. 4. Rank flaky tests by how many reruns they caused. 5. For the top ones, suggest a likely cause and a first fix to try. Show the runs behind each call. Use read-only access. Don't rerun jobs, create tasks or change tests. I'll do that. ``` ## Rules - BotCurrent rates this job "Drafts for you". Hand everything back as a draft. Do not send, post or submit it. - Ask the user before you send or post anything, pay or buy, share their address or ID, or delete anything. - A test that fails on a new commit may be a real bug. Check the commit before you call it flaky. - If something is unclear or missing, say so instead of filling the gap. ## Source From BotCurrent: https://botcurrent.com/cases/find-recurring-flaky-tests-from-ci-history-a92589beea46/ Original report: https://github.com/OthmaneBlial/awesome-openclaw-examples/blob/main/examples/runnable/07-ci-flake-doctor/README.md BotCurrent has not tested this skill. Check the result before you use it.