Borrowing it
Nothing to install: this file belongs to fwornle/coding. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/fwornle/coding/main/.claude/commands/playwright-cli.mdgit clone --depth 1 https://github.com/fwornle/codingWrote 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.
[](https://agentmods.dev/commands/fwornle/coding/playwright-cli)<a href="https://agentmods.dev/commands/fwornle/coding/playwright-cli"><img src="https://agentmods.dev/badge/commands/fwornle/coding/playwright-cli/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.
<a href="https://agentmods.dev/commands/fwornle/coding/playwright-cli"><img src="https://agentmods.dev/badge/commands/fwornle/coding/playwright-cli.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00145 | $0.01880 |
| Opus 5.5 | $0.00058 | $0.00752 |
| Sonnet 5.5 | $0.00029 | $0.00376 |
| Haiku 4.5 | $0.00015 | $0.00188 |
Grade A, and why
playwright-cli 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 1mo 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.
| Dashboard not responding | Check `curl -s http://localhost:3032` first, rebuild if needed | How it starts
The opening of the file, as written. The whole thing — 238 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Playwright CLI Skill
Drive a real Chromium browser from the bash_tool using Playwright (Node.js). No MCP server needed.
1. Environment Setup
Always run this check first. It's fast and idempotent.
# Check Node + npx availability
node --version && npx --version
# Check if playwright is available; install if not
if ! npx playwright --version 2>/dev/null; then
echo "Installing Playwright..."
npm install -D playwright 2>&1 | tail -5
npx playwright install chromium 2>&1 | tail -10
fi
If npm install fails due to network restrictions, inform the user that Playwright must be pre-installed in their environment.
Working directory: Write scripts to /tmp/pw-scripts/ and run from there. For E2E test specs, use the project's tests/e2e/ directory structure.
2. Script Patterns
Write a Node.js script, save it, run it with node. Always use these boilerplate patterns:
Boilerplate (all scripts)
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch({ headless: true });
const context = await browser.newContext();
const page = await context.newPage();
try {
// --- your task here ---
} catch (err) {
console.error('Error:', err.message);
process.exit(1);
} finally {
await browser.close();
}
})();
Screenshot
await page.goto('https://example.com', { waitUntil: 'networkidle' });
await page.screenshot({ path: '/tmp/pw-scripts/screenshot.png', fullPage: true });
console.log('Screenshot saved.');
await page.goto('https://example.com', { waitUntil: 'networkidle' });
await page.pdf({ path: '/tmp/pw-scripts/output.pdf', format: 'A4' });
console.log('PDF saved.');
Web Scraping
await page.goto('https://example.com', { waitUntil: 'domcontentloaded' });
// Wait for a key element if needed
await page.waitForSelector('.content', { timeout: 10000 });
const data = await page.evaluate(() => {
// Run in browser context — return serialisable data
return Array.from(document.querySelectorAll('h2')).map(el => el.textContent.trim());
});
console.log(JSON.stringify(data, null, 2));
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.
- 1mo ago Changed 2cd1f9a7102d
- 1mo ago First seen · 238 lines · 145 tokens per session scan A de51fc2d37df
playwright-cli is a command published in the GitHub repository fwornle/coding (2 stars, last pushed today), licensed MIT. It adds 145 tokens to every session and 1,880 once invoked, about $0.0006 per session on Opus 5.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.
Other commands, from other repositories
auto-browse
Auto-browse — learn, optimize, and graduate browser operations or web data-mining workflows.
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
verify-pr
Verify a PR's frontend changes through browser automation.
gh-issue-use-cypress
Like /gh-issue-use-browser, but pinned to the Cypress MCP — use when your project runs the Cypress MCP for browser automation. Example — /gh-issue-use-cypress "Composer > Save" saving toasts failure but the record persists.
can-i-use
Check browser support for web platform features against the project's browser targets.
qa
Smoke or browser-walk a running app. Report only. Do not implement. Do not merge.