Beyond the Form Tester: Building a Skill Pack for Your Whole Playwright Suite A developer building a Playwright skill pack for Claude Code has created a three-skill pack covering locator policy, page object generation, and flaky-test debugging, organized under a shared references folder to avoid repeating conventions. The pack uses progressive disclosure so that only relevant skills are loaded per session, saving tokens. Part 6 of the "Automating Playwright with Claude Code" series. In Part 4 we built one Skill; in Part 5 we learned why installing many Skills doesn't bloat every session. This post uses both to grow a single Skill into a small, organized pack covering more of your actual test suite. One Skill is useful. A handful of related Skills, organized as a pack, is what actually replaces a chunk of your team's onboarding docs. This post takes the playwright-form-tester Skill from Part 4 and grows it into a three-Skill pack — a locator policy, a page object generator, and a flaky-test debugger — using the progressive disclosure model from Part 5 so none of it costs you tokens you're not using. references/ folder across Skills instead of repeating the same conventions in three separate files. Grows with your team. New teammates get your locator conventions, your page object style, and your flaky-test triage process automatically — the same idea the wider "Skill pack" ecosystem directories like qaskills.sh is built around. Completed Part 4 https://dev.to/aswani25/what-is-skillmd-building-a-reusable-playwright-testing-skill-for-claude-code-27b1 the playwright-form-tester Skill and Part 5 https://dev.to/aswani25/progressive-disclosure-why-you-can-install-30-skills-and-pay-for-almost-nothing-3n04 progressive disclosure of this series. Comfortable creating multiple sibling folders under .claude/skills/ . Before writing anything, it helps to map out which Skill owns which trigger, so descriptions don't overlap: | Skill | Fires on requests like... | |---|---| playwright-form-tester Part 4 | "test the login form", "validate checkout" | playwright-locator-policy | "add a locator for...", "find the best selector for..." | playwright-page-object-generator | "generate a page object for...", "scaffold a POM for..." | playwright-flaky-test-debugger | "this test is flaky", "why does this fail intermittently" | .claude/skills/ ├── playwright-form-tester/ ├── playwright-locator-policy/ ├── playwright-page-object-generator/ ├── playwright-flaky-test-debugger/ └── playwright-shared/ └── references/ This Skill enforces a consistent locator strategy instead of letting Claude default to fragile CSS selectors. --- name: playwright-locator-policy description: Enforce locator strategy when writing or reviewing Playwright selectors. Use whenever the user asks to add a locator, pick a selector, or review existing locators for reliability. --- Playwright locator policy Priority order 1. getByRole accessible name + role — always prefer this first. 2. getByLabel / getByPlaceholder — for form fields without a clear role match. 3. getByTestId — only when no accessible attribute exists, using the project's data-testid convention. 4. Raw CSS/XPath — last resort only; flag it in the response so it can be revisited later. Process 1. Inspect the snapshot for accessible roles and names before suggesting any selector. 2. Never suggest a locator tied to visual position nth-child, index — these break the moment layout changes. 3. If an existing test uses a fragile selector, suggest a replacement rather than leaving it as-is. This Skill turns a page snapshot into a Page Object class matching your team's conventions. --- name: playwright-page-object-generator description: Generate or update Playwright Page Object Model classes. Use whenever the user asks to scaffold a page object, generate a POM, or create a page class for a UI flow. --- Playwright page object generator Process 1. Navigate to the target page and take a snapshot. 2. Apply playwright-locator-policy conventions for every element chosen. 3. Generate one class per page, with: - Locators as readonly properties, named after their purpose emailInput , not input1 . - One method per user action login , submitForm , not per individual click or fill. 4. Place the file under pages/