1. Habit
  2. Skills
  3. Triage CI Flake skill
payloadcms · 301 installs

Triage CI Flake skill
Runs by itself, e2e fails on main.

Flaky e2e tests reproduced, then fixed.

Install the Triage CI Flake skill and make it a habit: follow https://gethabit.dev/skills/payloadcms/triage-ci-flake.md

  1. 1Copy
  2. 2Paste into Claude Code, Codex or Cursor
  3. 3It runs by itself

301 installs45K starsMIT licenceSource on GitHub ↗

Triage CI Flake

by payloadcms · 301 installs

The skill

The triage ci flake skill gives agents a reproduce-first routine for e2e failures in CI: aggregate failing checks, rerun the exact Playwright test with dev and prod builds, fix and confirm with repeated runs.

Only when you ask.

The habit

Flaky e2e tests reproduced, then fixed.

↻ Runs by itselfe2e fails on main

How the habit works.
You don't have to.

Three questionsWhen does it start? How does it check its work? What does it remember?

One run, step by step.
Then it stops.

Stop ruleStops after one failing suite per run; no fix without reproduction.

  1. 01

    Aggregate failures

    Your agent reads the failing checks and lists suite, test name, error and file for each.

  2. 02

    Spot patterns

    It groups failures by shared selector, shared file or same suite.

  3. 03

    Reproduce with dev

    It frees port 3000, starts pnpm dev for the suite, waits with curl and runs only the failing test.

  4. 04

    Reproduce with prod

    If it passed, it runs pnpm prepare-run-test-against-prod and pnpm dev:prod, then the test again.

  5. 05

    Fix the cause

    It applies a condition-based fix that respects the playwright and payload eslint rules.

  6. 06

    Verify stability

    It reruns the test ten times and then the full suite file.

  7. 07

    Ask about the PR

    It shows a summary with files and results and asks you before creating a PR.

What it may do.
Nothing more.

Safe by defaultIt writes only in its own folder and asks you before anything goes out.

Is it for you?
Use it when it fits.

Quick checkRead both lists. If the left one sounds like you, the Triage CI Flake skill helps.

Use it when

  • ✓ e2e tests fail on main after a merge
  • ✓ a test passes locally but fails in CI
  • ✓ a PR has several failing checks

Skip it when

  • – the failure is a unit test
  • – you work outside the Payload repo setup

Questions

Triage CI Flake skill, answered.

Can it skip reproduction when the logs look clear?

No. The skill forbids any fix before the dev and prod reproduction steps ran.

What if the test never fails locally?

It rechecks CI logs for environment differences and loops the test to catch a race.

How do I install the Triage CI Flake skill?

Copy the prompt at the top into your agent. It installs the skill from payloadcms/payload and sets up the habit. Or run npx skills add payloadcms/payload --skill triage-ci-flake.

Is the Triage CI Flake skill free?

Yes. It is published under MIT. Habit is free too.

Triage CI Flake. Now as a habit.

Install the Triage CI Flake skill and make it a habit: follow https://gethabit.dev/skills/payloadcms/triage-ci-flake.md

  • Free
  • No account
  • Undo in one line

All payloadcms skills →More code skills →

Works in

  • Claude Code
  • Codex
  • Cursor
  • ChatGPT
  • Claude app

Made by payloadcms, published under MIT. Habit links to the original and never changes it. Is this your skill?

Copying didn't work here. Select the line and copy it by hand.