Tooluck logoTooluck
SKILL.md

playwright-ci-caching

Agent skill fromAaronontheweb/dotnet-skills

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

How to install playwright-ci-caching

install playwright-ci-caching
# install the dotnet-skills pack with the skills CLI
npx skills add Aaronontheweb/dotnet-skills

# or add only this skill to Claude Code: copy the folder

skills/playwright-ci-caching/

# into

~/.claude/skills/playwright-ci-caching/ (all projects)

.claude/skills/playwright-ci-caching/ (one project)

skills/playwright-ci-caching/SKILL.md

MITFull file
1# Caching Playwright Browsers in CI/CD
2
3## When to Use This Skill
4
5Use this skill when:
6- Setting up CI/CD for a project with Playwright E2E tests
7- Build times are slow due to browser downloads (~400MB, 1-2 minutes)
8- You want automatic cache invalidation when Playwright version changes
9- Using GitHub Actions or Azure DevOps pipelines
10
11## The Problem
12
13Playwright browsers (~400MB) must be downloaded on every CI run by default. This:
14- Adds 1-2 minutes to every build
15- Wastes bandwidth
16- Can fail on transient network issues
17- Slows down PR feedback loops
18
19## Core Pattern
20
211. **Extract Playwright version** from `Directory.Packages.props` (CPM) to use as cache key
222. **Cache browser binaries** using platform-appropriate paths
233. **Conditional install** - only download on cache miss
244. **Automatic cache bust** - key includes version, so package upgrades invalidate cache
25
26## Cache Paths by OS
27
28| OS | Path |
29|----|------|
30| Linux | `~/.cache/ms-playwright` |
31| macOS | `~/Library/Caches/ms-playwright` |
32| Windows | `%USERPROFILE%\AppData\Local\ms-playwright` |
33
34## GitHub Actions
35
36```yaml
37- name: Get Playwright Version
38 shell: pwsh
39 run: |
40 $propsPath = "Directory.Packages.props"
41 [xml]$props = Get-Content $propsPath
42 $version = $props.Project.ItemGroup.PackageVersion |
43 Where-Object { $_.Include -eq "Microsoft.Playwright" } |
44 Select-Object -ExpandProperty Version
45 echo "PlaywrightVersion=$version" >> $env:GITHUB_ENV
46
47- name: Cache Playwright Browsers
48…

Excerpt shown under the repository's MIT license.

More skills in dotnet-skills

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates