Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 more

    Flaky Test & CI Failure Doctor

    1

    Diagnose and fix flaky tests and CI pipeline failures with evidence-based root cause analysis and reproduction steps.

    $10

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Flaky Test & CI Failure Doctor

    Flaky Test & CI Failure Doctor

    Example session with this skill installed

    My CI build just failed with exit code 137 in the 'E2E Tests' step. It passes sometimes but failed twice today on the main branch. Here is the tail of the log.

    • Read your context and instructions
    • Compiled the flaky test

    The build failure has been analyzed. The exit code 137 indicates the process was terminated by a SIGKILL, typically triggered by the system OOM (Out of Memory) killer when the runner exceeds its resource limits.

    Diagnosis

    Verdict: Infrastructure / Resource Limit
    Confidence: High: Exit code 137 is a definitive signal for SIGKILL, and the logs show memory usage spiking during the E2E suite execution.
    Failing unit: E2E Tests step (Playwright)

    Evidence

    • Process exited with code 137 (line 452)
    • [System] Out of memory: Kill process 1284 (node) score 850 or sacrifice child (dmesg snippet)
    • Failure occurs during parallel execution of 8 workers on a standard 2-core runner.

    Root cause

    Resource exhaustion. The Playwright runner is spawning 8 browser instances on a machine with only 7GB of RAM. The memory footprint grows as tests navigate complex pages until the kernel kills the process to protect the system.

    Confirm it

    Run the suite with limited concurrency to see if it stabilizes:

    npx playwright test --workers=1
    

    Alternatively, monitor memory during a local run:

    docker run --memory=4g my-test-image npx playwright test --workers=8
    

    Fix

    Reduce the worker count in your CI configuration to match the runner's capacity.

    // playwright.config.ts
    export default defineConfig({
    -  workers: process.env.CI ? 8 : undefined,
    +  workers: process.env.CI ? 2 : undefined,
       use: {
         trace: 'on-first-retry',
       },
    });
    

    This prevents the runner from over-allocating memory while still allowing some parallelism.

    If you must unblock now

    Reduce workers to 1 in the CI YAML file immediately to ensure completion at the cost of speed.

    Prevent recurrence

    • Add show-reports on failure to capture traces.
    • Implement memory usage monitoring in the CI pipeline.
    • Upgrade to a larger runner instance if suite execution time becomes a bottleneck at lower worker counts.

    Next steps

    1. Apply the worker count reduction in playwright.config.ts.
    2. Monitor the next three runs to ensure the 137 error does not recur.
    3. Check if any specific test is leaking memory by reviewing Playwright traces.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Stop wasting hours debugging "random" CI failures that pass on your local machine. This skill acts as a senior reliability engineer to identify why your builds are turning red, distinguishing between genuine regressions, flaky tests, and infrastructure instability. It moves past guesswork by analyzing logs for the first sign of trouble rather than the final crash.

    What it does

    • Classifies failures by determining if a crash is a deterministic regression, environment drift, or test-level flakiness.
    • Identifies root causes across categories like race conditions, shared state, timing issues, and resource exhaustion.
    • Generates reproduction plans with specific commands for frameworks like Pytest, Jest, Playwright, and Go to make rare failures frequent.
    • Delivers minimal fixes via code diffs that solve the underlying non-determinism instead of using blind sleep statements.
    • Plans safe mitigations by providing quarantine strategies and tracking requirements to unblock pipelines without losing sight of the bug.

    How it works

    1. Intake analysis of your CI logs, stack traces, and environment configuration.
    2. Evidence mapping to find the earliest anomaly and cross-reference it against recent commit history.
    3. Verdict delivery where the agent provides a confidence-rated diagnosis and a specific fix.

    Frameworks & tools

    Works with GitHub Actions, GitLab CI, Jenkins, and CircleCI. Supports major testing stacks including Pytest, Jest, Vitest, RSpec, JUnit, Playwright, Cypress, and Go.

    Why this beats prompting it yourself

    Generic prompts often suggest masking flakiness with retries or sleeps. This skill follows a rigorous diagnostic workflow that prioritizes evidence over opinion and targets the first error in the cascade, preventing you from chasing red herrings in noisy logs.

    Use cases

    • Diagnosing a test that passes locally but fails intermittently in GitHub Actions.
    • Finding the specific shared state causing failures only when tests run in parallel.
    • Debugging SIGKILL (137) errors and resource contention on shared CI runners.
    • Fixing "element not clickable" errors in E2E suites by identifying unstable selectors.

    Known limitations

    Requires actual log output or error messages to be effective. Cannot diagnose failures caused by private internal infrastructure that is not described in logs or config files.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scanned

    Verified clean 15 days ago

    • Passed all security checks, Safe to install

    Requires

    playwright
    Node.js
    jest

    Listed15 days ago
    Updated7 days ago

    What's inside

    Frequently Asked Questions