AGENT SKILL

flaky-triage

WAY 13 — find flaky tests across recent runs and quarantine them so they stop producing false bug reports. Use when the user says "flaky", "find flaky tests", "triage flaky", "quarantine", or after repeated unexplained failures.

License 许可
MIT
最近更新
2026-11-06
Stars
★ 5
Forks
4

01 前言 Front Matter

name
flaky-triage
description
WAY 13 — find flaky tests across recent runs and quarantine them so they stop producing false bug reports. Use when the user says "flaky", "find flaky tests", "triage flaky", "quarantine", or after repeated unexplained failures.

02 资源文件 52

03 SKILL.md 正文

WAY 13 — Flaky Test Triage

Phase 1: Aggregate

From the directory containing playwright.config.ts (normally qa-artifacts/):

node "${CLAUDE_PLUGIN_ROOT}/.claude/skills/flaky-triage/flaky.mjs" runs <window=10> .

The script reads the last N runs/*/results.json and prints, per scenario: its outcome history, flips, flip rate, a verdict (flaky | consistent-fail | stable-pass | insufficient-data), changedDuringWindow (the .feature/.steps.ts changed after the window started), and unquarantine (a quarantined test with 10 straight passes). Outcomes that say nothing about stability are excluded from the counts: no-baseline (first visual run) and network.

If there are fewer than 3 runs, say so and suggest scheduling e2e-session runs (or ci-test-setup) first.

Phase 2: Judge (don't just trust the flip rate)

For each flaky scenario, read the error messages in its history:

  • Same error each time it fails (timing, a race, animation) → real flakiness. Propose quarantine
  • Different errors → the app or data was changing between runs, not flakiness. Leave it alone
  • changedDuringWindow: true → the flips may be your own edits. Re-run triage after a few stable runs
  • consistent-fail isn't flaky. It's a real failure: point to e2e-session/bug-report

Phase 3: Quarantine (with the user's approval, per test)

  1. Add @quarantine to the scenario's tag line in its .feature (keep the watermark header)
  2. File an issue labeled flaky-test (issue.create) with the history table, the suspected cause, and a fix suggestion (a wait-for condition instead of a timeout, test data isolation, disabling animations). This is a test issue, not a product bug
  3. Quarantined tests keep running. Callers just don't file bugs for them (quarantined: true in results), so triage can see when they stabilize

Unquarantine: for every unquarantine: true scenario, propose removing the tag and closing its flaky-test issue.

Phase 4: Report

Save ./qa-artifacts/sessions/flaky-<YYYY-MM-DD>.md (with the watermark footer): a table of scenario · history · flip rate · verdict · action, plus the totals.

04 同仓库更多 Skills

GhassenAZZOUZ
GhassenAZZOUZ/claude-qa-agent

write-tests

WAY 4 — write test cases only, no execution. Use when the user says "write it", "write tests", "generate test cases" — an approved test plan (`Plan:`), or requirements (text or a tracker issue) planned and approved first, optional App/Spec/MR or PR → exactly the planned test files.

★ 5
GhassenAZZOUZ
GhassenAZZOUZ/claude-qa-agent

verify-fix

WAY 9 — verify that a bug is fixed by running its regression test. Use when the user says "verify it", "verify fix", "is #142 fixed", "check the fix" with one or more bug refs (#142, SHOP-142), or "verify all" for every open bug that has a regression test.

★ 5
GhassenAZZOUZ
GhassenAZZOUZ/claude-qa-agent

user-story-format

Reference only — the single definition of this project's user-story body (story, Gherkin ACs, Missing Information, DoD) and its AC/scenario rules. Read by user-story-enhancer (WAY 6) and benchmark-gap-story-writer (WAY 8) so stories they write stay identical in shape and WAY 6 can re-score WAY 8's output. Not a workflow on its own.

★ 5
GhassenAZZOUZ
GhassenAZZOUZ/claude-qa-agent

tracker

Provider-neutral contract for every issue-tracker and code-host action (create/update/comment/close issues, attach files, comment on MRs/PRs, read CI runs and logs) plus label conventions and failure handling. Every WAY calls these operations; the matching provider-* skill says how to perform them on GitLab, GitHub, Jira, Azure DevOps, or Bitbucket.

★ 5
GhassenAZZOUZ
GhassenAZZOUZ/claude-qa-agent

traceability

WAY 14 — requirements traceability matrix for a user story (each acceptance criterion) or a test folder written from plain text (each R-NN requirement) → the tests covering it → their latest result → open bugs. Use when the user says "trace it", "traceability", "is #148 covered", "coverage of SHOP-148", "trace it <folder>".

★ 5
GhassenAZZOUZ
GhassenAZZOUZ/claude-qa-agent

test-plan

WAY 19 — design a test plan before any test code. Use when the user says "plan it", "plan tests", "test plan", "design tests" with requirements (text or a tracker issue), optional App/Spec/MR or PR. Output is the test plan (scope, levels, one row per Test#<nn> with category, tags, covers, priority, coverage, entry/exit criteria, risks), reviewed by `review-plan` (WAY 20), filed for approval; `write it Plan:` / `e2e it Plan:` then write exactly that plan. Also holds the plan format every other WAY reads.

★ 5