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 skills add LambdaTest/agent-skills --skill playwright-patterns-skillgit clone --depth 1 https://github.com/LambdaTest/agent-skillsWrote 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/lambdatest/agent-skills/playwright-patterns-skill)<a href="https://agentmods.dev/skills/lambdatest/agent-skills/playwright-patterns-skill"><img src="https://agentmods.dev/badge/skills/lambdatest/agent-skills/playwright-patterns-skill/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/lambdatest/agent-skills/playwright-patterns-skill"><img src="https://agentmods.dev/badge/skills/lambdatest/agent-skills/playwright-patterns-skill.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.00116 | $0.02061 |
| Opus 5.5 | $0.00046 | $0.00824 |
| Sonnet 5.5 | $0.00023 | $0.00412 |
| Haiku 4.5 | $0.00012 | $0.00206 |
Grade A, and why
playwright-patterns-skill 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 16d 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 — 167 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Playwright patterns
Apply these when you write or review Playwright code. They are ordered by how often they cause real failures.
Before you write anything
- Read
playwright.config.*and two existing specs. Match the project's fixtures, base URL, folder layout and naming. - Check the installed version in
package.json. Do not use an API newer than that version. - Find out how the suite authenticates (global setup,
storageState, a fixture). Reuse it.
Locators
Pick the first option that works, in this order:
getByRole('button', { name: 'Checkout' })and other role locatorsgetByLabel,getByPlaceholder,getByTextfor what the user can readgetByTestId('cart-total')when the visible text is unstable or translated- CSS as a last resort, scoped to a stable container
Rules:
- No XPath that walks the DOM (
//div[3]/span[2]), no generated class names (.css-1x2y3z), nonth()on a list whose order can change. - Narrow with
filter({ hasText })or chain from a parent locator instead of writing a longer selector. - A locator that matches two elements is a bug. Keep strict mode on and fix the locator; do not reach for
.first()to silence it. - Store locators, not element handles.
page.$()andElementHandlego stale.
Waiting and assertions
- Use web-first assertions.
await expect(locator).toBeVisible()retries until the timeout.expect(await locator.isVisible()).toBe(true)checks once and flakes. - Never use
page.waitForTimeout()in a test. Wait for the thing the user would wait for: an element, a URL, a response. - Avoid
waitForLoadState('networkidle'). Analytics and polling keep the network busy. Assert on the element that proves the page is ready. - Wait for a specific response when the UI depends on it. Start the wait before the action:
const saved = page.waitForResponse(r => r.url().includes('/api/cart') && r.ok());
await page.getByRole('button', { name: 'Add to cart' }).click();
await saved;
await expect(page.getByTestId('cart-count')).toHaveText('1');
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.
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.
- 16d ago First seen · 167 lines · 116 tokens per session scan A bb7db3384866
playwright-patterns-skill is a skill published in the GitHub repository LambdaTest/agent-skills (401 stars, last pushed 16d ago), licensed MIT. It adds 116 tokens to every session and 2,061 once invoked, about $0.0005 per session on Opus 5.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-11-18.
playwright-patterns-skill compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| playwright-patterns-skillLambdaTest/agent-skills | Skill | 401 | 16d ago | MIT | A | 116 | Claude Code, Codex |
| cua-driverdavidondrej/skills | Skill | 4.4k | yesterday | MIT | A | 68 | Claude Code, Codex |
| webapp-testinganthropics/skills | Skill | 204k | today | none | A | 35 | Claude Code |
| codex-computer-usedavidondrej/skills | Skill | 4.4k | yesterday | MIT | A | 53 | Claude Code, Codex |
| test-electron-appPostHog/posthog-foss | Skill | 736 | today | MIT | A | 112 | Claude Code |
| smoke-testSkyvern-AI/skyvern | Skill | 24k | today | AGPL-3.0 | A | 50 | Claude Code, Codex |
| playwright-clitestdino-hq/playwright-skill | Skill | 429 | 8d ago | MIT | A | 64 | Claude Code, Codex |