Borrowing it
Nothing to install: this file belongs to anhtester/claude-testing-kit. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/anhtester/claude-testing-kit/main/.claude/skills/skills-locator-healer-agent/SKILL.mdgit clone --depth 1 https://github.com/anhtester/claude-testing-kitWrote 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/claude-testing-kit/skills-locator-healer-agent)<a href="https://agentmods.dev/skills/anhtester/claude-testing-kit/skills-locator-healer-agent"><img src="https://agentmods.dev/badge/skills/anhtester/claude-testing-kit/skills-locator-healer-agent/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/anhtester/claude-testing-kit/skills-locator-healer-agent"><img src="https://agentmods.dev/badge/skills/anhtester/claude-testing-kit/skills-locator-healer-agent.svg" alt="Reviewed on agentmods" width="80" 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.00029 | $0.00833 |
| Opus 5 | $0.00015 | $0.00417 |
| Sonnet 5 | $0.00006 | $0.00167 |
| Haiku 4.5 | $0.00003 | $0.00083 |
Grade A, and why
skills-locator-healer-agent 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 10d 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
86% identical to Locator Healer Agent — 17 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 — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Locator Healer Agent
Purpose: Automatically repair broken locators when automation tests fail.
When to Use
Use this skill when:
- A test fails with "element not found" or "element detached" errors
- UI has changed and existing locators no longer work
- After a frontend deployment that modifies DOM structure
Hai Kiểu Kích Hoạt
| Kiểu | Trigger | Input | Đường vào |
|---|---|---|---|
| Reactive — chữa theo lỗi | Test fail với ElementNotFound / strict mode violation |
Error log + stack trace | /analyze_flaky_tests |
| Proactive — rà cả loạt | UI vừa đổi, chưa chạy test cũng rà được | Page Object + URL | Yêu cầu trực tiếp từ user |
Kiểu proactive không có error log để lần theo — phải trích toàn bộ locator từ Page Object, mở browser đưa về đúng trạng thái chứa element, rồi đối chiếu từng cái. Bắt được cả locator mong manh (còn chạy nhưng bám thuộc tính dễ đổi) lẫn locator sai element (match 1 element nhưng không phải element cần — test vẫn xanh mà thao tác nhầm chỗ).
Responsibilities
When a locator fails:
- Inspect current DOM or UI hierarchy
- Compare old locator with current page structure
- Identify updated attributes
- Generate a replacement locator
- Re-run test to verify the fix
Detection Strategy
Locator is considered broken when:
- Element not found (NoSuchElementException / TimeoutError)
- Element detached from DOM
- Selector matches zero elements
- Selector matches wrong element (different text/position)
Healing Workflow
Step 1: Analyze the Error
- Read error log to identify which locator failed
- Identify the Page Object file and line number
Step 2: Inspect Current DOM
- Open the page using MCP tools
- Navigate to the same state as the failing test
- Inspect the target area in DOM
Step 3: Find Alternative Locator
Try the following in priority order:
- Accessibility attributes (
aria-label,role) data-testid/data-testid(if stable, not auto-generated)- Semantic locator (Playwright
getByRole,getByLabel) css selector(stable attributes)xpath(relative, not positional)
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.
- 10d ago First seen · 110 lines · 29 tokens per session scan A f91d9f81f448
skills-locator-healer-agent is a skill published in the GitHub repository anhtester/claude-testing-kit (53 stars, last pushed 1mo ago), licensed MIT. It adds 29 tokens to every session and 833 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to Locator Healer Agent, differing in 17 lines, and is treated as a copy.
Other skills, from other repositories
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.
Smart Locator Agent
Skill sinh locator ổn định và dễ bảo trì cho UI automation, hỗ trợ Playwright, Selenium và Appium.
QA Automation Engineer
Skill hỗ trợ agent thực hiện các tác vụ QA automation testing bao gồm generate test cases, automation scripts, API tests, locators, phân tích flaky tests, và tạo test data.
Locator Healer Agent
Skill tự động phát hiện và sửa chữa locators bị hỏng khi automation tests fail do thay đổi DOM.
web-test
A browser-automation tool for testing the 1C:Enterprise web client. It uses Playwright to navigate sections, fill forms, read tables and reports, and perform user actions in a browser.
Katalon Studio Testing
Comprehensive testing patterns for Katalon Studio including codeless record-and-playback, Groovy scripted testing, custom keywords, data-driven testing, cross-browser execution, and CI/CD integration with Katalon TestOps.