detect-flaky-ci

Detect flaky CI test failures in GROWI GitHub Actions runs and track them as labeled issues.

1.5k|244|Updated Feb 16, 2017
One-click install
npx skills add https://github.com/growilabs/growi --skill detect-flaky-ci
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: detect-flaky-ci
Source: https://github.com/growilabs/growi/tree/main/.claude/skills/detect-flaky-ci
Command: npx skills add https://github.com/growilabs/growi --skill detect-flaky-ci

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Flaky tests in CI pipelines waste developer time and erode trust in build results, yet they are hard to distinguish from real regressions. This Skill scans recent GROWI CI runs, identifies non-deterministic test failures, and records them as tracked GitHub issues without ever modifying source code.

Core Features & Use Cases

  • Automated flaky detection: Scans a configurable time window of ci-app.yml and ci-app-prod.yml workflow runs, filtering out infrastructure noise (OOM kills, network errors, disk space) before classifying failures.
  • Three-tier confidence tracking: Labels issues as flaky/observing, flaky/suspected, or flaky/confirmed using mechanical signals like diff/PR mismatch, sandwich patterns, matrix divergence, and setup-hook slowdown analysis.
  • Framework-aware handling: Treats Playwright in-run retries as immediate confirmation while accumulating vitest observations across runs via a configurable threshold.
  • Use Case: Run it on an 8-hour cron schedule to continuously monitor the growilabs/growi repository, automatically creating and updating GitHub issues so the team can prioritize which flaky tests to investigate.

Quick Start

Ask the assistant to run /detect-flaky-ci with default options to scan the last 16 hours of GROWI CI runs and report any flaky test failures as GitHub issues.

Frequently Asked Questions about detect-flaky-ci

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

FAQPage Schema
How do I detect flaky tests in GitHub Actions CI runs?

Run the detect-flaky-ci skill, which scans recent failed workflow runs, fetches failed job logs, filters out infrastructure noise, and matches test failure identities against existing tracking issues. Use --window-hours to control how far back the scan looks.

How does the skill distinguish flaky tests from real regressions?

It uses mechanical signals: diff/PR mismatch, sandwich patterns across runs, matrix divergence on the same commit, and measured cross-file slowdowns for setup-hook timeouts. Playwright in-run retries count as immediate confirmation, while vitest failures accumulate observations across runs.

Does this skill modify source code or open pull requests?

No. It is detection-only and never touches source code, branches, or PRs. Its only outputs are new GitHub issues, comments on existing issues, and label changes on issues it created; fixing is delegated to a separate investigation skill.

What GitHub CLI tools are required to scan CI job logs?

The skill uses the gh CLI with the api and run view subcommands, or the mcp__github__get_job_logs MCP tool in cloud environments where the egress proxy blocks blob storage redirects. The fetch method is probed once per run, not per log.

Why use a time window instead of a fixed run count for scanning?

A fixed run count silently stops covering older failures on high-volume days, dropping them from the scan with no warning. A time window sized to at least twice the cron interval guarantees coverage even if one scheduled run is skipped entirely.

What are the limitations of automated flaky test detection?

The mechanical suspicion signals are not exhaustive, so subtle flakiness still requires passive observation accumulation or human review. Playwright log attribution can also be ambiguous, in which case the skill falls back to a coarser job-level identity rather than fabricating a precise one.