playwright
Take screenshots and interact with web pages using a headed Playwright browser.
Skill by espennilsen
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/espennilsen-playwright
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/playwright
What's inside
- Skill name
playwright- Description
- Take screenshots and interact with web pages using a headed Playwright browser. Use when you need to visually inspect a URL, capture a screenshot, interact with a page (click, type, scroll), or verify what a page looks like rendered. **Triggers — use this skill when:** - You need to screenshot a URL (Penpot share link, localhost, public site) - User says "show me", "how does it look", "take a screenshot" - You want to visually verify your own work (e.g. after creating Penpot designs) - User asks to review a live page or prototype - You need to interact with a page (click buttons, fill forms, trigger states)
- License
- MIT
- Instructions
- 219 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- body: contains an absolute path from the author's machine
Files (1)
- SKILL.md
SKILL.md (first lines)
# Playwright — Browser Screenshots & Interaction
Use Playwright to open a real browser, navigate to URLs, take screenshots, and
interact with pages. This is the go-to approach for visual verification of any
web content — Penpot designs, local dev servers, production sites, etc.
## Setup
Playwright is installed at `/Users/espen/node_modules/playwright`.
When writing scripts, always require from the absolute path:
```javascript
const { chromium } = require('/Users/espen/node_modules/playwright');
```
## Quick Screenshot
Write a `.cjs` script to `/tmp/`, run it with `node`, then `read` the resulting PNG.
```javascript
const { chromium } = require('/Users/espen/node_modules/playwright');
(async () => {
const browser = await chromium.launch({ headless: false });
try {
const page = await browser.newPage();
await page.goto('https://example.com', { waitUntil: 'domcontentloaded', timeout: 30000 });
await page.waitForTimeout(3000);
await page.screenshot({ path: '/tmp/screenshot.png' });
} finally {
await browser.close();
}
})();
```
```bash
node /tmp/screenshot.cjs
```
Then view it:
```
read /tmp/screenshot.png
```
## Key Rules
### Always use `headless: false`
Many SPAs (Penpot, React apps, ClojureScript apps) fail or render blank in
headless mode. Always launch headed:
```javascript
chromium.launch({ headless: false })
```
### Always use CommonJS (`.cjs`)
Write scripts as `.cjs` files with `require()`. ESM imports fail because
Playwright isn't in the local `node_modules`:
```javascript
// ✅ Works
const { chromium } = require('/Users/espen/node_modules/playwright');
// ❌ Fails — "Cannot find package 'playwright'"
import { chromium } from 'playwright';
```
### Wait for SPA rendering
SPAs need time to hydrate after the initial HTML loads. Always add a wait:
| Site type | Wait time |
|-----------|-----------|
| Static HTML | 1-2 seconds |
| Simple SPA (React, Svelte) | 3-4 seconds |
| Complex SPA (Penpot, Figma) | 6-8 seconds |
```javascript
await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 30000 });
await page.waitForTimeout(6000); // adjust per site type
```
Use `waitUntil: 'domcontentloaded'` instead of `'networkidle'` — network-idle
can time out on SPAs that keep WebSocket connections open.
### Write to /tmp
Always save screenshots and scripts to `/tmp/` to avoid polluting the workspace:
```javascript
await page.screenshot({ path: '/tmp/my-screenshot.png' });
```
## Viewport & Device Emulation
### Custom viewport
```javascript
const context = await browser.newContext({ viewport: { width: 1400, height: 1000 } });
const page = await context.newPage();
```
### Mobile device
```javascript
const { devices } = require('/Users/espen/node_modules/playwright');
const iPhone = devices['iPhone 15'];
const context = await browser.newContext({ ...iPhone });
```
### Common viewports
| Use case | Width × Height |
|----------|---------------|
| Desktop (default) | 1400 × 1000 |
| Mobile | 390 × 844 |
| Tablet | 768 × 1024 |
| Wide | 1920 × 1080 |From espennilsen/pi, MIT.
More from espennilsen/pi
- 0.739score
herdr-setup
espennilsen
Use when installing, updating, configuring, or troubleshooting Herdr, including missing commands, PATH errors, version differences, or Pi integration setup.
SkillBFreshness: B★ 122Claude Code +9 - 0.739score
herdr-operations
espennilsen
Use when inspecting or operating Herdr sessions, workspaces, tabs, panes, agents, terminal output, agent messaging, or waits.
SkillBFreshness: B★ 122Claude Code +9 - 0.729score
cmux
espennilsen
Orchestrate cmux terminal panes — split terminals, run parallel processes, read output from other panes, and use the built-in browser.
SkillBFreshness: B★ 122Claude Code +9 - 0.726score
pi-subagent
espennilsen
Delegate tasks to specialized subagents for parallel or sequential execution.
SkillBFreshness: B★ 122Claude Code +9 - 0.681score
github
espennilsen
Interact with GitHub repos, PRs, issues, CI, and notifications via the pi-github extension commands and gh CLI.
SkillCFreshness: C★ 122Claude Code +9 - 0.676score
docstring-generator
espennilsen
Generate and update language-idiomatic doc comments for TypeScript (TSDoc/JSDoc) and Rust (Rustdoc).
SkillCFreshness: C★ 122Claude Code +9 - 0.671score
comfyui-node-update
espennilsen
Write and improve documentation for ComfyUI nodes in per-node JSON files.
SkillCFreshness: C★ 122Claude Code +9 - 0.607score
dry-code-review
espennilsen
Perform a comprehensive DRY (Don't Repeat Yourself) code review on a codebase.
SkillDFreshness: D★ 122Claude Code +9 - 0.607score
pdf-reader
espennilsen
Read and extract content from PDF files — text, tables, metadata, and images.
SkillDFreshness: D★ 122Claude Code +9 - 0.607score
extract-design-system
espennilsen
Reverse-engineer a design system from a live website (public URL or localhost).
SkillDFreshness: D★ 122Claude Code +9 - 0.607score
codebase-docs
espennilsen
Generate and maintain AI-readable markdown documentation for a codebase in docs/.
SkillDFreshness: D★ 122Claude Code +9 - 0.607score
google-workspace
espennilsen
Manage Google Workspace via the gws CLI — Drive, Gmail, Sheets, Docs, Slides, People, Chat, Meet, Forms, and cross-service workflows.
SkillDFreshness: D★ 122Claude Code +9
Signals
- Stars
- 122
- Forks
- 13
- Open issues
- 1
- Last commit (this folder)
- Apr 22, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/espennilsen/pi
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from espennilsen
- 0.739score
herdr-setup
espennilsen
Use when installing, updating, configuring, or troubleshooting Herdr, including missing commands, PATH errors, version differences, or Pi integration setup.
SkillBFreshness: B★ 122Claude Code +9 - 0.739score
herdr-operations
espennilsen
Use when inspecting or operating Herdr sessions, workspaces, tabs, panes, agents, terminal output, agent messaging, or waits.
SkillBFreshness: B★ 122Claude Code +9 - 0.729score
cmux
espennilsen
Orchestrate cmux terminal panes — split terminals, run parallel processes, read output from other panes, and use the built-in browser.
SkillBFreshness: B★ 122Claude Code +9 - 0.726score
pi-subagent
espennilsen
Delegate tasks to specialized subagents for parallel or sequential execution.
SkillBFreshness: B★ 122Claude Code +9 - 0.681score
github
espennilsen
Interact with GitHub repos, PRs, issues, CI, and notifications via the pi-github extension commands and gh CLI.
SkillCFreshness: C★ 122Claude Code +9 - 0.676score
docstring-generator
espennilsen
Generate and update language-idiomatic doc comments for TypeScript (TSDoc/JSDoc) and Rust (Rustdoc).
SkillCFreshness: C★ 122Claude Code +9
Cite this page
playwright skill. Agent Mart. https://agentmart.dev/skills/espennilsen-playwright (last updated 2026-10-24)