playwriter
Playwriter
Browser automation via MCP. Requires Chrome extension installed and clicked on target tab.
Tools
execute
Run Playwright code with access to page, context, state (persistent), and utility functions.
// Single-line format with semicolons
await page.goto('https://example.com', { waitUntil: 'domcontentloaded' });
reset
Reset CDP connection when errors occur or pages show as about:blank.
Core Patterns
Check Page State (do this after actions)
console.log('url:', page.url()); console.log(await accessibilitySnapshot({ page }).then(x => x.split('\n').slice(0, 30).join('\n')));
Click Elements (use aria-ref from snapshot)
await page.locator('aria-ref=e13').click();
Fill Input
await page.locator('input[name="email"]').fill('test@example.com');
Screenshot
await page.screenshot({ path: 'shot.png', scale: 'css' });
Visual Screenshot with Labels
await screenshotWithAccessibilityLabels({ page });
Utility Functions
| Function | Purpose |
|---|---|
accessibilitySnapshot({ page, search? }) |
Get structured text of interactive elements |
screenshotWithAccessibilityLabels({ page }) |
Screenshot with Vimium-style element labels |
getCleanHTML({ locator }) |
Get cleaned semantic HTML |
getLatestLogs({ page?, count?, search? }) |
Retrieve browser console logs |
waitForPageLoad({ page }) |
Smart load detection |
getCDPSession({ page }) |
Send raw CDP commands |
Rules
- Multiple calls: Break complex logic into separate execute calls
- Never close: Don't call
browser.close()orcontext.close() - No bringToFront: Never call unless user asks
- Always verify: Check page state after clicks/navigation
- Persist data: Use
state.myVar = valueacross calls
More from sebastiaanwouters/dotagents
flyctl
Deploy and manage apps on Fly.io using flyctl CLI. Triggers on: fly deploy, fly.io, flyctl, deploy to fly. Handles launch, deploy, scale, secrets, volumes, databases.
79teacher
Guide learning and deep understanding through proven methodologies (Socratic, Feynman, Problem-Based). Use when user says "help me understand", "teach me", "explain this", "learn about", "socratic", "feynman", "problem-based", "I don't understand", "confused about", "why does", or wants to truly grasp a concept.
77chef
Telegram communication for AI agents. ALL methods are BLOCKING. Use for user interviews, status updates, and feedback collection.
34bitwarden
Retrieves API keys, passwords, secrets from Bitwarden vault using bw CLI. Triggers on missing env variables, missing API keys, missing secrets, "secret not found", "env not set", or "use bw".
29librarian
Use for code research that needs dependency internals, upstream implementation examples, or external prior art. Always delegate to a subagent that investigates with opensrc and web search, then return only distilled findings, versions, paths, and links.
29frontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications. Generates creative, polished code that avoids generic AI aesthetics.
28