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 skills/bartstc/vite-ts-react-template/playwright-page-objectsnpx skills add bartstc/vite-ts-react-template --skill playwright-page-objectsgit clone --depth 1 https://github.com/bartstc/vite-ts-react-templateWhat 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.00030 | $0.00869 |
| Opus 5 | $0.00015 | $0.00434 |
| Sonnet 5 | $0.00006 | $0.00174 |
| Haiku 4.5 | $0.00003 | $0.00087 |
Grade A, and why
playwright-page-objects 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 — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Playwright Page Objects
Modern POM architecture using Playwright's fixtures pattern, composition over inheritance, and role-based locators.
When to Apply
- Setting up E2E test architecture from scratch
- Creating new page objects or component helpers
- Implementing test fixtures for dependency injection
- Refactoring existing page objects for maintainability
- Writing reusable component-level test abstractions
Core Principles
- Fixtures over PageManager — On-demand instantiation, automatic setup/teardown, native TypeScript inference
- Composition over inheritance — Compose from focused components, avoid deep class hierarchies
- Role-based selectors first —
getByRole()>getByLabel()>getByText()>getByTestId() - Tests own assertions — Page objects expose state via getters, tests make assertions
- Separate pages by workflow — ProductListPage ≠ ProductDetailsPage (different user interactions)
- Readonly locators — All page object locator properties should be
readonly - Fluent interfaces — Methods return
thisfor chaining; navigation methods return target page object - Private internals — Mark implementation details (spinners, retry logic, helpers) as
private - Wait for stability — Use
waitForPageLoad(),waitForResponse()before assertions - High-level actions — Create AppActions class for complex multi-page user flows
Quick Reference
| Pattern | When to Use | Reference |
|---|---|---|
| Fixtures | Always for page object instantiation | fixtures-pattern.md |
| Basic POM | All page objects | core-patterns.md |
| Composition | Shared UI elements (header, cards, modals) | core-patterns.md |
| Waiting strategies | Loading states, API responses | core-patterns.md |
| High-level actions | Multi-page flows (checkout, onboarding) | core-patterns.md |
| Form handling | Multi-step forms, validation | form-handling.md |
What ships with it
4 files 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.
- 2d ago First seen · 74 lines · 30 tokens per session scan A 2888fa67b552
playwright-page-objects is a skill published in the GitHub repository bartstc/vite-ts-react-template (121 stars, last pushed 1mo ago), licensed MIT. It adds 30 tokens to every session and 869 once invoked, about $0.0002 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 skills, from other repositories
playwright-cli
Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.
use-agent-browser-for-airi
Test AIRI display-model imports with agent-browser across stage-tamagotchi Electron, stage-web, and stage-pocket mobile web layouts. Use when uploading and verifying contributor-supplied Live2D ZIP, VRM, or MMD ZIP/PMX/PMD files through AIRI's model selector, including onboarding bypass, format-specific import…
e2e-deployment-skill
Use this deployment skill to verify shared skills load during Playwright startup.
launch
Launch Code OSS (VS Code from sources) into an isolated throwaway profile with unique debug ports so you can drive it with @playwright/cli AND attach a Node debugger via dap-cli in the same session. Use when working on VS Code itself and you want to interact with the running workbench, automate chat or UI flows, test…
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
web-preview
Flutter Web版をビルド → サーバー起動 → Playwright でアクセス確認 → URLをユーザーに案内する。.