diagnose-flaky

Diagnose flaky server tests with a step-by-step guide and automated reruns.

Updated Apr 28, 2025
One-click install
npx skills add https://github.com/briankeane/node-react-scaffold --skill diagnose-flaky
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diagnose-flaky
Source: https://github.com/briankeane/node-react-scaffold/tree/main/.claude/skills/diagnose-flaky
Command: npx skills add https://github.com/briankeane/node-react-scaffold --skill diagnose-flaky

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a structured approach to identify the root causes of and resolve intermittent failures in server-side tests, ensuring greater test suite stability.

Core Features & Use Cases

  • Reproduce Failures: Utilizes a script to repeatedly run specific tests until they fail, aiding in capturing the failure state.
  • Debug Logging: Guides on adding targeted logging to pinpoint issues during test execution.
  • Common Cause Identification: Outlines frequent reasons for flaky tests, such as timezone issues, race conditions, and database state pollution.
  • Fix Verification: Ensures that implemented solutions resolve the flakiness by running tests multiple times.
  • Use Case: When your CI pipeline occasionally fails due to a test that passes most of the time, this Skill helps you systematically debug and fix it.

Quick Start

Use the diagnose-flaky skill to run the test named 'user authentication flow' 100 times to find its failure pattern.

Frequently Asked Questions about diagnose-flaky

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug flaky server tests that fail intermittently in CI?

To debug flaky server tests, you need a structured procedure to reproduce intermittent failures, add targeted debug logging, and identify common causes like race conditions or timezone issues. This approach systematically isolates the failure state.

What causes flaky tests in asynchronous server environments?

Flaky tests in asynchronous environments are frequently caused by race conditions, timezone issues, and database state pollution. Identifying these specific common pitfalls is essential for stabilizing intermittent test failures.

How can I reproduce an intermittent test failure on demand?

You can reproduce an intermittent test failure by running a script that repeatedly executes the specific test until it fails. Running the test multiple times aids in capturing the exact failure state needed for diagnosis.

What is the best way to verify a fix for an unreliable test?

The best way to verify a fix for an unreliable test is by running the test multiple times to ensure the flakiness is resolved. Repeated execution confirms the implemented solution stabilizes the test suite.

How do I add debug logging to pinpoint issues during test execution?

Adding targeted debug logging during test execution helps pinpoint issues by capturing intermediate states and variable values. This guided logging is crucial for diagnosing failures that only appear under specific timing or data conditions.