Saltar al contenido
Skillsify
Volver al registro
Testingv1.1.0963 instalaciones

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.

EsquemaAnálisisTrigger

Instalación

npx skillsify add flaky-test-hunter

Los tests inestables suelen "arreglarse" ocultándolos — un sleep aquí, un retry allá — cambiando un pipeline en rojo por uno lento que ya no dice la verdad. Esta skill lo prohíbe: obliga al agente a medir primero la tasa de fallo, clasificar la inestabilidad según una taxonomía, forzar una reproducción determinista y solo entonces corregir la causa, terminando con la tasa de fallo remedida como prueba.

Informe de calidad

Debería activarse

  • 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

No debería activarse

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

Archivos

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 relacionadas

RendimientoVerificada

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.

1284 instalaciones · v1.2.0

SeguridadVerificada

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 instalaciones · v1.0.3

RefactorizaciónVerificada

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 instalaciones · v1.1.1