playwright-browser
Playwright Browser Automation Skill
Purpose
Provides browser automation capabilities through a local Playwright Docker container, eliminating the need for remote MCP server connections. Enables web scraping, E2E testing, screenshot capture, and browser interaction automation.
Capabilities
- Navigation: Load URLs with configurable wait conditions
- Screenshots: Capture full-page or viewport screenshots
- Interaction: Click, fill forms, press keys
- Evaluation: Execute JavaScript in page context
- Testing: End-to-end test automation
Requirements
Docker
- Docker Desktop installed and running
agent-networkDocker network created- Playwright container running
Ruby
- Ruby ≥2.7
- Gems:
websocket-client-simple,json
Setup
# Start Playwright container
cd ~/.claude/skills/playwright-browser/docker
docker-compose up -d
# Verify container is running
docker ps | grep playwright-server
# Check health
curl http://localhost:3000/health
Usage
Navigation
# Navigate to URL
~/.claude/skills/playwright-browser/scripts/navigate.rb "https://example.com"
Screenshots
# Capture screenshot
~/.claude/skills/playwright-browser/scripts/screenshot.rb "https://example.com" /tmp/screenshot.png
# Full-page screenshot
~/.claude/skills/playwright-browser/scripts/screenshot.rb "https://example.com" /tmp/screenshot.png --full-page
JavaScript Evaluation
# Execute JavaScript
~/.claude/skills/playwright-browser/scripts/evaluate.rb "document.title"
# Get page data
~/.claude/skills/playwright-browser/scripts/evaluate.rb "JSON.stringify({title: document.title, url: location.href})"
Docker Management
Start Container
~/.claude/skills/playwright-browser/scripts/start.sh
Stop Container
~/.claude/skills/playwright-browser/scripts/stop.sh
Restart Container
~/.claude/skills/playwright-browser/scripts/restart.sh
Check Status
~/.claude/skills/playwright-browser/scripts/status.sh
Troubleshooting
Container won't start
Symptom: docker-compose up -d fails
Solutions:
- Check Docker Desktop is running
- Verify network exists:
docker network ls | grep agent-network - Check logs:
docker-compose logs - Try recreating:
docker-compose down && docker-compose up -d
Connection refused
Symptom: WebSocket connection fails
Solutions:
- Verify container is running:
docker ps | grep playwright - Check health:
curl http://localhost:3000/health - Check logs:
docker logs playwright-server - Restart container:
docker-compose restart
Slow performance
Symptom: Operations take >5 seconds
Solutions:
- Check resource allocation in Docker Desktop settings
- Increase memory limit in docker-compose.yml
- Verify no other heavy containers running
- Check system resources:
docker stats
Ruby gem errors
Symptom: LoadError for websocket gem
Solutions:
gem install websocket-client-simple
gem install json
Performance Notes
- Container startup: ~20-30 seconds
- API response time: <500ms typical
- Memory usage: ~500MB-1GB
- Suitable for development and light automation
Advanced Configuration
Custom Playwright version
Edit docker-compose.yml:
image: mcr.microsoft.com/playwright:v1.41.0-jammy
Resource limits
Edit docker-compose.yml deploy section:
deploy:
resources:
limits:
memory: 4G
cpus: '4.0'
See Also
- Chrome DevTools skill for debugging capabilities
- Original research:
~/.claude/claudedocs/research_mcp_to_agent_skill_conversion_20251116.md
More from arlenagreer/claude_configuration_docs
commit
ALWAYS use this skill when committing code changes — never commit directly without it. Creates commits following Sentry conventions with proper conventional commit format and issue references. Trigger on any commit, git commit, save changes, or commit message task.
12omnifocus
Manage OmniFocus projects and tasks programmatically. This skill should be used when creating, reading, updating, or listing OmniFocus tasks and projects. Supports all OmniFocus versions through intelligent automation method detection (Omni Automation → AppleScript → SQLite read-only fallback). Use for task management workflows, project queries, task completion tracking, and OmniFocus data operations.
10obsidian-file-manager
>
10text-message
Send text messages via Apple Messages app with automatic contact lookup and attachment support. This skill should be used when sending SMS/iMessage to contacts. Supports name-based recipient lookup via Google Contacts integration, image/file attachments, and handles missing recipient/message prompts. CRITICAL - Messages are ALWAYS sent individually to each recipient, NEVER as group messages. REQUIRES E.164 phone format (+1XXXXXXXXXX) for reliable delivery. Integrates Arlen's writing style guide for authentic messaging.
9agent-browser
Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.
8google-drive
Manage Google Drive files and folders with full CRUD operations via Ruby scripts. Use for file storage operations, folder organization, sharing permissions, searching across Drive, and uploading/downloading files of any type. Works seamlessly with google-sheets and google-docs skills for complete Google Workspace integration.
8