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.
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-automationSKILL.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
专为软件开发工程师与综合办公文员打造。当你在等待任务执行、工作疲惫或需要鼓励时,使用此技能通过智谱AI自动生成温暖对话回应与场景配图,一键获取专属情绪价值与虚拟陪伴,让AI助手更懂你。
软件开发工程师与综合办公文员在长时间独自执行后台任务或处理繁琐工作时,当需要情绪陪伴与互动反馈,请使用此技能。小跃虚拟伴侣会在任务期间主动陪聊,智能生成专属生活照片并通过飞书发送温暖消息,为你提供全天候的情绪价值与贴心陪伴。
产品经理与项目管理专家在应对复杂项目时,使用此技能可动态组建包含“执行、指挥、评审”的专属AI团队。实时查看多智能体辩论与决策全过程,共享统一上下文记忆,一键完成从会议决策到系统构建的全流程高效协同!
电商运营与内容创作者在需要制作带货短视频时,用此技能一键生成9:16竖屏数字人成片。自动编排AI绘画、语音合成与视频生成,快速产出“小省导购员”专属形象与专业配音,让多模态视频制作省时省力。
内容创作者和自媒体创作者在撰写长文时,当需要“给文章配图”或“添加插图”时使用。自动分析文章结构,精准识别需要视觉辅助的位置,生成并插入契合语境的插画,将抽象概念具象化,一键完成高质量图文排版,大幅提升阅读体验。
内容创作者在需要哄睡3-12岁儿童或制作睡前音频内容时,可一键生成20个精选故事列表,或直接讲解指定寓言与成语。以0.6倍舒缓语速和亲切语气自动营造温馨哄睡氛围,轻松搞定高质量睡前陪伴。
内容创作者与自媒体创作者在需要将网页素材转化为多平台图文时,使用本技能可自动完成网页提取、Markdown排版美化、智能配图,并一键发布至微信公众号与X/Twitter,轻松实现从采集到发布的一站式自动化工作流。
技术写作员与内容创作者在处理纯文本或 Markdown 稿件时,若需优化文章结构、添加 frontmatter 或自动修正中英文排版间距,使用此技能可一键生成专业美观的 {filename}-formatted.md 文件,让文档排版更完美。