healing-agent

A Playwright troubleshooting guide for diagnosing failed browser tests by inspecting the live page and its accessible elements. Playwright is a tool for controlling browsers in automated tests.

In plain words
What is it for?
Use it to investigate Playwright failures, inspect the current page, find the correct buttons or fields, update Java test locators, and explain why the revised locator matches the page.
Why use it?
Test pages and selectors can change, so a failure may come from using the wrong element locator rather than from the application itself. Live inspection provides evidence for choosing and validating a replacement locator.

Skill for Claude CodeCodexGemini CLI

Install

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.

agentmods
npx agentmods add skills/tahanima/playwright-java-test-automation-architecture/healing-agent
Any agent
npx skills add Tahanima/playwright-java-test-automation-architecture --skill healing-agent
Clone the repo
git clone --depth 1 https://github.com/Tahanima/playwright-java-test-automation-architecture

Made for: Claude Code, Codex, Gemini CLI.

Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 193 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00023 $0.00193
Opus 5 $0.00012 $0.00097
Sonnet 5 $0.00005 $0.00039
Haiku 4.5 $0.00002 $0.00019

Measured yesterday against content hash 55a3cf1fe0c7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

healing-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 yesterday.

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.

.gemini/skills/healing-agent/SKILL.md · 12 lines

What it actually says

Healing Agent Instructions

When a test fails:

  1. Live Inspection (MANDATORY): Before proposing a fix, use the @playwright tool (specifically playwright_navigate) to visit the page where the failure occurred.
  2. DOM Discovery: Use playwright_click or playwright_screenshot to explore the current state of the UI and identify the correct element based on accessibility roles.
  3. Context Alignment: Load the corresponding Java class from src/main/java/io/github/tahanima/ui/.
  4. Refactor: Apply the "Healing Logic" from locator-healer.md using the data gathered from the live browser.
  5. Validation: Explain why the new locator works based on what you saw in the live DOM.
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. yesterday First seen · 12 lines · 23 tokens per session scan A 55a3cf1fe0c7

Subscribe to this mod's changes

healing-agent is a skill published in the GitHub repository Tahanima/playwright-java-test-automation-architecture (112 stars, last pushed 6mo ago), licensed MIT. It adds 23 tokens to every session and 193 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

test-loop

Use when you need to autonomously iterate through test-fix cycles without human intervention. Use when someone says 'make it work', 'run tests and fix', 'iterate until green', 'take yourself out of the loop', 'fix until tests pass', or when the agent is going in circles on the same problem. Also use when setting up a…

burhankhatri/e2e-testing · 97 tokens

verify-done

Use when about to claim work is complete, fixed, passing, or done — before committing, creating PRs, or moving to the next task. Also use when you're about to say 'Done!', 'All tests pass', 'Ready for review', 'Fixed', or ANY positive statement about work state. If you haven't run the verification command in this…

burhankhatri/e2e-testing · 82 tokens

debug

Use when encountering ANY bug, test failure, unexpected behavior, or error — before proposing fixes. Also use when someone says 'fix this', 'it's broken', 'not working', 'debug', or when a test fails. ESPECIALLY use when under time pressure, when you've already tried a fix that didn't work, or when 'just one quick…

burhankhatri/e2e-testing · 87 tokens

brainstorm-and-plan

Use before ANY creative work — creating features, building components, adding functionality, modifying behavior, or starting a new project. Also use when someone says 'build', 'create', 'add', 'implement', 'let's make', or describes something they want built. Do NOT write code until a design is approved and a plan is…

burhankhatri/e2e-testing · 73 tokens

code-review

Use when a major project step has been completed and needs review against the plan and coding standards. Also use when someone says 'review this', 'check my code', 'is this ready', or when a significant chunk of implementation is done. Use after completing tasks from an implementation plan, before creating PRs, or…

burhankhatri/e2e-testing · 73 tokens

toggle-tdd

Turn the TDD enforcement hooks on or off, or check which they currently are. Use when the user says anything like 'turn off the tests', 'disable the TDD hooks', 'stop checking my tests', 'I don't want this enforced right now', 'turn testing back on', 're-enable the TDD stuff', or asks whether the hooks are currently…

burhankhatri/e2e-testing · 88 tokens