flaky-test

Diagnose and repair flaky Rails tests with repeated verification runs.

1|1|Updated Feb 9, 2026
One-click install
npx skills add https://github.com/przbadu/skills-factory --skill flaky-test
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flaky-test
Source: https://github.com/przbadu/skills-factory/tree/main/skills/flaky-test
Command: npx skills add https://github.com/przbadu/skills-factory --skill flaky-test

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill removes the time sink of diagnosing intermittent test failures and slow test suites in Rails projects, helping teams restore confidence in CI and shipping velocity.

Core Features & Use Cases

  • Flaky Test Repair: Detects common nondeterministic failures such as timezone issues, hardcoded IDs, order dependence, and stale mocks.
  • Test Performance Optimization: Profiles slow specs, reduces expensive setup, and improves suite runtime without changing test intent.
  • Suite Cleanup and Auditing: Finds duplicated, outdated, or inefficient tests and produces a structured cleanup plan before making destructive changes.
  • End-to-End Automation: Works through isolated worktrees, verifies fixes repeatedly, creates PRs, and can keep watching CI until the result is known.
  • Use Case: A Rails team can point it at a failing spec file or an entire CI failure summary, then have it identify the root cause, patch the test, validate it multiple times, and open a PR.

Quick Start

Ask the skill to fix flaky tests in the target Rails spec file or to run a full audit of the test suite and report the best repairs.

Frequently Asked Questions about flaky-test

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

FAQPage Schema
How do I fix flaky Rails tests that fail intermittently in CI?

Fix flaky Rails tests by isolating intermittent failures caused by timezone issues, hardcoded IDs, order dependence, or stale mocks, then applying targeted test repairs and running repeated verifications to confirm stability.

What is the best way to speed up slow RSpec and Minitest suites?

Speed up slow RSpec and Minitest suites by profiling test performance, reducing expensive setup blocks, and optimizing suite runtime without changing the original test intent or assertions.

Does this flaky test repair process require the GitHub CLI to open pull requests?

Yes, the flaky test repair process requires the GitHub CLI dependency to automate end-to-end workflows, including creating isolated worktrees, pushing patches, opening pull requests, and monitoring CI results.

Can I audit an entire Rails test suite to find duplicated or outdated tests?

Yes, you can audit an entire Rails test suite to find duplicated, outdated, or inefficient tests, which generates a structured cleanup plan for approval before any destructive deletions are executed.

Why does a flaky test fix require isolated worktree execution?

Isolated worktree execution is required to safely isolate intermittent test failures and apply targeted repairs without disrupting your main branch, ensuring repeated verification runs validate the fix before PR creation.