# Browser Setup

Configure the browser tool for Clacky.

- Repository: https://github.com/clacky-ai/openclacky (1209 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add clacky-ai/openclacky --skill browser-setup -g -a claude-code -y`
Codex: `npx skills add clacky-ai/openclacky --skill browser-setup -g -a codex -y`
Cursor: `npx skills add clacky-ai/openclacky --skill browser-setup -g -a cursor -y`
Gemini CLI: `npx skills add clacky-ai/openclacky --skill browser-setup -g -a gemini-cli -y`

## Description

Configure the browser tool for Clacky. Guides the user through Chrome or Edge setup, verifies the connection, and writes ~/.clacky/browser.yml. Supports macOS, Linux, and WSL (Windows Chrome/Edge via remote debugging). Trigger on: "browser setup", "setup browser", "配置浏览器", "browser config", "browser doctor". Subcommands: setup, doctor.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Browser Setup Skill

Configure the browser tool for Clacky. Config is stored at `~/.clacky/browser.yml`.

## Region-Aware Download Links

Whenever you show the user a link to download or upgrade Chrome/Edge, pick the right one for their region instead of always using google.com.

Treat the user as **in China** when any of these is true:
- The user is talking to you in Chinese
- The system locale is Chinese (`echo $LANG` contains `zh_CN` / `zh_`)
- A previous run of `install_browser.sh` reported `Region: china` (visible in its output)
- `curl -s --max-time 3 https://www.google.com -o /dev/null -w "%{http_code}"` returns `000` while baidu.com works

Use these links accordingly:

| Region | Chrome | Edge |
|---|---|---|
| China | https://www.google.cn/chrome/ | https://www.microsoft.com/zh-cn/edge |
| Global | https://www.google.com/chrome/ | https://www.microsoft.com/edge |

When unsure, show **both** lines (label them "China:" and "Global:") so the user can pick.

## Command Parsing

| User says | Subcommand |
|---|---|
| `browser setup`, `配置浏览器`, `setup browser` | setup |
| `browser doctor` | doctor |

If no subcommand is clear, default to `setup`.

---

## `setup`

**Core Strategy**: Progressive validation with clear next steps at each failure point.

### Step 1, Ensure Node.js is installed

Check Node.js version:
```bash
node --version 2>/dev/null
```

Parse the version. If Node.js is missing or version < 20:

Run the bundled installer to automatically install Node.js:
```bash
bash ~/.clacky/scripts/install_browser.sh
```

If the script exits 0 → Node.js is now installed. Proceed to Step 2.

If the script exits non-zero or doesn't exist:

> ❌ Node.js 20+ is required for browser automation.
>
> Please install Node.js from: https://nodejs.org
>
> Let me know when done and I'll continue.

Wait for user confirmation, then retry this step once. If still failing, stop.

### Step 2, Ensure chrome-devtools-mcp is installed

The rest: https://github.com/clacky-ai/openclacky/blob/HEAD/lib/clacky/default_skills/browser-setup/SKILL.md
