بنقرة واحدة
browser
Automate browser actions using Puppeteer with a simple DSL for web testing and automation
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Automate browser actions using Puppeteer with a simple DSL for web testing and automation
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | browser |
| description | Automate browser actions using Puppeteer with a simple DSL for web testing and automation |
This skill uses pkgx to run tools without global installation:
pkgx pnpm exec tsx script.tspkgx uv run script.pyThis skill provides browser automation using Puppeteer through a simple DSL. You can use it to:
First, install dependencies in the skill directory:
cd ~/.claude/skills/browser
pkgx pnpm install
This will install Puppeteer, TypeScript, and tsx.
Then install Chrome for Puppeteer:
npx puppeteer browsers install chrome
This downloads a compatible Chrome version to ~/.cache/puppeteer/.
cd ~/.claude/skills/browser && pkgx pnpm exec tsx scripts/browser.ts "
load https://www.google.com
waitForElement textarea[name=q]
click textarea[name=q]
type hello world
sleep 500
waitForElement input[value=\"Google Search\"]
click input[value=\"Google Search\"]
waitForNewPage google.com/search
screenshot result.png
"
load <url> - Navigate to a URLwaitForElement <selector> - Wait for an element to appear (30s timeout)click <selector> - Click an elementtype <text> - Type text into the currently focused elementwaitForNewPage <urlPattern> - Wait for navigation to a new page, then verify the URL contains the given pattern (substring match)screenshot <filename> - Take a screenshot and save to /tmp/magenta/sleep <ms> - Wait for a specified duration in millisecondshover <selector> - Hover over an elementselect <selector> <value> - Select an option from a dropdownfocus <selector> - Focus an elementpressKey <key> - Press a keyboard key (e.g., Enter, Escape, Tab)getText <selector> - Get and log the text content of an elementgetAttribute <selector> <attribute> - Get and log an element's attribute valuereload - Reload the current pagesaveContent <filename> - Save page HTML to /tmp/magenta/keepOpen - Keep browser open after script completes (useful for debugging)eval / endeval - Execute JavaScript code in the page context
eval
console.log('Hello from page context');
return document.title;
endeval
eval blocks)commandName arg1 arg2 ...eval / endeval# are treated as commentsSimple commands:
load https://example.com
click button.submit
type Hello World
waitForNewPage example.com/results # Waits for navigation, then checks URL contains "example.com/results"
Multi-line eval block:
eval
const title = document.querySelector('h1').textContent;
console.log('Title:', title);
return title;
endeval