clanky-playwright-browser
Use Playwright from Clanky's local CLI for general web browsing, page extraction, screenshots, and repeatable browser automation.
How do I install this agent skill?
npx skills add https://github.com/volpestyle/clanky --skill clanky-playwright-browserIs this agent skill safe to install?
- Gen Agent Trust Hubpass
This skill enables web browsing and browser automation using Playwright. It allows the agent to install browser binaries, capture screenshots, and execute locally generated TypeScript scripts. The skill's functionality introduces an indirect prompt injection surface through the ingestion of external web content and a command execution surface via script automation.
- Socketpass
No alerts
- Snykwarn
Risk: MEDIUM · 1 issue
What does this agent skill do?
Playwright Browser
Use this for general web browsing, research, screenshots, and deterministic browser automation.
CLI
- Verify:
pnpm browser:playwright --version - Install Chromium if the browser binary is missing:
pnpm browser:install - Quick screenshot:
pnpm browser:playwright screenshot <url> /tmp/clanky-page.png - For multi-step work, write a short TypeScript script in the current workspace, such as
./.clanky-tmp/script.ts, and run it withpnpm exec tsx ./.clanky-tmp/script.ts. Keep output artifacts such as screenshots under/tmpwhen they do not need to be committed. - Do not put the script itself under
/tmpunless you also handle dependency resolution; Node resolves imports from the script path, so/tmp/script.tswill not find this workspace'snode_modulesby default.
Workflow
- Prefer Playwright over CDP for new browsing sessions and repeatable automation.
- Use a fresh browser context by default. Do not use a persistent/authenticated profile unless the user explicitly asks.
- Capture useful artifacts under
/tmpor the task workspace: screenshot, extracted text, relevant HTML snippet, and final URL. - Extract page text with DOM APIs such as
document.body.innerText; use locators for clicking/form-filling instead of brittle coordinate clicks. - Close browsers and contexts in a
finallyblock. - If browsing fails because Chromium is not installed, run
pnpm browser:installonce and retry.
Script Pattern
import { chromium } from "playwright";
async function main(): Promise<void> {
const browser = await chromium.launch({ headless: true });
try {
const page = await browser.newPage({ viewport: { width: 1440, height: 1000 } });
await page.goto("https://example.com", { waitUntil: "domcontentloaded", timeout: 30_000 });
const title = await page.title();
const text = await page.locator("body").innerText({ timeout: 10_000 });
await page.screenshot({ path: "/tmp/clanky-page.png", fullPage: true });
console.log(JSON.stringify({ url: page.url(), title, text: text.slice(0, 8000) }, null, 2));
} finally {
await browser.close();
}
}
main().catch((error: unknown) => {
console.error(error instanceof Error ? error.stack ?? error.message : String(error));
process.exit(1);
});
Report what was observed from browser output. If login, payment, personal data, or destructive actions are involved, stop and ask for explicit permission.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/volpestyle/clanky/clanky-playwright-browser">View clanky-playwright-browser on skillZs</a>