playwright-capture

playwright-capture is an agent for Claude Code from huuanh20/awesome-ai-agent-skills. It costs 60 tokens per session (2,429 once invoked), scanned A, original, MIT.

A Playwright-based screenshot agent for capturing web pages, sections, or individual elements as PNG images. Playwright is a tool that controls a browser for automated testing and page capture.

In plain words
What is it for?
Use it to capture full pages, centered sections, clipped elements, or composite designs across selected screen shapes, themes, and languages.
Why use it?
It removes the manual work of resizing pages, selecting elements, switching themes or languages, and taking consistent screenshots.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Good fit Use it to capture full pages, centered sections, clipped elements, or composite designs across selected screen shapes, themes, and languages.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/huuanh20/awesome-ai-agent-skills/playwright-capture
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.

Clone the repo
git clone --depth 1 https://github.com/huuanh20/awesome-ai-agent-skills

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-capture

README.md
[![agentmods](https://agentmods.dev/badge/agents/huuanh20/awesome-ai-agent-skills/playwright-capture/github.svg)](https://agentmods.dev/agents/huuanh20/awesome-ai-agent-skills/playwright-capture)
Your own site
<a href="https://agentmods.dev/agents/huuanh20/awesome-ai-agent-skills/playwright-capture"><img src="https://agentmods.dev/badge/agents/huuanh20/awesome-ai-agent-skills/playwright-capture/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for playwright-capture

Your own site · 80×15
<a href="https://agentmods.dev/agents/huuanh20/awesome-ai-agent-skills/playwright-capture"><img src="https://agentmods.dev/badge/agents/huuanh20/awesome-ai-agent-skills/playwright-capture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,429 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00060 $0.02429
Opus 5 $0.00030 $0.01215
Sonnet 5 $0.00012 $0.00486
Haiku 4.5 $0.00006 $0.00243

Measured 10d ago against content hash fd71830a5c87, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

playwright-capture scanned grade A with 1 finding 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 10d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -L -o "<BG_DIR>/bg-<N>.jpg" "https://source.unsplash.com/1080x1080/?nature,bokeh&sig=<N>"
.claude/agents/playwright-capture.md · 226 lines

How it starts

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

Screenshot pages or elements using Playwright. Auto-detect the capture mode from what's provided.

Input

All fields optional — agent infers mode from what's present:

Field Description
HTML_PATH Absolute path to an HTML file (or URL)
OUTPUT_DIR Absolute path for PNG output
RUNNER Absolute path to playwright-skill/run.js
SECTIONS CSS IDs to capture (e.g. hero,features,demo,cta) — triggers section mode
SELECTOR Single CSS selector — triggers element clip mode
VIEWPORTS 16x9, 9x16, 1x1 (comma-separated, default: 16x9)
THEME dark, light, or both (sets data-theme on <html>)
LANG en, vi, or both (calls window.applyLang(lang) if available)
BG_SOURCE Folder path or auto — enables composite step
SCALE Device scale factor (default: 2)

Auto-detect Mode

Condition Mode
SECTIONS provided Section — resize viewport to section height, scroll section to top, screenshot
SELECTOR provided Element — clip to element bounding box
Neither Page — full-page screenshot

Steps

1. Resolve inputs + create output dir

mkdir -p "<OUTPUT_DIR>"

Expand both values: THEME=both['dark','light'] · LANG=both['en','vi']

Read the full file on GitHub · 226 lines

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. 10d ago First seen · 226 lines · 60 tokens per session scan A fd71830a5c87

Subscribe to this mod's changes

playwright-capture is an agent published in the GitHub repository huuanh20/awesome-ai-agent-skills (1 stars, last pushed 1mo ago), licensed MIT. It adds 60 tokens to every session and 2,429 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.