CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

playwright-best-practices

Provides Playwright test patterns for resilient locators, Page Object Models, fixtures, web-first assertions, and network mocking. Must use when writing or modifying Playwright tests (.spec.ts, .test.ts files with @playwright/test imports).

1.36x
Quality

85%

Does it follow best practices?

Impact

100%

1.36x

Average score across 3 eval scenarios

SecuritybySnyk

—

The risk profile of this skill

SKILL.md
Quality
Evals
Security

Quality

Content

75%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

The body is a highly actionable, well-organized pattern reference: executable code with BAD/GOOD contrasts covers every capability the description advertises, and the locator-priority and agent-context reporter guidance is genuinely additive. Its main weakness is token efficiency — repeated reporter guidance, a checklist that duplicates the anti-patterns, and re-teaching of standard Playwright API material — plus deep-dive content that would fit better in one-level-deep reference files.

Suggestions

Consolidate the minimal-reporter guidance, which currently appears in four places (CLI Context, Configuration, Anti-Patterns, Checklist), into a single mention, and merge the Checklist into the Anti-Patterns section since the two lists duplicate each other.

Trim sections that restate standard Playwright knowledge Claude already has — the full web-first assertion API listing and the boilerplate playwright.config.ts — down to the opinionated deltas (locator priority order, BAD/GOOD contrasts, agent-context reporter advice).

Move the deep-dive material (full BasePage/LoginPage class implementations, the fixtures variants, the complete config) into one-level-deep reference files such as references/page-objects.md and references/fixtures.md, leaving SKILL.md as a lean overview that links to them.

DimensionReasoningScore

Conciseness

The minimal-reporter guidance is repeated in four places ("always use minimal reporters to prevent verbose output" in the CLI section, the config comment "Use minimal reporter in CI/agent contexts", the Anti-Patterns entry, and the Checklist), and the Checklist largely duplicates the Anti-Patterns list (e.g., "No page.waitForTimeout() - use auto-waiting" vs "page.waitForTimeout(ms) - use auto-waiting locators instead"). Sections also restate standard Playwright knowledge (the full web-first assertion API list, a boilerplate 45-line playwright.config.ts), so the body could be meaningfully tightened — matching anchor 3 rather than 4, where trimming would only be minor.

3 / 5

Actionability

Nearly every section delivers copy-paste-ready, executable TypeScript and shell commands — "page.getByRole('button', { name: 'Submit' })", complete BasePage/LoginPage classes, fixture definitions with worker/auto scopes, auth setup with storageState, network mocking via page.route, and "npx playwright test --reporter=line" — and the examples cover the common cases the description promises. The few omissions (unmentioned `debug` npm dependency, an unshown DashboardPage import) are trivially resolvable, so it holds anchor 5 over 4.

5 / 5

Workflow Clarity

Sections are logically sequenced (locators → assertions → POM → fixtures → auth → mocking → isolation → config → debugging) with explicit checkpoints in the closing Checklist ("Locators use role/label/testid, not CSS classes or XPath") and in-code validation patterns (safeClick guards "await expect(locator).toBeVisible({ timeout: this.timeout })" / toBeEnabled before clicking, plus the isLoaded() abstraction). It is not 5 because the debugging commands are listed without an integrated failure-recovery sequence (no "when a test fails, run X then re-check Y" loop).

4 / 5

Progressive Disclosure

The single file is well organized with clear headers and subsections ("## Locator Priority", "### Worker-Scoped Fixtures", "### Automatic Fixtures") and contains no nested references — appropriate given no bundle files exist. It is not 5 because at ~490 lines, substantial deep-dive material (two full POM class implementations, three fixture variants, the full config) is inlined where one-level-deep reference files would keep SKILL.md a leaner overview; it is not 3 because nothing is buried and structure is good.

4 / 5

Total

16

/

20

Passed

Description

87%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

The description is strong: it uses third person, names five concrete capability areas, and pairs them with an explicit "Must use when" trigger clause that includes file extensions and the package import. The only weaknesses are minor — a few natural synonyms (e2e, end-to-end) are absent and the capability list omits some areas the body covers.

DimensionReasoningScore

Specificity

"Provides Playwright test patterns for resilient locators, Page Object Models, fixtures, web-first assertions, and network mocking" lists five specific capability areas, matching the anchor for several specific actions with minor gaps. It is not 5 because capabilities the body actually covers (auth state reuse, test isolation, configuration) are omitted from the enumeration.

4 / 5

Completeness

The what is explicit ("Provides Playwright test patterns for resilient locators, Page Object Models, fixtures, web-first assertions, and network mocking") and the when is equally explicit with concrete triggers ("Must use when writing or modifying Playwright tests (.spec.ts, .test.ts files with @playwright/test imports)"). Both are answered as concretely as the anchor-5 example, so it is not 4.

5 / 5

Trigger Term Quality

"Playwright tests (.spec.ts, .test.ts files with @playwright/test imports)" includes the dominant natural term plus file extensions and the package identifier — good keyword coverage. It falls short of 5 because common user synonyms like "e2e" or "end-to-end tests" are missing.

4 / 5

Distinctiveness Conflict Risk

"Must use when writing or modifying Playwright tests (.spec.ts, .test.ts files with @playwright/test imports)" carves out a clear niche with distinct triggers, and the @playwright/test import qualifier disambiguates from other test frameworks that also use .spec.ts/.test.ts files. Conflict risk is minimal, matching anchor 5.

5 / 5

Total

18

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository

NeverSight/learn-skills.dev

Path

data/skills-md/0xbigboss/claude-code/playwright-best-practices/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.