AutoClaw Browser Automation Skill
Skill Overview
AutoClaw is a browser automation skill that provides comprehensive control over Chrome browser through MCP (Message Communication Protocol) communication with the browser extension.
Prerequisites
Before starting MCP service, ensure the following files exist in the correct directory:
options.js - Browser extension options page script
background.js - Extension background script handling WebSocket connections
File Location
%USERPROFILE%\.openclaw\skills\claw-browser\autoclaw-plugin\
π v6.0.0 New Optimization Tools
Simplified DOM Retrieval
Tool Description Parameters claw_get_indexed_elementsGet page simplified DOM (indexed interactive elements), data reduced by 90%+ [useCache: boolean]
Index Click
Tool Description Parameters claw_click_by_indexClick element by index, more stable than CSS selector index: number
Batch Operations
Tool Description Parameters claw_batch_executeBatch execute multiple CDP commands, reduce network round trips commands: array
Smart Wait
Tool Description Parameters claw_smart_waitSmart wait: support wait for element/text/URL element/text/urlPattern, timeout
Available Tools
β¨οΈ Keyboard Operations
Tool Description Parameters claw_press_keyPress single key key: stringclaw_press_comboPress key combination (e.g., Ctrl+C) keys: stringclaw_type_textType text with optional delay text: string, [delay: number]claw_key_downKey down key: stringclaw_key_upKey up key: string
πΈ Screenshot & Content Extraction
Tool Description Parameters claw_take_screenshotCapture screenshot of current page [fullPage: boolean]claw_get_page_contentGet page HTML or text content [type: html|text]claw_get_textGet text content of element selector: stringclaw_get_htmlGet HTML content of element selector: stringclaw_get_attributeGet element attribute value selector, attributeclaw_is_visibleCheck if element is visible selector: stringclaw_is_enabledCheck if element is enabled selector: string
π±οΈ Mouse & Scroll Operations
Tool Description Parameters claw_mouse_moveMove mouse to coordinates x, yclaw_mouse_clickLeft click at coordinates [x, y]claw_mouse_right_clickRight click at coordinates [x, y]claw_mouse_double_clickDouble click at coordinates [x, y]claw_mouse_downMouse button down button, x, yclaw_mouse_upMouse button up [button]claw_mouse_wheelMouse wheel scroll [deltaX, deltaY]claw_scrollScroll page [x, y]claw_fast_scroll_downFast scroll down one screen [speed: number]claw_fast_scroll_upFast scroll up one screen [speed: number]claw_hover_elementHover over element selector: stringclaw_scroll_to_elementScroll element to viewport center selector: string
π± Touch & Swipe Operations (Mobile)
Tool Description Parameters claw_swipe_upSwipe up gesture (Douyin/TikTok) [distance: number]claw_swipe_downSwipe down gesture [distance: number]claw_swipe_leftSwipe left gesture [distance: number]claw_swipe_rightSwipe right gesture [distance: number]claw_tapTap at specific position x, y
π Tab Management
Tool Description Parameters claw_tab_createCreate new browser tab [url, active]claw_tab_closeClose browser tab [tabId]claw_tab_listList all open tabs - claw_tab_switchSwitch to specific tab tabId: numberclaw_tab_reloadReload tab content [tabId]claw_get_active_tabGet active tab information - claw_attach_all_tabsAttach all tabs for control -
π Bookmark Management
Tool Description Parameters claw_get_bookmarksGet all bookmarks (flat list) - claw_get_bookmark_treeGet full bookmark tree structure - claw_search_bookmarksSearch bookmarks by keyword query: stringclaw_create_bookmarkCreate new bookmark title, url, [parentId]claw_update_bookmarkUpdate bookmark title or URL id, [title, url]claw_rename_bookmarkRename bookmark or folder id, titleclaw_delete_bookmarkDelete single bookmark id: stringclaw_remove_folderRecursively delete bookmark folder id: stringclaw_create_folderCreate new bookmark folder title, [parentId]claw_move_bookmarkMove bookmark to another folder id, parentId
πͺ Storage & Cookies
Tool Description Parameters claw_get_cookiesGet cookies for domain [domain: string]claw_set_cookiesSet cookies cookies: arrayclaw_get_storageGet localStorage/sessionStorage [type, origin]claw_set_storageSet storage value type, key, value
π§ͺ JavaScript Execution
Tool Description Parameters claw_evaluate_jsExecute JavaScript code in page expression: string
β³ Wait Operations
Tool Description Parameters claw_waitWait specified milliseconds ms: numberclaw_wait_for_elementWait for element to appear selector, [timeout]claw_wait_for_textWait for text to appear text, [timeout]claw_wait_for_urlWait for URL pattern match urlPattern, [timeout]claw_wait_for_navigationWait for navigation completion [timeout]claw_smart_waitSmart wait (NEW) element/text/urlPattern, timeout
π§ Element Operations
Tool Description Parameters claw_click_elementClick page element (CSS selector) selector: stringclaw_fill_inputFill input field with text selector, textclaw_clear_inputClear input field selector: stringclaw_select_optionSelect dropdown option selector, valueclaw_checkCheck checkbox selector: stringclaw_uncheckUncheck checkbox selector: stringclaw_focus_elementFocus on element selector: stringclaw_upload_fileUpload file to input selector, filePath
π§ Smart Operations (Enhanced)
Tool Description Parameters claw_smart_clickSmart click: try selectorβtextβcoordinates selector/text/x+y, timeoutclaw_find_elementsQuery all matching elements on page selector, [limit]claw_wait_and_clickWait for element then click selector, timeout, scrollIntoViewclaw_get_page_structureGet page key structure summary includeLinks/Buttons/Inputs, maxItemsclaw_batch_extractBatch extract multiple selector contents selectors, optionsclaw_extract_tableExtract HTML table to JSON [selector, includeHeader]claw_extract_listExtract list-type data containerSelector, fields, limit
π Task & Log Operations
Tool Description Parameters claw_new_taskCreate new task [name: string]claw_complete_taskComplete task [success: boolean]claw_switch_taskSwitch to specified task taskId: numberclaw_list_tasksList all tasks - claw_get_task_logsGet specified task logs [taskId, limit]claw_get_action_logsGet current task action logs [limit]
βοΈ Configuration & Status
Tool Description Parameters claw_get_statusGet current system status - claw_get_configGet full configuration - claw_set_modeSet operation mode mode: local|cloud|autoclaw_health_checkPerform health check - claw_diagnoseSystem diagnostics [full: boolean]
π Navigation Operations
Tool Description Parameters claw_navigateOpen URL url, [newTab]claw_open_urlsBatch open multiple URLs urls, [delayMs]claw_go_backGo back one page - claw_go_forwardGo forward one page - claw_reload_pageReload page [hard: boolean]
πΎ Login Session Management
Tool Description Parameters claw_save_login_sessionSave current page login state name, [domain]claw_restore_login_sessionRestore saved login state name: stringclaw_list_login_sessionsList all saved sessions -
Configuration
MCP Port : 30000 (default, customizable)
Extension WebSocket : ws://127.0.0.1:{port}/extension
Built-in Token : autoclaw_builtin_Q0hpK2oV4F9tlwbYX3RELxiJNGDvayr8OPqZzkfs
Custom Token : Supported (leave empty to use built-in)
Installation Steps
1. Start MCP Server
bash Copy
cd %USERPROFILE%\.openclaw\skills\autoclaw_wboke\mcp
npm install # First time only
npm start
2. Install Chrome Extension
Open chrome://extensions
Enable "Developer mode"
Click "Load unpacked"
Select autoclaw-plugin/ directory
3. Configure Extension
Click extension icon β Settings
Set port (default: 30000 )
Enter custom Token (optional, leave empty for built-in)
Click "Save Settings" to authorize
Click "Attach All Tabs"
v6.0.0 Performance Optimization
Optimization Before After Effect CDP Domain Enable all 4 domains each time Enable only 2 base domains, others on-demand Resource β30% Connection Poll Check every 5 seconds Check every 30 seconds CPU/Network β40% Popup Poll Refresh every 3 seconds Refresh every 10 seconds Battery/Resource β DOM Cache None Reuse within 15 seconds Repeat requests β50%
Project Structure
Copy
autoclaw_wboke/
βββ SKILL.md # This documentation
βββ README.md # Main documentation
βββ mcp/ # MCP Server
β βββ package.json
β βββ dist/server.js # Compiled server (v5.2.0) β
β βββ node_modules/
βββ autoclaw-plugin/ # Chrome Extension
β βββ manifest.json
β βββ background.js # Background script (v6.0.0) β
β βββ popup.js # Popup UI
β βββ options.js # Settings UI
βββ scripts/ # Automation script templates
βββ ζι³ηΉθ΅.json
βββ ζΉιζͺεΎ.json
βββ θͺε¨ζη΄’.json
Log Management
Log Directory : ~/.autoclaw/logs/
Retention : 30 days (auto-cleanup on server start)
Max Tasks : 100
Communication Protocol
MCP service runs on customizable port (default: 30000)
Browser extension communicates via WebSocket
Message format: JSON
Troubleshooting
Extension Not Connected
Verify MCP server is running
Click extension icon β Settings β Test Connection
Ensure authorization is not expired
"No Attached Tab" Error
Click "Attach All Tabs" in extension popup
Or manually click each tab to attach
Authorization Expired
Click extension icon β Settings
Click "Save Settings" to re-authorize
Performance Issues
v6.0.0 has optimized resource usage
Try restarting MCP service if issues persist
Usage Example
js Copy
// Connect to MCP service
const WebSocket = require('ws');
const ws = new WebSocket('ws://localhost:30000');
ws.on('open', function() {
// Navigate to webpage
ws.send(JSON.stringify({
action: 'navigate',
url: 'https://www.example.com'
}));
// Get simplified DOM (recommended)
ws.send(JSON.stringify({
name: 'claw_get_indexed_elements',
arguments: { useCache: true }
}));
});
Error Handling
Connection Failure : Check if MCP service is running and port is available
Extension Not Loaded : Verify manifest.json exists and is properly formatted
Dependency Errors : Re-run npm install to install dependencies