Official agent skill

Playwright Roll

by microsoft in microsoft/playwright-dotnet

“Roll Playwright .NET to a new version”

— description from SKILL.md by microsoft
OfficialMITAuto-check passedTesting & QA

Install Playwright Roll

skills CLI
$ npx skills add microsoft/playwright-dotnet --skill playwright-roll -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install microsoft/playwright-dotnet playwright-roll --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/microsoft/playwright-dotnet.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/playwright-roll .claude/skills/playwright-roll && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
playwright-roll
GitHub stars
3k
Token cost
~1.9k tokens
SKILL.md length
900 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

  • Works in 7 steps: Read the commit (git show ) to see what… → If it's JS-internal (bundling,… → If it touches docs/src/api/ or types,… → …
  • SKILL.md covers Determining what to port, Mimicking the JavaScript…, Renaming generated types and Running the full test suite, plus 1 more section
  • Calls git and dotnet

About this skill

Playwright Roll is an official skill in microsoft/playwright-dotnet (3k stars). Its SKILL.md is about 1.9k tokens. Licence: MIT.

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Read the commit (git show ) to see what client/protocol/docs changed.
  2. If it's JS-internal (bundling, dispatcher conventions, electron, mcp, dashboard, trace-viewer, test-runner) — skip.
  3. If it touches docs/src/api/ or types, check langs: annotations — features marked with languages other than "csharp" do not apply.
  4. If it adds/changes a public API method or option that applies to .NET, port it. The 'build.sh --roll' already regenerated the…
  5. Watch for follow-up reverts — a "feat: X" commit might be undone by a later "Revert X". Check whether the change still exists in HEAD…
  6. Maintain a running notes file (e.g. /tmp/roll-notes.md) listing each upstream PR as ported / skipped / verified-already-supported, with a…
  7. Do not forget to port tests that cover .NET-relevant changes. At least one test per every API method/option to excercise the new code…

What it can do on your machine

Read from SKILL.md and the folder at commit 3c2b12c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • dotnet

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Playwright Roll loads about 1.9k tokens when it runs. Until then it costs about 13 tokens; SKILL.md has 900 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~13
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from microsoft/playwright-dotnet at commit 3c2b12c, republished under its MIT licence (© microsoft). 900 words, ~1,867 tokens.

Download SKILL.mdSave it as .claude/skills/playwright-roll/SKILL.md (or your agent's skills folder).
name
playwright-roll
description
Roll Playwright .NET to a new version

Help the user roll to a new version of Playwright. ../../../ROLLING.md contains general instructions and scripts. See also CLAUDE.md for build, test, and architecture details.

Unless the exact version is specified by the user, you need to find the latest version of the driver. Check the publish workflow here: https://github.com/microsoft/playwright/actions/workflows/publish_release.yml. The step that builds and publishes the driver contains the exact version you need.

Now, with the driver version known, always start with running the roll script to update the version and regenerate the API to see the state of things.

bash
./build.sh --roll <driver-version>

Afterwards, walk through the upstream changes that affect the Java client and port the relevant ones.

Determining what to port

List the upstream commits that touched a client-relevant path since the last roll. The paths cover everything that can change the public Java surface or the wire protocol:

  • docs/src/api/ — the source of truth for api.json. Method/option additions, removals, and langs: filter changes flow from here.
  • packages/playwright-core/src/client/ — the JS client implementation that the Java client mirrors.
  • packages/isomorphic/ — selector engines, locator generation/parsing, and aria-snapshot logic shared between client and server. Changes here can affect client-side helpers like getByRoleSelector.
  • packages/playwright/src/matchers/matchers.ts — assertion-method definitions. Changes here usually correspond to new options on LocatorAssertions / PageAssertions.
  • packages/protocol/spec/**.yml — the wire protocol schema. Method/event additions, parameter renames, and result-shape changes affect what the .NET implementation classes need to send/receive.
bash
cd ~/playwright
PREV_TAG=$(git tag | grep -E '^v1\.[0-9]+\.[0-9]+$' | sort -V | tail -1)  # e.g. v1.59.1
git log "$PREV_TAG"..HEAD --oneline -- \
  'docs/src/api/' \
  'packages/playwright-core/src/client/' \
  'packages/isomorphic/' \
  'packages/playwright/src/matchers/matchers.ts' \
  'packages/protocol/spec/**.yml'

Walk that list top-to-bottom (oldest-first is easier — newest is at top, so reverse). For each commit:

  1. Read the commit (git show <sha>) to see what client/protocol/docs changed.
  2. If it's JS-internal (bundling, dispatcher conventions, electron, mcp, dashboard, trace-viewer, test-runner) — skip.
  3. If it touches docs/src/api/ or types, check langs: annotations — features marked with languages other than "csharp" do not apply.
  4. If it adds/changes a public API method or option that applies to .NET, port it. The 'build.sh --roll' already regenerated the types/options, so we usually only need to update the implementation.
  5. Watch for follow-up reverts — a "feat: X" commit might be undone by a later "Revert X". Check whether the change still exists in HEAD before porting.
  6. Maintain a running notes file (e.g. /tmp/roll-notes.md) listing each upstream PR as ported / skipped / verified-already-supported, with a one-line reason. This file becomes the body of the eventual PR.
  7. Do not forget to port tests that cover .NET-relevant changes. At least one test per every API method/option to excercise the new code paths. Some server-side implementation tests are not needed in this port.

Mimicking the JavaScript implementation

The .NET client is a port of the JS client in ../playwright/packages/playwright-core/src/client/. When implementing a new or changed method, always read the corresponding JS file first and mirror its logic:

../playwright/packages/playwright-core/src/client/browserContext.ts
../playwright/packages/playwright-core/src/client/page.ts
...

Read the final state at the release tag, not just the introducing PR diff. When a feature evolves across multiple PRs (e.g. a method was introduced in one PR, then some options were added in follow-ups, then some logic was changed), the original PR's diff is a misleading reference — the final shape lives in git show v1.X.0:packages/playwright-core/src/client/foo.ts. Always read the v1.X.0 file before porting non-trivial logic.

Key translation rules:

Protocol calls — await this._channel.methodName(params) → SendMessageToServerAsync("methodName", paramsDictionary)

Extracting a returned channel object from a result — JS uses SomeClass.from(result.foo) which resolves the JS-side object for a channel reference. In .NET, extract it from the connection: .GetObject<Foo>("foo", _connection)

Watch for channel migrations. A method that lived on BrowserContext may move to Tracing (and vice-versa) without notice — the protocol spec is the source of truth. If a SendMessageToServerAsync("foo", ...) call suddenly fails, grep packages/protocol/spec/*.yml to find which channel actually owns foo now.

Wire format changes can be subtle. A method's result shape can change without renaming anything. These are easy to miss when walking client.ts because the JS code just adapts; the regression only surfaces when an existing test's deserialization breaks. Always diff packages/protocol/spec/*.yml for each commit on the walk list, not just the client code.

Update tests similarly to upstream. When upstream removes or modifies a test, apply similar changes.

Show full SKILL.md (246 more words)Show less

Renaming generated types

When the API generator produces an unhelpful name for a return type (e.g. Bind instead of BrowserBindResult), you can control it by adding a struct alias in the upstream docs.

In the docs markdown file (e.g. docs/src/api/class-browser.md), add alias (applies to all languages) or alias-csharp (overrides for .NET only) to the <[Object]> type:

diff
-- returns: <[Object]>
+- returns: <[Object]>
+  - alias-csharp: BrowserBindResult

Use alias-csharp (in addition to bare alias) when upstream already declared a different alias for other languages and you only want to override .NET's name — typically to preserve a name we've already shipped and don't want to break. After making this change, re-run ./build.sh --roll <version> to regenerate, then update any hand-written implementation code to use the new type name. The upstream docs change must also land in microsoft/playwright via a separate PR or it will revert on the next roll.

Running the full test suite

After porting, run the chromium suite end-to-end before opening the PR — many regressions only surface in older tests that depended on now-changed behavior. Tests take ~8–10 minutes:

bash
BROWSER=chromium dotnet test ./src/Playwright.Tests/Playwright.Tests.csproj \
  -c Debug -f net8.0 --logger:"console;verbosity=detailed" > /tmp/test-results.txt 2>&1
grep "^  Failed " /tmp/test-results.txt        # list failures
tail -5 /tmp/test-results.txt                  # summary

Run as a background task — don't block the conversation on it. For each failure: check whether it's a flake (port collision, browser timing) by running the single test in isolation, then investigate whether your roll introduced it or it's pre-existing.

Tips & Tricks

  • Project checkouts are in the parent directory (../).
  • Use the "gh" cli to interact with GitHub.
  • When running git commands against an upstream repo, always use git -C /path/to/repo <subcommand> instead of cd /path/to/repo && git <subcommand>.

© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/playwright-roll of microsoft/playwright-dotnet.

Open the folder on GitHubat commit 3c2b12c

Compare with similar skills

Playwright Roll next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Playwright Roll compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Playwright Roll this skillmicrosoft/playwright-dotnet3k—~1.9kAutomated safety check: PassMIT
AspireSSWConsulting/SSW.VerticalSliceArchitecture4071 repos~2kAutomated safety check: PassMIT
Find Untested Sourcesdotnet/skills5.6k1 repos~3.3kAutomated safety check: PassMIT
API Testingfugazi/test-automation-skills-agents247—~1.5kAutomated safety check: PassMIT
QA TesterJocysCom/FocusLogger213—~12kAutomated safety check: PassGPL-3.0
Webapp Selenium Testingfugazi/test-automation-skills-agents247—~2.8kAutomated safety check: PassMIT

Similar skills

  • Aspire

    SSWConsulting/SSW.VerticalSliceArchitecture

    A skill your agent uses when the user is working with an Aspire distributed application and needs to operate the AppHost or its resources through the Aspire CLI: start, restart, stop, or wait on the…

    407 GitHub starsUsed in 1 repo~2k tokens
    Testing & QAAuto-check passed
  • Official

    Statically pairs source files with test files to list code that no test references, using Roslyn for C# or tree-sitter for many languages, with no build.

    5.6k GitHub starsUsed in 1 repo~3.3k tokens
    Testing & QAAuto-check passed
  • API Testing

    fugazi/test-automation-skills-agents

    Test REST and GraphQL endpoint contracts using Playwright request fixture (TypeScript) or REST Assured (Java).

    247 GitHub stars~1.5k tokensUpdated 4 days ago
    Testing & QAAuto-check passed
  • QA Tester

    JocysCom/FocusLogger

    Create and maintain automated tests in Microsoft-native/.NET projects with a minimal stack — MSTest runner, System.Windows.Automation for Windows desktop, Playwright for real browser smoke.

    213 GitHub stars~12k tokensUpdated 3 mo ago
    Testing & QAAuto-check passed
  • Webapp Selenium Testing

    fugazi/test-automation-skills-agents

    Author and maintain versioned Selenium WebDriver tests with Java and JUnit 5.

    247 GitHub stars~2.8k tokensUpdated 4 days ago
    Testing & QAAuto-check passed
  • Repro

    vaadin/flow-components

    Reproduce a Vaadin Flow component bug from a GitHub issue in vaadin/flow-components or a component-specific issue in vaadin/flow.

    129 GitHub stars~1.3k tokensUpdated today
    Testing & QAAuto-check passed

Categories

Questions about Playwright Roll

How do I install Playwright Roll in Claude Code?

Run `npx skills add microsoft/playwright-dotnet --skill playwright-roll -a claude-code`. Or copy the skill folder (.claude/skills/playwright-roll in microsoft/playwright-dotnet) into .claude/skills/playwright-roll in your project. Claude Code loads it when a task matches its description.

How do I install Playwright Roll in Codex?

Run `npx skills add microsoft/playwright-dotnet --skill playwright-roll -a codex`. Or copy the skill folder (.claude/skills/playwright-roll in microsoft/playwright-dotnet) into .agents/skills/playwright-roll in your project. Codex loads it when a task matches its description.

Can I use Playwright Roll in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/playwright-dotnet --skill playwright-roll -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/playwright-roll, .gemini/skills/playwright-roll, .github/skills/playwright-roll and .opencode/skills/playwright-roll in your project.

What does Playwright Roll need to run?

Going by SKILL.md and its folder, Playwright Roll needs the command-line tools its instructions call (git and dotnet).

Does Playwright Roll access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Playwright Roll safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Playwright Roll use?

Playwright Roll is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Playwright Roll use?

About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Playwright Roll?

Skills that share tags, products or a category with Playwright Roll: Aspire (SSWConsulting/SSW.VerticalSliceArchitecture, 407 stars), Find Untested Sources (dotnet/skills, 5.6k stars), API Testing (fugazi/test-automation-skills-agents, 247 stars) and QA Tester (JocysCom/FocusLogger, 213 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Playwright Roll?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/playwright-dotnet, which has 3,016 GitHub stars. The repository was last updated on October 6, 2026.

Source: microsoft/playwright-dotnet on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.