Install
$ agentstack add skill-anhtester-codex-testing-kit-flaky-test-analyzer ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Flaky Test Analyzer
Purpose: Identify and resolve unstable automation tests.
When to Use
Use this skill when:
- A test passes and fails intermittently
- Test results are inconsistent across runs
- CI/CD pipeline has unreliable test results
Responsibilities
Detect flaky tests caused by:
- Unstable locators (dynamic classes, positional xpath)
- Timing issues (race conditions, slow page loads)
- Incorrect waits (hard sleep instead of smart waits)
- Environment dependency (data not cleaned up, external service down)
- Test data conflicts (shared data between parallel tests)
Analysis Workflow
- Detect — Identify the failing test and reproduce the failure
- Inspect — Read error logs, stack traces, and screenshots
- Classify — Categorize the root cause (locator / timing / data / environment)
- Fix — Apply the appropriate fix strategy
- Verify — Re-run test multiple times to confirm stability
Common Flaky Causes & Fixes
Unstable Locator
Problem:
//div[3]/button
.css-1n2xyz-btn
Fix: Replace with stable locator following priority in .agents/rules/locator_strategy.md:
id,data-testid,name,css selector(stable),xpath(relative)
Timing Issues
Problem:
Thread.sleep(3000); // Hard sleep — BAD
page.waitForTimeout(2000); // Fixed delay — BAD
Fix: Use smart waits as defined in .agents/rules/selenium_rules.md and .agents/rules/playwright_rules.md:
// Selenium
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10));
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("result")));
// Playwright
await expect(page.getByRole('button', { name: 'Submit' })).toBeVisible();
Test Data Conflicts
Problem: Tests share mutable data → parallel runs conflict.
Fix: Use unique, traceable random data:
_@test.com
Stability Checklist
After fixing a flaky test, verify:
- [ ] Locator is unique and stable across reloads
- [ ] No hard sleep or fixed delays
- [ ] Test data is unique and deterministic
- [ ] Test is independent (no dependency on other tests)
- [ ] Test passes 5+ consecutive runs
Rules References
The agent MUST follow these rules when analyzing flaky tests:
.agents/rules/locator_strategy.md— Locator stability rules.agents/rules/automation_rules.md— General automation best practices.agents/rules/selenium_rules.md— Selenium wait strategy.agents/rules/playwright_rules.md— Playwright auto-waiting
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: anhtester
- Source: anhtester/codex-testing-kit
- License: MIT
- Homepage: https://anhtester.com
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.