AI Test Agent Playwright — Testing skill for Claude Code
I layer on Playwright (JavaScript): a Writer Agent that writes tests from plain English and a Healer Agent that fixes broken locators.
How to install AI Test Agent Playwright
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open karthikraj22302/AI-Test-Agent-Playwright and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What AI Test Agent Playwright does
I layer on Playwright (JavaScript): a Writer Agent that writes tests from plain English and a Healer Agent that fixes broken locators. Positive and negative cases. Works with Groq, OpenRouter, Ollama or Claude.
Alternatives in Testing
- Jsbeeb — by mattgodbolt - Provides development guide for JavaScript BBC Micro emulator with build and testing instructi 382 ★
- GAAI Framework — 95+ Drop-in governance layer (.gaai/ folder) -- backlog authorization, cross-session memory, decision tracking 113 ★
- Asktube — AskTube - An AI-powered YouTube video summarizer and QA assistant powered by Retrieval Augmented Generation (R 87 ★
README
GEN AI AGENT for Playwright (Writer Agent + Healer Agent)
An AI layer on top of Playwright (JavaScript) that **reads a web page, writes the test script for you, and automatically repairs broken locators**. Positive and negative test cases are both supported. Free LLMs (Groq, OpenRouter, Ollama) work, and Claude/OpenAI are optional.
1. What this project does
| Agent | Job |
|---|---|
| Writer agent | You give a one-line instruction. It opens the page, reads the elements, makes a plan, performs the steps, verifies the result, and saves a normal Playwright spec in tests/generated/. |
| Healer agent | When a locator breaks (a button is renamed, an id changes), it finds the new element and continues the test, instead of failing. |
Both agents live in one folder: `ai-agent/`.
2. Technology used
| Item | Details |
|---|---|
| Language | JavaScript (Node.js, CommonJS modules) |
| Test framework | Playwright Test (@playwright/test) |
| Runtime | Node.js 18 or higher (built with Node 22) |
| LLM access | Plain HTTP calls with Node fetch; no extra AI libraries |
| LLM providers | Groq, OpenRouter, Ollama (free); Anthropic Claude, OpenAI (optional) |
| Editor | VS Code |
| OS | Ubuntu / Linux (also works on Windows and macOS) |
3. Methods and techniques used
**Writer agent pipeline**
- Observe: take a snapshot of the page DOM. Each visible element gets a temporary
data-ai-id. - Plan: the LLM returns a JSON list of steps. If no LLM is available, an offline rule-based planner (
heuristic-plan.js) builds the plan. - Resolve: each element id is converted to a stable locator (role, label, placeholder, text, id, name).
- Execute: the steps run with the healer active.
- Verify: it reads the page for the success text (positive test) or for rejection evidence (negative test).
- Emit: it writes a plain Playwright spec to
tests/generated/that runs later with no AI. - Cache: the plan is saved in `ai-ag
Related Skills
Try
Manually test the latest change with one positive and one negative case. Goal is speed — shortest path to conf
Skills Test
Test skills against representative scenarios (positive, negative, ambiguous, incomplete-input, failure) — chec
Prompt Regression
Snapshot & regression testing for LLM prompts in CI: YAML cases, pytest plugin + CLI, exact/regex/JSON-Schema/
Pantheon Feynman Clarity
Run the Feynman Clarity Test — stop all tools, explain the system in plain English until the gap surfaces, fix
Draft Filter
Draft, test, and optionally save a FeedSheriff filter from a plain-English description.
Claude Codex Plain Handoff Skill
A Claude Code and Codex skill that ends every AI task with a short, plain English summary: surprises first, ho
Related Agents
ZeroClaw Android
Run AI agents 24/7 on your Android phone. Native Rust core, 25+ providers (OpenAI, Claude, Gemini, Groq, DeepS
News Sentiment Analyst
Specialized agent for news sentiment analysis of B3 stocks. Scores sentiment from -5 to +5, identifies positiv
Salesforce Test Engineer
Identifies required test cases before implementation and writes/updates Apex test classes (positive, negative,