playwright-stability

playwright-stability is a skill for Claude Code from LFTPadilla/agent-dev-kit. It costs 70 tokens per session (684 once invoked), scanned A, original, MIT.

A guide for making Playwright browser tests reliable and closer to real user behaviour. Playwright is a tool for testing websites in a browser, and storageState lets tests reuse a saved signed-in session.

In plain words
What is it for?
Use it to improve locators and assertions, replace sleeps with state checks, reuse authentication, isolate tests, and inspect traces or screenshots when tests fail.
Why use it?
It addresses flaky tests, fixed waits, repeated logins, shared test data, stale development servers, and misleading retries.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the dev-skills plugin — 27 skills, 1 command shipped together

Good fit Use it to improve locators and assertions, replace sleeps with state checks, reuse authentication, isolate tests, and inspect traces or screenshots when tests fail.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lftpadilla/agent-dev-kit/playwright-stability
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.

Any agent
npx skills add LFTPadilla/agent-dev-kit --skill playwright-stability
Clone the repo
git clone --depth 1 https://github.com/LFTPadilla/agent-dev-kit

Made for: Claude Code.

Or install dev-skills, the plugin that ships this one along with the rest of its 27 skills, 1 command.

Wrote 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.

agentmods badge for playwright-stability

README.md
[![agentmods](https://agentmods.dev/badge/skills/lftpadilla/agent-dev-kit/playwright-stability/github.svg)](https://agentmods.dev/skills/lftpadilla/agent-dev-kit/playwright-stability)
Your own site
<a href="https://agentmods.dev/skills/lftpadilla/agent-dev-kit/playwright-stability"><img src="https://agentmods.dev/badge/skills/lftpadilla/agent-dev-kit/playwright-stability/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.

agentmods 80×15 button for playwright-stability

Your own site · 80×15
<a href="https://agentmods.dev/skills/lftpadilla/agent-dev-kit/playwright-stability"><img src="https://agentmods.dev/badge/skills/lftpadilla/agent-dev-kit/playwright-stability.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 684 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00070 $0.00684
Opus 5.5 $0.00028 $0.00274
Sonnet 5.5 $0.00014 $0.00137
Haiku 4.5 $0.00007 $0.00068

Measured 3mo ago against content hash 5f57f0e712b6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

playwright-stability 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 3mo 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.

plugins/dev-skills/skills/playwright-stability/SKILL.md · 51 lines

How it starts

The opening of the file, as written. The whole thing — 51 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Playwright stability & real-user auth

Two jobs: (1) stop flakes, (2) authenticate like a real user without paying the login cost per test. Both raise realism and reliability at once.

Anti-flaky checklist

  1. Locators by role first. getByRole(name) → getByLabel → getByText → getByTestId. CSS/XPath last. Role locators double as an accessibility check.
  2. Web-first assertions only. await expect(locator).toBeVisible() auto-waits. Never waitForTimeout, never assert on a snapshot you grabbed manually.
  3. No manual sleeps. Replace every fixed wait with an assertion on the state you actually need (toHaveURL, toBeEnabled, toHaveText).
  4. Trace on first retry + screenshot on failure. Open the Trace Viewer before editing flaky code — DOM/network/console at each step finds the cause in minutes.
  5. retries: 2 in CI, 0 locally (a local flake is a bug to fix, not retry).
  6. Isolate. Each test sets up its own data; no shared mutable state, no order dependency.
  7. One clean server. Kill stray dev servers and confirm the port is free before a full run — a stale server serves old assets and fakes failures.

Real-user auth via storageState (stop mocking the session)

Mocking auth is the least realistic part of a suite. Instead log in once, save the browser state, and every test starts already authenticated — real tokens, real session, near-zero per-test cost.

See templates/playwright/auth.setup.ts and the config snippet beside it.

  • Run the provider's real login (WorkOS / Cognito / Auth0 / your own form) in a setup project, then context.storageState({ path }).
  • Other projects depend on that setup and load storageState.
  • Keep the state file out of git (it holds live tokens) and regenerate it at the start of each CI run — never commit and reuse across days.
  • MFA / bot-protected SSO: do the login interactively once, persist the state, refresh when it expires. Credentials come from env vars, never hardcoded.

Read the full file on GitHub · 51 lines

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. 3mo ago First seen · 51 lines · 70 tokens per session scan A 5f57f0e712b6

Subscribe to this mod's changes

playwright-stability is a skill published in the GitHub repository LFTPadilla/agent-dev-kit (3 stars, last pushed 21d ago), licensed MIT. It adds 70 tokens to every session and 684 once invoked, about $0.0003 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-08-31.

Related

playwright-stability compared with skills from other repositories

playwright-stability next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
playwright-stabilityLFTPadilla/agent-dev-kitSkill321d agoMITA70Claude Code
dogfoodNousResearch/hermes-agentSkill267ktodayMITA18Claude Code, Codex
langbot-testinglangbot-app/LangBotSkill19ktodayApache-2.0A58Claude Code, Codex
playwright-cliVoltAgent/voltagentSkill11k24d agoMITA52Claude Code
penguin-testing-electronPrism-Shadow/penguin-harnessSkill3.4ktodayApache-2.0A84Claude Code, Codex
playwright-cliUnicomAI/wanwuSkill2.4k6d agoApache-2.0A76Claude Code, Codex
smoke-testSkyvern-AI/skyvernSkill24ktodayAGPL-3.0A50Claude Code, Codex