Agent skill

Playwright CI Caching

by Aaronontheweb in Aaronontheweb/dotnet-skills

Cache Playwright browser binaries in CI/CD pipelines (GitHub Actions, Azure DevOps) to avoid 1-2 minute download overhead on every build.

MITAuto-check passedTesting & QA

Install Playwright CI Caching

skills CLI
$ npx skills add Aaronontheweb/dotnet-skills --skill playwright-ci-caching -a claude-code

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

GitHub CLI
$ gh skill install Aaronontheweb/dotnet-skills playwright-ci-caching --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/Aaronontheweb/dotnet-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/playwright-ci-caching .claude/skills/playwright-ci-caching && 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-ci-caching
GitHub stars
1.2k
Used in
1 other repo
Token cost
~1.7k tokens
SKILL.md length
399 words
Files
1
Skills in repo
33
Repo updated
First seen
Licence
MIT

At a glance

Cache Playwright browser binaries in CI/CD pipelines (GitHub Actions, Azure DevOps) to avoid 1-2 minute download overhead on every build.

  • Works in 4 steps: Extract Playwright version from… → Cache browser binaries using… → Conditional install - only download on… → …
  • Tasks that involve CI/CD
  • SKILL.md covers When to Use This Skill, The Problem, Core Pattern and Cache Paths by OS, plus 8 more sections
  • Calls dotnet

What it does

Playwright CI Caching is an agent skill from Aaronontheweb/dotnet-skills. Cache Playwright browser binaries in CI/CD pipelines (GitHub Actions, Azure DevOps) to avoid 1-2 minute download overhead on every build.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering CI/CD, Browser testing and Caching. It works with Playwright, GitHub Actions and Azure DevOps. The repository describes itself as: Claude Code skills and sub-agents for .NET Developers. The licence is MIT.

When your agent uses it

  • Tasks that involve CI/CD
  • Tasks that involve Browser testing
  • Tasks that involve Caching

Example prompts

  • “/playwright-ci-caching”

Workflow steps

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

  1. Extract Playwright version from Directory.Packages.props (CPM) to use as cache key
  2. Cache browser binaries using platform-appropriate paths
  3. Conditional install - only download on cache miss
  4. Automatic cache bust - key includes version, so package upgrades invalidate cache

What it can do on your machine

Read from SKILL.md and the folder at commit e426ed9. 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:

    • 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 CI Caching loads about 1.7k tokens when it runs. Until then it costs about 40 tokens; SKILL.md has 399 words of instructions outside code blocks.

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

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 Aaronontheweb/dotnet-skills at commit e426ed9, republished under its MIT licence (© Aaronontheweb). 399 words, ~1,725 tokens.

Download SKILL.mdSave it as .claude/skills/playwright-ci-caching/SKILL.md (or your agent's skills folder).
name
playwright-ci-caching
description
Cache Playwright browser binaries in CI/CD pipelines (GitHub Actions, Azure DevOps) to avoid 1-2 minute download overhead on every build.
invocable
false

Caching Playwright Browsers in CI/CD

When to Use This Skill

Use this skill when:

  • Setting up CI/CD for a project with Playwright E2E tests
  • Build times are slow due to browser downloads (~400MB, 1-2 minutes)
  • You want automatic cache invalidation when Playwright version changes
  • Using GitHub Actions or Azure DevOps pipelines

The Problem

Playwright browsers (~400MB) must be downloaded on every CI run by default. This:

  • Adds 1-2 minutes to every build
  • Wastes bandwidth
  • Can fail on transient network issues
  • Slows down PR feedback loops

Core Pattern

  1. Extract Playwright version from Directory.Packages.props (CPM) to use as cache key
  2. Cache browser binaries using platform-appropriate paths
  3. Conditional install - only download on cache miss
  4. Automatic cache bust - key includes version, so package upgrades invalidate cache

Cache Paths by OS

OSPath
Linux~/.cache/ms-playwright
macOS~/Library/Caches/ms-playwright
Windows%USERPROFILE%\AppData\Local\ms-playwright

GitHub Actions

yaml
- name: Get Playwright Version
  shell: pwsh
  run: |
    $propsPath = "Directory.Packages.props"
    [xml]$props = Get-Content $propsPath
    $version = $props.Project.ItemGroup.PackageVersion |
      Where-Object { $_.Include -eq "Microsoft.Playwright" } |
      Select-Object -ExpandProperty Version
    echo "PlaywrightVersion=$version" >> $env:GITHUB_ENV

- name: Cache Playwright Browsers
  id: playwright-cache
  uses: actions/cache@v4
  with:
    path: ~/.cache/ms-playwright
    key: ${{ runner.os }}-playwright-${{ env.PlaywrightVersion }}

- name: Install Playwright Browsers
  if: steps.playwright-cache.outputs.cache-hit != 'true'
  shell: pwsh
  run: ./build/playwright.ps1 install --with-deps
Multi-OS GitHub Actions

For workflows that run on multiple operating systems:

yaml
- name: Cache Playwright Browsers
  id: playwright-cache
  uses: actions/cache@v4
  with:
    path: |
      ~/.cache/ms-playwright
      ~/Library/Caches/ms-playwright
      ~/AppData/Local/ms-playwright
    key: ${{ runner.os }}-playwright-${{ env.PlaywrightVersion }}

Azure DevOps

yaml
- task: PowerShell@2
  displayName: 'Get Playwright Version'
  inputs:
    targetType: 'inline'
    script: |
      [xml]$props = Get-Content "Directory.Packages.props"
      $version = $props.Project.ItemGroup.PackageVersion |
        Where-Object { $_.Include -eq "Microsoft.Playwright" } |
        Select-Object -ExpandProperty Version
      Write-Host "##vso[task.setvariable variable=PlaywrightVersion]$version"

- task: Cache@2
  displayName: 'Cache Playwright Browsers'
  inputs:
    key: 'playwright | "$(Agent.OS)" | $(PlaywrightVersion)'
    path: '$(HOME)/.cache/ms-playwright'
    cacheHitVar: 'PlaywrightCacheHit'

- task: PowerShell@2
  displayName: 'Install Playwright Browsers'
  condition: ne(variables['PlaywrightCacheHit'], 'true')
  inputs:
    filePath: 'build/playwright.ps1'
    arguments: 'install --with-deps'

Helper Script: playwright.ps1

Create a build/playwright.ps1 script that discovers and runs the Playwright CLI. This abstracts away the Playwright CLI location which varies by project structure.

powershell
# build/playwright.ps1
# Discovers Microsoft.Playwright.dll and runs the bundled Playwright CLI

param(
    [Parameter(ValueFromRemainingArguments = $true)]
    [string[]]$Arguments
)

# Find the Playwright DLL (after dotnet build/restore)
$playwrightDll = Get-ChildItem -Path . -Recurse -Filter "Microsoft.Playwright.dll" -ErrorAction SilentlyContinue |
    Select-Object -First 1

if (-not $playwrightDll) {
    Write-Error "Microsoft.Playwright.dll not found. Run 'dotnet build' first."
    exit 1
}

$playwrightDir = $playwrightDll.DirectoryName

# Find the playwright CLI (path varies by OS and node version)
$playwrightCmd = Get-ChildItem -Path "$playwrightDir/.playwright/node" -Recurse -Filter "playwright.cmd" -ErrorAction SilentlyContinue |
    Select-Object -First 1

if (-not $playwrightCmd) {
    # Try Unix executable
    $playwrightCmd = Get-ChildItem -Path "$playwrightDir/.playwright/node" -Recurse -Filter "playwright" -ErrorAction SilentlyContinue |
        Where-Object { $_.Name -eq "playwright" } |
        Select-Object -First 1
}

if (-not $playwrightCmd) {
    Write-Error "Playwright CLI not found in $playwrightDir/.playwright/node"
    exit 1
}

Write-Host "Using Playwright CLI: $($playwrightCmd.FullName)"
& $playwrightCmd.FullName @Arguments

Usage:

bash
# Install browsers
./build/playwright.ps1 install --with-deps

# Install specific browser
./build/playwright.ps1 install chromium

# Show installed browsers
./build/playwright.ps1 install --dry-run

Prerequisites

This pattern assumes:

  1. Central Package Management (CPM) with Directory.Packages.props:

    xml
    <Project>
      <ItemGroup>
        <PackageVersion Include="Microsoft.Playwright" Version="1.40.0" />
      </ItemGroup>
    </Project>
  2. Project has been built before running playwright.ps1 (so DLLs exist)

  3. PowerShell available on CI agents (pre-installed on GitHub Actions and Azure DevOps)

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

Why Version-Based Cache Keys Matter

Using the Playwright version in the cache key ensures:

  • Automatic invalidation when you upgrade Playwright
  • No stale browser binaries that don't match the SDK version
  • No manual cache clearing needed after version bumps

If you hardcode the cache key (e.g., playwright-browsers-v1), you'll need to manually bump it every time you upgrade Playwright, or you'll get cryptic version mismatch errors.

Troubleshooting

Cache not being used
  1. Verify the version extraction step outputs the correct version
  2. Check that the cache path matches your OS
  3. Ensure Directory.Packages.props exists and has the Playwright package
"Browser not found" after cache hit

The cached browsers don't match the Playwright SDK version. This happens when:

  • The cache key doesn't include the version
  • The version extraction failed silently

Fix: Ensure the Playwright version is in the cache key.

playwright.ps1 can't find the DLL

Run dotnet build or dotnet restore before running the script. The Playwright DLL only exists after NuGet restore.

References

This pattern is battle-tested in production projects:

  • dotnet-skills:playwright-blazor - Writing Playwright tests for Blazor applications
  • dotnet-skills:project-structure - Central Package Management setup

© Aaronontheweb, 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 skills/playwright-ci-caching of Aaronontheweb/dotnet-skills.

Open the folder on GitHubat commit e426ed9

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in Aaronontheweb/dotnet-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Playwright CI Caching 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 CI Caching compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Playwright CI Caching this skillAaronontheweb/dotnet-skills1.2k1 repos~1.7kAutomated safety check: PassMIT
Playwright CIzebbern/claude-code-guide4.7k2 repos~675Automated safety check: PassMIT
Actions CI Tuningmizchi/skills359—~2.6kAutomated safety check: PassNone
Playwright Testmizchi/skills359—~4.7kAutomated safety check: NotesNone
Azure Microsoft Playwright Testing TSmicrosoft/skills3.1k—~2.2kAutomated safety check: PassMIT
Testing Test Automation Engineerchendongqi/OPB-Skills125—~3.1kAutomated safety check: PassNone

Similar skills

  • Playwright CI

    zebbern/claude-code-guide

    Production-ready CI/CD configurations for Playwright — GitHub Actions, GitLab CI, CircleCI, Azure DevOps, Jenkins, Docker, parallel sharding, reporting, code coverage, and global setup/teardown.

    4.7k GitHub starsUsed in 2 repos~675 tokens
    DevOps & CloudAuto-check passed
  • Actions CI Tuning

    mizchi/skills

    A skill your agent uses when auditing or improving GitHub Actions workflows for a project.

    359 GitHub stars~2.6k tokensUpdated 7 days ago
    Testing & QAAuto-check passed
  • Playwright Test

    mizchi/skills

    Best practices and reference for Playwright Test (E2E). An agent skill from mizchi/skills.

    359 GitHub stars~4.7k tokensUpdated 7 days ago
    Testing & QAAuto-check: notes
  • Official

    Run Playwright tests at scale using Azure Playwright Workspaces (formerly Microsoft Playwright Testing).

    3.1k GitHub stars~2.2k tokensUpdated today
    Testing & QAAuto-check passed
  • 自动化测试助手 - 专业的测试自动化设计与实现专家。适用场景: (1) 自动化测试框架选型与搭建(Selenium/Cypress/Playwright/Appium) (2) 自动化测试脚本编写(Web/API/Mobile) (3) 测试数据管理与Mock设计 (4) CI/CD测试集成(Jenkins/GitLab CI/GitHub Actions) (5) Page…

    125 GitHub stars~3.1k tokensUpdated 8 mo ago
    Testing & QAAuto-check passed
  • Deep-dive diagnosis of a Playwright test failure already isolated to one Quay Prow/OpenShift CI run: downloads its GCS artifacts (results.json, JUnit, build/pod logs, Jaeger traces), classifies real…

    2.8k GitHub stars~2.2k tokensUpdated today
    Testing & QAAuto-check passed

More from Aaronontheweb/dotnet-skills

All 33 skills in this repo
  • Akka.Hosting Actor Patterns

    Aaronontheweb/dotnet-skills

    Shows how to build entity actors with Akka.Hosting so the same code runs in local unit tests and in a sharded cluster in production.

    1.2k GitHub starsUsed in 1 repo~5k tokens
    Auto-check passed
  • .NET Trimming and Native AOT

    Aaronontheweb/dotnet-skills

    Guides making .NET libraries trimming-safe and Native-AOT compatible: the MSBuild properties, trimming attributes, warning codes and a playbook of safe patterns.

    1.2k GitHub stars~2.9k tokensUpdated 22 days ago
    Auto-check passed
  • Akka.NET Best Practices

    Aaronontheweb/dotnet-skills

    Guidance for Akka.NET actor systems covering EventStream versus DistributedPubSub, supervision, Props versus DependencyResolver, work distribution and testable cluster code.

    1.2k GitHub starsUsed in 1 repo~3.3k tokens
    Auto-check passed
  • Akka.NET Management and Discovery

    Aaronontheweb/dotnet-skills

    Sets up Akka.Management and Cluster.Bootstrap so Akka.NET clusters form through service discovery on Kubernetes, Azure or config instead of static seed nodes.

    1.2k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Akka.NET Testing Patterns

    Aaronontheweb/dotnet-skills

    Shows how to test Akka.NET actors with Akka.Hosting.TestKit: swapping services for fakes, using TestProbes, and checking persistence, plus when the older TestKit still fits.

    1.2k GitHub starsUsed in 1 repo~2.4k tokens
    Auto-check passed
  • .NET API Compatibility Design

    Aaronontheweb/dotnet-skills

    Applies extend-only design rules to NuGet packages and distributed systems, covering source, binary and wire compatibility and how to deprecate members safely.

    1.2k GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed

Questions about Playwright CI Caching

What does Playwright CI Caching do?

Cache Playwright browser binaries in CI/CD pipelines (GitHub Actions, Azure DevOps) to avoid 1-2 minute download overhead on every build. Playwright CI Caching is an agent skill from Aaronontheweb/dotnet-skills. Cache Playwright browser binaries in CI/CD pipelines (GitHub Actions, Azure DevOps) to avoid 1-2 minute download overhead on every build.

When should I use Playwright CI Caching?

Playwright CI Caching fits situations like: tasks that involve CI/CD; tasks that involve Browser testing; tasks that involve Caching.

How do I install Playwright CI Caching in Claude Code?

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

How do I install Playwright CI Caching in Codex?

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

Can I use Playwright CI Caching 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 Aaronontheweb/dotnet-skills --skill playwright-ci-caching -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-ci-caching, .gemini/skills/playwright-ci-caching, .github/skills/playwright-ci-caching and .opencode/skills/playwright-ci-caching in your project.

What does Playwright CI Caching need to run?

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

Does Playwright CI Caching 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 CI Caching 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 CI Caching use?

Playwright CI Caching 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 CI Caching use?

About 1.7k tokens (SKILL.md is roughly 6.9k 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 CI Caching?

Skills that share tags, products or a category with Playwright CI Caching: Playwright CI (zebbern/claude-code-guide, 4.7k stars), Actions CI Tuning (mizchi/skills, 359 stars), Playwright Test (mizchi/skills, 359 stars) and Azure Microsoft Playwright Testing TS (microsoft/skills, 3.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Playwright CI Caching?

Aaronontheweb (a GitHub user) maintains it in Aaronontheweb/dotnet-skills, which has 1,205 GitHub stars. The repository holds 33 skills in this directory. The repository was last updated on September 17, 2026.

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