Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/anhtester/claudecode_playwright_demo/flaky_test_analyzernpx skills add anhtester/ClaudeCode_Playwright_Demo --skill flaky_test_analyzergit clone --depth 1 https://github.com/anhtester/ClaudeCode_Playwright_DemoWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/anhtester/claudecode_playwright_demo/flaky_test_analyzer)<a href="https://agentmods.dev/skills/anhtester/claudecode_playwright_demo/flaky_test_analyzer"><img src="https://agentmods.dev/badge/skills/anhtester/claudecode_playwright_demo/flaky_test_analyzer.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00033 | $0.00650 |
| Opus 5 | $0.00016 | $0.00325 |
| Sonnet 5 | $0.00007 | $0.00130 |
| Haiku 4.5 | $0.00003 | $0.00065 |
Grade A, and why
Flaky Test Analyzer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
100% identical to Flaky Test Analyzer — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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 .agent/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 .agent/rules/selenium_rules.md and .agent/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:
<testName>_<timestamp>@test.com
Stability Checklist
After fixing a flaky test, verify:
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 109 lines · 33 tokens per session scan A 016d1fad79f7
Flaky Test Analyzer is a skill published in the GitHub repository anhtester/ClaudeCode_Playwright_Demo (2 stars, last pushed 3mo ago), licensed MIT. It adds 33 tokens to every session and 650 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to Flaky Test Analyzer, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
playwright-best-practices
Use when writing Playwright tests, fixing flaky tests, debugging failures, implementing Page Object Model, configuring CI/CD, optimizing performance, mocking APIs, handling authentication or OAuth, testing accessibility (axe-core), file uploads/downloads, date/time mocking, WebSockets, geolocation, permissions…
RBT Manual Testing
Skill sinh manual test cases với 2 modes — QUICK (sinh nhanh từ requirements) và FULL RBT (quy trình AI-RBT 6 bước có đánh giá rủi ro). Master skill cho mọi tác vụ manual test case.
Framework Architect
Skill thiết kế và scaffold automation framework hoàn chỉnh cho Playwright, Selenium, và Appium — bao gồm project structure, base classes, config management, reporting, và CI/CD integration.
UI Debug Agent
Skill inspect web/mobile applications bằng browser tools, phân tích DOM elements, xác định locators ổn định, debug UI automation failures, và hỗ trợ sinh Page Object classes.
Test Data Generator
Skill sinh test data có cấu trúc, unique, traceable cho automation tests, bao gồm positive, negative, boundary và edge cases.
skills-requirements-analyzer
Kỹ năng phân tích trang web/module/tài liệu và sinh ra tài liệu Yêu cầu (Requirements Document/User Stories) chuẩn mực — có gán mã REQ ID truy vết được, phát hiện Ambiguity/Risk, kèm ma trận phân quyền và trạng thái.