Aller au contenu
Skillsify
Retour au registre
Testsv1.1.0963 installations

flaky-test-hunter

Finds and diagnoses flaky tests in a test suite. Use when tests pass locally but fail in CI, when a suite fails intermittently, or when the user asks to stabilise or de-flake their tests.

SchémaAnalyseTrigger

Installation

npx skillsify add flaky-test-hunter

On « corrige » souvent les tests instables en les masquant — un sleep ici, un retry là — échangeant un pipeline rouge contre un pipeline lent qui ne dit plus la vérité. Cette skill l'interdit : elle impose à l'agent de mesurer d'abord le taux d'échec, de classer l'instabilité selon une taxonomie, de forcer une reproduction déterministe, puis seulement de corriger la cause, en terminant par un taux d'échec remesuré comme preuve.

Rapport de qualité

Devrait se déclencher

  • This test fails maybe one run in five, can you look?
  • CI is red again but it passes on my machine
  • Help me de-flake the e2e suite
  • Our pipeline keeps needing reruns to go green

Ne devrait pas se déclencher

  • Write a new unit test for this function
  • Deploy the app to production

Fichiers

SKILL.md
---
name: flaky-test-hunter
description: Finds and diagnoses flaky tests in a test suite. Use when tests pass locally but fail in CI, when a suite fails intermittently, or when the user asks to stabilise or de-flake their tests.
---

# Flaky test hunter

## When to use this
Tests pass locally but fail in CI, a suite fails intermittently, or the user
asks to stabilise their tests.

## Procedure
1. Establish the failure rate before changing anything. Run the suspect test in
   a loop and record how many runs in how many fail.
2. Classify the flake against [references/flake-taxonomy.md](references/flake-taxonomy.md).
3. Prove the cause by making the flake deterministic — force the ordering, freeze
   the clock, or pin the seed so the test fails every time.
4. Fix the cause, not the symptom.
5. Re-run the loop and show the new failure rate.

## Rules
- **Never** fix a flake by adding a sleep, a retry, or increasing a timeout.
  Those hide the defect and slow the suite permanently.
- A fix is not proven until the loop that used to fail passes repeatedly.
- If the flake is in the code under test rather than the test, say so plainly.
references/flake-taxonomy.md
# Flake taxonomy

| Class | Signature | Typical fix |
| --- | --- | --- |
| Order dependence | Fails only when run after another test | Reset shared state in a hook |
| Real time | Fails near midnight, month end, or on slow CI | Inject and freeze the clock |
| Async leak | Assertion runs before the effect settles | Await the actual condition, not a timeout |
| Shared fixture | Parallel workers mutate one record | Namespace fixtures per worker |
| Network | Depends on a live third party | Record and replay, or stub at the boundary |
| Randomness | Unseeded random input | Pin the seed and log it on failure |

Skills associées

PerformanceVérifiée

core-web-vitals-audit

Audits a web application for Core Web Vitals regressions. Use when the user asks to check LCP, INP or CLS, investigate a Lighthouse score drop, or review front-end performance before a release.

1 284 installations · v1.2.0

SécuritéVérifiée

dependency-risk-review

Reviews third-party dependencies for supply-chain and licence risk. Use when the user asks to audit dependencies, evaluate whether to add a package, review a lockfile diff, or check licence compatibility.

741 installations · v1.0.3

RefactorisationVérifiée

rtl-layout-audit

Audits a web interface for right-to-left layout correctness in Arabic, Hebrew, Persian or Urdu. Use when adding an RTL locale, when the user reports mirrored or broken Arabic layout, or before shipping a bilingual interface.

688 installations · v1.1.1