40 files demonstrating every major OpenClaw capability using Claude Code: - 3 agents (researcher, writer, reviewer) - 3 skills (daily-briefing, slack-message, web-research) - 2 security hooks (pre-tool-use blocker, post-tool-use logger) - 10 self-contained examples with copy-paste prompts - Complete feature map (20 capabilities, 11 full match, 7 different, 2 gap) - Security docs including NemoClaw comparison - Automation, messaging, browser, memory documentation Zero dependencies. Clone and run. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.6 KiB
Example 04: Browser Automation
Capability: Claude Code can control a real browser via Playwright MCP, take screenshots, and extract structured data from live pages.
OpenClaw equivalent: CDP/Playwright browser automation with screenshot and act commands.
Prerequisites
Playwright MCP must be enabled. Add this to .mcp.json:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@playwright/mcp@latest"]
}
}
}
This repo's .mcp.json already includes it. If Claude Code does not show
Playwright tools at startup, run npm install to ensure the package is
available, then restart.
The Prompt
Navigate to https://news.ycombinator.com, take a screenshot of the current
front page, and list the top 5 stories with their point counts and submitter
names.
Save the list to hacker-news-top5.md with the format:
1. [title] - [points] points by [submitter]
Include a note at the bottom with the timestamp of when you fetched this.
What Happens
Claude Code will:
- Use the Playwright MCP
browser_navigatetool to load the page - Use
browser_screenshotto capture the current state - Use
browser_snapshotorbrowser_get_textto extract story data - Use Write to save the structured list to
hacker-news-top5.md
Why This Matters
Browser automation handles pages that cannot be reached with WebFetch alone: JavaScript-rendered content, login-protected pages, and interactive workflows.
OpenClaw bundles Playwright natively. Claude Code uses the same underlying engine via MCP. The setup takes two minutes; the capability is identical.