Skills plasmate
Browse the web via Plasmate, a fast headless browser engine for agents. Compiles HTML into a Semantic Object Model (SOM) - 50x faster than Chrome, 10x fewer tokens. Supports AWP (Agent Web Protocol) and CDP compatibility.
install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/builder-nc/plasmate" ~/.claude/skills/openclaw-skills-plasmate && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/builder-nc/plasmate" ~/.openclaw/skills/openclaw-skills-plasmate && rm -rf "$T"
manifest:
skills/builder-nc/plasmate/SKILL.mdsource content
Plasmate - Browser Engine for Agents
Plasmate compiles HTML into a Semantic Object Model (SOM). 50x faster than Chrome, 10x fewer tokens.
- Docs: https://docs.plasmate.app
- Source: https://github.com/plasmate-labs/plasmate (Apache 2.0)
- Privacy: All processing runs locally. No telemetry or cloud services.
Install
# Build from source (recommended) cargo install plasmate # Or use the install script curl -fsSL https://plasmate.app/install.sh | sh
Protocols
- AWP (native): 7 methods - navigate, snapshot, click, type, scroll, select, extract
- CDP (compatibility): Puppeteer/Playwright compatible on port 9222
Default to AWP. Use CDP only when existing Puppeteer/Playwright code needs reuse.
Quick Start
Fetch (one-shot, no server)
plasmate fetch <url>
Returns SOM JSON: regions, interactive elements with stable IDs, extracted content.
Server Mode
# AWP (recommended) plasmate serve --protocol awp --port 9222 # CDP (Puppeteer compatible) plasmate serve --protocol cdp --port 9222
AWP Usage (Python)
Run
scripts/awp-browse.py for AWP interactions:
# Navigate and get SOM snapshot python3 scripts/awp-browse.py navigate "https://example.com" # Click an interactive element by ref ID python3 scripts/awp-browse.py click "https://example.com" --ref "e12" # Type into a field python3 scripts/awp-browse.py type "https://example.com" --ref "e5" --text "search query" # Extract structured data (JSON-LD, OpenGraph, tables) python3 scripts/awp-browse.py extract "https://example.com" # Scroll python3 scripts/awp-browse.py scroll "https://example.com" --direction down
CDP Usage (Puppeteer)
When CDP is needed, connect Puppeteer to the running server:
const browser = await puppeteer.connect({ browserWSEndpoint: 'ws://127.0.0.1:9222' }); const page = await browser.newPage(); await page.goto('https://example.com'); const content = await page.content();
SOM Output Structure
SOM is a structured JSON representation, NOT raw HTML. Key sections:
- regions: Semantic page areas (nav, main, article, sidebar)
- interactive: Clickable/typeable elements with stable ref IDs (e.g.,
,e1
)e12 - content: Text content organized by region
- structured_data: JSON-LD, OpenGraph, microdata extracted automatically
Use ref IDs from
interactive elements for click/type actions.
Performance
| Metric | Plasmate | Chrome |
|---|---|---|
| Per page | 4-5 ms | 252 ms |
| Memory (100 pages) | ~30 MB | ~20 GB |
| Output size | SOM (10-800x smaller) | Raw HTML |
When to Use Plasmate vs Browser Tool
- Plasmate: Speed-critical scraping, batch page processing, token-sensitive extraction, structured data
- Browser tool: Visual rendering needed, screenshots, complex JS SPAs requiring full Chrome engine, pixel-level interaction