playwright

playwright is a skill for Claude Code from mishahanin/heading-os. It costs 80 tokens per session (2,583 once invoked), scanned A, original, Apache-2.0.

A tool for driving a real web browser through scripted steps and extracting information from pages.

In plain words
What is it for?
Use it to capture screenshots, scrape rendered pages, fill forms, create PDFs, monitor sites, or extract YouTube transcripts.
Why use it?
It can work with pages that load content through JavaScript and can repeat actions consistently.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

Install

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.

agentmods
npx agentmods add skills/mishahanin/heading-os/playwright
Any agent
npx skills add mishahanin/heading-os --skill playwright
Clone the repo
git clone --depth 1 https://github.com/mishahanin/heading-os

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for playwright

README.md
[![agentmods](https://agentmods.dev/badge/skills/mishahanin/heading-os/playwright.svg)](https://agentmods.dev/skills/mishahanin/heading-os/playwright)
Your own site
<a href="https://agentmods.dev/skills/mishahanin/heading-os/playwright"><img src="https://agentmods.dev/badge/skills/mishahanin/heading-os/playwright.svg" alt="Measured on agentmods" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,583 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00080 $0.02583
Opus 5 $0.00040 $0.01291
Sonnet 5 $0.00016 $0.00517
Haiku 4.5 $0.00008 $0.00258

Measured 2d ago against content hash 6215ea659e91, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/pw.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.claude/skills/playwright/SKILL.md · 221 lines

How it starts

The opening of the file, as written. The whole thing — 221 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Playwright Browser Automation

Browser automation and content extraction via Playwright (Python). Handles screenshots, scraping, form filling, PDF generation, YouTube content extraction, and website monitoring.

Prerequisites

Dependencies (already installed in this workspace):

pip install playwright youtube-transcript-api yt-dlp python-dotenv
python -m playwright install chromium

Script Location

.claude/skills/playwright/scripts/pw.py

Run from the workspace root. First anchor the shell: cd "$(git rev-parse --show-toplevel)". A prior skill can leave the shell in a subdirectory, which breaks the root-relative script path below. All commands follow this pattern:

python ".claude/skills/playwright/scripts/pw.py" <command> [args]

Quick Reference

Command Purpose Example
screenshot Capture page screenshot pw.py screenshot "https://example.com"
extract Extract text/data via selectors pw.py extract "https://example.com" -s "h1" -f json
fill Fill form fields pw.py fill "https://url" --fields '{"#email": "[email protected]"}'
click Click element, capture result pw.py click "https://url" -s "button.submit"
pdf Generate PDF from web page pw.py pdf "https://example.com"
youtube Extract video content + transcript pw.py youtube "https://youtu.be/VIDEO_ID"
batch-screenshots Screenshot multiple URLs pw.py batch-screenshots "url1,url2,url3"
monitor Check URL status pw.py monitor "https://odun.one"
execute Run custom Playwright script pw.py execute "/tmp/my_script.py"

YouTube Content Extraction

The most direct way to understand YouTube video content. Extracts title, description, chapters, and full transcript without needing a browser -- uses YouTube's caption APIs directly.

# Get full video content in markdown (default)
python ".claude/skills/playwright/scripts/pw.py" youtube "https://youtu.be/VIDEO_ID"

# Save to file
python ".claude/skills/playwright/scripts/pw.py" youtube "https://youtu.be/VIDEO_ID" -o "$OUTPUTS_DIR/browser/video.md"

# JSON format for structured processing
python ".claude/skills/playwright/scripts/pw.py" youtube "VIDEO_ID" -f json

Read the full file on GitHub · 221 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 2d ago First seen · 221 lines · 80 tokens per session scan A 6215ea659e91

Subscribe to this mod's changes

playwright is a skill published in the GitHub repository mishahanin/heading-os (11 stars, last pushed today), licensed Apache-2.0. It adds 80 tokens to every session and 2,583 once invoked, about $0.0004 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-09-03.