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/espennilsen/pi/playwrightnpx skills add espennilsen/pi --skill playwrightgit clone --depth 1 https://github.com/espennilsen/piWhat 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.00142 | $0.01605 |
| Opus 5 | $0.00071 | $0.00803 |
| Sonnet 5 | $0.00028 | $0.00321 |
| Haiku 4.5 | $0.00014 | $0.00161 |
Grade A, and why
playwright 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 3d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 233 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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:
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.
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();
}
})();
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:
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:
// ✅ 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 |
await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 30000 });
await page.waitForTimeout(6000); // adjust per site type
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.
- 3d ago First seen · 233 lines · 142 tokens per session scan A 37b14b87d3e2
playwright is a skill published in the GitHub repository espennilsen/pi (117 stars, last pushed 10d ago), licensed MIT. It adds 142 tokens to every session and 1,605 once invoked, about $0.0007 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
electron
Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include…
use-agent-browser-for-airi
Test AIRI display-model imports with agent-browser across stage-tamagotchi Electron, stage-web, and stage-pocket mobile web layouts. Use when uploading and verifying contributor-supplied Live2D ZIP, VRM, or MMD ZIP/PMX/PMD files through AIRI's model selector, including onboarding bypass, format-specific import…
opencli-sitemap-author
Use when creating or maintaining OpenCLI site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.
playwright
Use when the task requires automating a real browser from the terminal (navigation, form filling, snapshots, screenshots, data extraction, UI-flow debugging) via playwright-cli or the bundled wrapper script.
pinchtab-mcp
Use this skill when a task requires browser automation through PinchTab's MCP server connected to a remote browser instance. Covers navigation, element interaction, data extraction, form filling, multi-step flows, and session management via MCP tools.
peekaboo
Capture and automate macOS UI with the Peekaboo CLI.