1
0
Fork 0

feat: initial companion repo for OpenClaw vs Claude Code article

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>
This commit is contained in:
Kjell Tore Guttormsen 2026-03-26 09:47:29 +01:00
commit 2491f5c732
40 changed files with 2037 additions and 0 deletions

28
browser/README.md Normal file
View file

@ -0,0 +1,28 @@
# Browser Automation
## OpenClaw: Built-in CDP/Playwright
OpenClaw ships with browser control built in. It manages multiple browser
instances, supports profiles, and exposes `act` commands that combine
navigation, interaction, and extraction in one step. No setup required.
## Claude Code: Playwright MCP server
Claude Code uses the `@playwright/mcp` server. Same underlying engine
(Playwright), different integration model: the browser runs in a separate
process, and Claude communicates with it over MCP.
**Tradeoff:** The decoupled approach means the browser can be swapped or
updated independently. The cost is one extra setup step.
## Comparison
| Property | OpenClaw | Claude Code |
|---------------------|-----------------------|-----------------------|
| Engine | CDP/Playwright | Playwright |
| Setup | Zero | Enable in .mcp.json |
| Multi-instance | Yes | One per MCP server |
| Browser profiles | Yes | Via Playwright config |
| `act` shorthand | Yes | No (compose manually) |
For setup, see `playwright-mcp-setup.md`.

View file

@ -0,0 +1,50 @@
# Playwright MCP Setup
## 1. Enable in .mcp.json
The `.mcp.json` in this repo already has Playwright configured but disabled.
To enable, change `"disabled": true` to `"disabled": false`:
```json
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["-y", "@playwright/mcp"],
"disabled": false
}
}
}
```
## 2. Requirements
Node.js must be installed. The server runs via `npx` and downloads automatically
on first use. No separate install step needed.
## 3. Available tools
Once enabled, Claude has access to:
| Tool | Description |
|-------------|--------------------------------------------|
| `navigate` | Go to a URL |
| `screenshot`| Capture the current page |
| `click` | Click an element |
| `type` | Type text into a field |
| `snapshot` | Get accessibility tree (faster than screenshot) |
## 4. Example usage
```
Go to https://example.com, take a screenshot, and tell me what's on the page
```
```
Fill out the login form at https://myapp.com with username "test" and password "test"
```
## 5. Headless vs headed
By default Playwright runs headless. To see the browser window, add `--headed`
to the args array in `.mcp.json`.