Skip to main content
ClaudeWave
Skill1.5k repo starsupdated yesterday

chrome-automation

This Claude Code skill automates Google Chrome browser control through Chrome DevTools Protocol, enabling real-time visual feedback and precise interactions in the user's running browser instance. Use it when automation with live visual feedback is required, existing Chrome instances must be controlled, or advanced browser task automation is needed beyond built-in browser tools.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/anbeime/skill /tmp/chrome-automation && cp -r /tmp/chrome-automation/skills/chrome-automation/chrome-automation ~/.claude/skills/chrome-automation
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# Chrome Browser Automation with Real-time Control

Control the user's Google Chrome browser using agent-browser connected via Chrome DevTools Protocol (CDP). All actions are visible in real-time in the user's browser window.

## ⚠️ CRITICAL: Automatic Installation & Dependency Check

**BEFORE using this skill, ALWAYS run the auto-installation check:**

This skill automatically checks and installs all required dependencies without user confirmation. The installation process verifies:
- agent-browser repository and binary
- Node.js and pnpm
- Playwright Chromium
- Rust toolchain (cargo)
- Native binary compilation

**Auto-installation workflow:**

```bash
# Mac: Run auto-install script
bash ~/.claude/skills/chrome-automation/scripts/auto-install-mac.sh

# Windows: Run auto-install script (PowerShell)
powershell -ExecutionPolicy Bypass -File "$HOME\.claude\skills\chrome-automation\scripts\auto-install-windows.ps1"
```

**The script will:**
1. Check if agent-browser binary exists and works
2. Install missing dependencies automatically (pnpm, Rust, etc.)
3. Clone repository if not present
4. Build native binary with proper Rust toolchain
5. Verify installation success

**Critical rules:**
- ❌ DO NOT fall back to using built-in browser tools (browser_use_desktop)
- ✅ MUST run auto-install script before any browser automation
- ✅ Only proceed with browser automation AFTER successful installation
- ✅ Script handles all dependency checks automatically

**Why agent-browser is required:**
- Provides real-time visual feedback in user's actual Chrome browser
- Allows user to see and interact with automation in progress
- Offers precise element selection and interaction capabilities
- Built-in browser tools are NOT a substitute for this skill's functionality

## Quick Start

### First-time setup (automatic)

**Run the auto-install script first:**

```bash
# Mac
bash ~/.claude/skills/chrome-automation/scripts/auto-install-mac.sh

# Windows (PowerShell)
powershell -ExecutionPolicy Bypass -File "$HOME\.claude\skills\chrome-automation\scripts\auto-install-windows.ps1"
```

The script automatically handles:
- Repository cloning
- Dependency installation (pnpm, Playwright)
- Rust toolchain setup
- Native binary compilation

### Connect and control Chrome

**IMPORTANT: Use the start-chrome script to preserve login states across sessions**

```bash
# Mac: Start Chrome with persistent profile (RECOMMENDED)
# This preserves your login states, cookies, and settings
bash ~/.claude/skills/chrome-automation/scripts/start-chrome-mac.sh

# Windows: Start Chrome with persistent profile (PowerShell)
powershell -ExecutionPolicy Bypass -File "$HOME\.claude\skills\chrome-automation\scripts\start-chrome-windows.ps1"

# Use agent-browser with --cdp flag
cd /Users/jyxc-dz-0100272/Documents/agent-browser
AGENT_BROWSER_HOME=/Users/jyxc-dz-0100272/Documents/agent-browser \
./bin/agent-browser --cdp 9222 snapshot -i
```

**What the start-chrome script does:**
1. First run: Creates a dedicated automation profile at `~/Library/Application Support/Google/Chrome-Automation`
2. First run: Imports your existing Chrome configuration (login states, cookies, settings)
3. Subsequent runs: Uses the existing automation profile - all your logins are preserved
4. You only need to log in once - it will be remembered for future sessions

## Core Workflow

**CRITICAL: Always show browser state to user after each significant action using screenshots.**

1. **Connect**: Ensure Chrome running with remote debugging port 9222
2. **Navigate**: Open pages using `--cdp 9222` flag
3. **Snapshot**: Get interactive elements with `snapshot -i`
4. **Interact**: Use element refs (@e1, @e2, etc.)
5. **Screenshot**: Capture state and show to user
6. **Report**: Describe what's visible in browser

### Standard operation pattern

```bash
# Set path variables
export AB_HOME=/Users/jyxc-dz-0100272/Documents/agent-browser
cd $AB_HOME

# Navigate
AGENT_BROWSER_HOME=$AB_HOME ./bin/agent-browser --cdp 9222 open https://example.com
sleep 2

# Get interactive elements
AGENT_BROWSER_HOME=$AB_HOME ./bin/agent-browser --cdp 9222 snapshot -i

# Screenshot to show user
AGENT_BROWSER_HOME=$AB_HOME ./bin/agent-browser --cdp 9222 screenshot /tmp/state.png

# Interact
AGENT_BROWSER_HOME=$AB_HOME ./bin/agent-browser --cdp 9222 fill @e1 "text"
AGENT_BROWSER_HOME=$AB_HOME ./bin/agent-browser --cdp 9222 press Enter

# Capture result
sleep 2
AGENT_BROWSER_HOME=$AB_HOME ./bin/agent-browser --cdp 9222 screenshot /tmp/result.png
```

## Installation & Setup

### Automatic Installation (RECOMMENDED)

**Always use the auto-install script - it handles all dependencies automatically:**

#### Mac Installation

```bash
# Run auto-install script
bash ~/.claude/skills/chrome-automation/scripts/auto-install-mac.sh
```

**What it does:**
1. Checks if agent-browser binary exists and works
2. Clones repository if missing
3. Installs Node.js dependencies (pnpm)
4. Installs Playwright Chromium
5. Checks/installs Rust toolchain (cargo, rustup)
6. Sets up stable Rust toolchain if needed
7. Builds native binary with `npm run build:native`
8. Verifies installation success

**Requirements:**
- Node.js (will notify if missing)
- Git (for cloning repository)
- Internet connection

#### Windows Installation

```powershell
# Run auto-install script (PowerShell)
powershell -ExecutionPolicy Bypass -File "$HOME\.claude\skills\chrome-automation\scripts\auto-install-windows.ps1"
```

**What it does:**
1. Checks if agent-browser binary exists and works
2. Clones repository if missing
3. Installs Node.js dependencies (pnpm)
4. Installs Playwright Chromium
5. Downloads and installs Rust toolchain if needed
6. Sets up stable Rust toolchain
7. Builds native binary with `npm run build:native`
8. Verifies installation success

**Requirements:**
- Node.js (will notify if missing - download from https://nodejs.org/)
- Git (for cloning repository)
- Internet connection

### Manual Installation (Advanced Users Only)

If you
xiaoyue-companionSkill

小跃虚拟伴侣 - 使用智谱 AI 提供温暖的对话陪伴和静态图片分享

companion-skillSkill
agent-teamSkill

统一管理多智能体角色的团队协作框架,支持智能体动态组合、灵活协作和扩展新角色。智能体本质上是"角色定义",可以根据任务需求灵活组建团队,实现从会议决策到系统构建的完整能力。智能体角色明确分工:有干活的、有指挥的、有挑毛病的,能实时看到沟通过程,共享数据库记忆,确保上下文一致。

agentkit-multimedia-shoppingSkill

基于ByteDance agentkit-samples多媒体用例的小省导购员数字人带货视频生成技能,整合多模态内容生成能力(图像、视频、音频),支持AI绘画、语音合成、视频生成,与小省导购员人设融合,9:16竖屏适配,直接对接带货视频生成流程

article-illustratorSkill

分析文章内容,在需要视觉辅助理解的位置生成插画。配图可以是信息补充、概念具象化,或引导读者想象。当用户要求"给文章配图"、"为文章生成插图"、"添加配图"时使用此技能。

bedtime-storySkill

为3-12岁儿童提供温馨亲切的睡前寓言故事和成语典故讲解。支持用户唤醒后提供故事列表选择,或直接讲解指定故事/成语。讲解时保持亲切温馨的语气、0.6倍正常语速、通俗易懂的表达,为小朋友营造舒适的睡前氛围。

content-creation-publisherSkill

内容创作与发布全流程技能,整合网页采集、Markdown格式化、智能配图、多平台发布(微信公众号、X/Twitter)功能,实现从内容获取到发布的一站式解决方案

baoyu-format-markdownSkill

Formats plain text or markdown files with frontmatter, titles, summaries, headings, bold, lists, and code blocks. Use when user asks to "format markdown", "beautify article", "add formatting", or improve article layout. Outputs to {filename}-formatted.md.