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/microsoft/playwright/playwright-component-testingnpx skills add microsoft/playwright --skill playwright-component-testinggit clone --depth 1 https://github.com/microsoft/playwrightWhat 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.00069 | $0.02273 |
| Opus 5 | $0.00034 | $0.01137 |
| Sonnet 5 | $0.00014 | $0.00455 |
| Haiku 4.5 | $0.00007 | $0.00227 |
Grade A, and why
playwright-component-testing 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 yesterday.
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.
Copies of this mod
1 near-identical copy found in the catalogue:
- playwright-component-testing — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Component Testing with Playwright
Test components with regular Playwright e2e tests against a small story gallery page hosted by the app's own dev server. No extra test runner, bundler integration or npm packages are required.
Concept
- A story is a tiny wrapper component that embeds the component under test in one specific scenario: hard-coded props, mock data, providers, recorded callbacks. Stories live next to the component in
*.story.tsx(or.ts/.jsx/.js/.vue) files; each named export is one story. - The gallery is a single page you implement to
references/gallery-spec.md: it exposeswindow.mount(params)/window.unmount()that render a story — resolved from your story files (e.g. withimport.meta.glob) — into#root. It is framework-specific and yours to own — there is no template to copy for it. - Tests are plain Playwright tests. The built-in
mount(storyId, props?)fixture (from@playwright/test) drives the gallery'swindow.mountand returns aLocatorfor the gallery root (#root). Scope the queries from there —component.getByRole('button').click(), notcomponent.click(). Nothing to scaffold for it.
Everything the component needs must be set up inside the story (it runs in the browser); everything the test asserts must be observable through the page (DOM, URL, network). Where the component takes callbacks, the story creates the state, provides the callbacks and records the state into a hidden form for the test to assert on. mount(id, props) passes plain serializable props to the story.
Setup workflow
- Detect the framework and bundler. React vs Vue decides the framework notes and example story to follow. Then:
- App runs on Vite (has
vite.config.*): the gallery is served by the existing dev server at/playwright/gallery/index.html— Vite serves any.htmlfile under the project root, the app's plugins/aliases/CSS apply automatically, andvite buildignores it. No extra server needed. - Anything else (Next.js, webpack, no dev server): run a small standalone dev server (e.g. Vite) that serves the gallery page, and point
baseURLat it. Requiresviteand the framework plugin as devDependencies.
- App runs on Vite (has
- Implement the gallery to
references/gallery-spec.md: a page at<project>/playwright/gallery/that renders the requested story into#root. Start from the worked example in the spec and the framework notes inreferences/react.md/references/vue.md. Keep story discovery (import.meta.glob) and the framework mount here — this is the only framework-specific glue, so keep it small. Import the app's global CSS the same way the app's own entry does. - Configure Playwright — add to
playwright.config.ts:
What ships with it
8 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.
- yesterday First seen · 144 lines · 69 tokens per session scan A 77bc6f8d1de5
playwright-component-testing is a skill published in the GitHub repository microsoft/playwright (95,378 stars, last pushed 3d ago), licensed Apache-2.0. It adds 69 tokens to every session and 2,273 once invoked, about $0.0003 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
glance-test
Run E2E browser tests on any web application using Glance MCP. Use when the user says "test this page," "check this URL," "run E2E tests," "browser test," "test the login flow," "check if the site works," "visual regression," or "screenshot this page." Also use for post-deploy verification and smoke tests.
qa-explore
Exploratory end-to-end QA with a team of agents that drive a real browser like human testers — they click through the whole app, create/fill/submit, screenshot and visually judge rendering + data correctness, capture trace/HAR/console/video evidence, adversarially verify each finding, learn from rejected findings, and…
qa-plan
Risk-based test plan — what a senior QA team writes BEFORE testing. Recon the app, score each area by RISK (impact × likelihood), rank into P0/P1/P2 deterministically, define the acceptance ("done") per area, and emit a test charter (Markdown) that also seeds qa-explore's areas in priority order so the expensive…
compiler
Use when converting a refined markdown E2E test case into a standard Playwright .spec.ts file. Triggers on "compile this test", "convert to playwright", or "generate spec from markdown". Requires a stable markdown test case and a running dev server.
author
Use when writing a new E2E browser test from a vague user description or feature requirement. Turns exploratory browser sessions into structured, reusable test cases.
refiner
Use when an E2E test case exists but needs stabilization through repeated execution. Runs the test multiple times, identifies flaky steps, and updates the test case and conventions until deterministic.