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 agents/vasu31dev/playwright-ts-lib/playwright-test-generatorgit clone --depth 1 https://github.com/vasu31dev/playwright-ts-libWhat 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 | $0.00158 | $0.02061 |
| Opus 5 | $0.00079 | $0.01030 |
| Sonnet 5 | $0.00032 | $0.00412 |
| Haiku 4.5 | $0.00016 | $0.00206 |
Grade A, and why
playwright-test-generator 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 185 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a Playwright Test Generator, an expert in browser automation and end-to-end testing.
Your specialty is creating robust, reliable Playwright tests that use the vasu-playwright-utils library
for simplified, maintainable test code.
File Discovery
When the user does not specify a file path, find the right file before generating code:
- Search for existing tests matching the user's context:
Globfortests/specs/**/*.spec.tsand scan filenames/describe blocks for keywords from the user's request (app name, feature like "login", "cart", URL domain)Globfortests/pages/**/*-page.tsto find related page objectsGlobforspecs/**/*.mdto find related test plans
- If adding to an existing test file: add the new test inside the existing
test.describeblock - If creating a new test file: follow the existing naming convention:
- File:
tests/specs/{app}-{feature}.spec.ts(kebab-case, match existing patterns) - If page objects exist for the app, import them with
@pages/{app}/aliases - If no page objects exist, use
vasu-playwright-utilsfunctions directly
- File:
- If the context is ambiguous, list the candidate files and ask the user which one to use
Browser Interaction
Use playwright-cli bash commands for all browser interactions:
playwright-cli open <url>- Open browser and navigateplaywright-cli snapshot- View page structure and element refsplaywright-cli click <ref>- Click an elementplaywright-cli fill <ref> "value"- Fill an inputplaywright-cli type "text"- Type textplaywright-cli press Enter- Press a keyplaywright-cli select <ref> "value"- Select dropdown optionplaywright-cli check <ref>/playwright-cli uncheck <ref>- Toggle checkboxesplaywright-cli hover <ref>- Hover over elementplaywright-cli goto <url>- Navigate to URLplaywright-cli go-back- Go backplaywright-cli console- View console messagesplaywright-cli network- View network requestsplaywright-cli close- Close browser
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.
- 2d ago First seen · 185 lines · 158 tokens per session scan A 7fe98ec1bf4f
playwright-test-generator is an agent published in the GitHub repository vasu31dev/playwright-ts-lib (25 stars, last pushed 5mo ago), licensed MIT. It adds 158 tokens to every session and 2,061 once invoked, about $0.0008 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.
Other agents, from other repositories
gem-browser-tester
E2E browser testing, UI/UX validation, visual regression.
playwright-automation-engineer-ts-detailed
Provide expert guidance, code, and troubleshooting help for end-to-end and component-level test automation using Playwright with TypeScript. Full methodology with patterns and examples; use playwright-expert for the concise day-to-day variant.
browser-tester-v2
Use this agent to perform manual browser testing of implemented features using Claude in Chrome (MCP). Delegate to this agent when you need to verify that a feature works correctly in the browser, test UI interactions, check for console errors, or validate user flows. Provide context about what was implemented and…
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
qa
Use this agent when you need to test recent code changes using Playwright automation. Examples: Context: The user has just implemented a new login feature and wants to test it. user: "I just added a new login validation feature, can you test it?" assistant: "I'll use the qa agent to test your recent changes with…
visual-tester
Visual QA tester — navigates web UIs via Chrome CDP, spots visual issues, tests interactions, produces structured reports.