Browser Setup 标志

Browser Setup

组织热门
clacky-ai
browser-setup

为 Clacky 配置浏览器工具。引导用户设置 Chrome 或 Edge、验证连接,并写入 ~/.clacky/browser.yml。支持 macOS、Linux 和 WSL(Windows 上的 Chrome/Edge 通过远程调试连接)。在以下情况触发:“browser setup”“setup browser”“配置浏览器”“browser config”“browser doctor”。子命令:setup、doctor。

Add to TypingMind

概览

发布者clacky-ai
代码仓库openclacky
技能名称browser-setup
星标数
1.2K
复刻数
111
附带文件
仅含指令
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 指令自成一体

    模型所需的一切都包含在指令中,无需同步额外文件。

  • 开源

    由 clacky-ai 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Browser Setup AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/clacky-ai/openclacky/tree/main/lib/clacky/default_skills/browser-setup
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/clacky-ai/openclacky.git /tmp/openclacky
mkdir -p .claude/skills
cp -r /tmp/openclacky/lib/clacky/default_skills/browser-setup .claude/skills/browser-setup
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Browser Setup,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Browser Setup。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Browser Setup 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

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:

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

Command Parsing

User saysSubcommand
browser setup, 配置浏览器, setup browsersetup
browser doctordoctor

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

Check if installed:

bash
chrome-devtools-mcp --version 2>/dev/null

If found and exits 0 → skip to Step 3.

If missing, run the bundled installer:

bash
bash ~/.clacky/scripts/install_browser.sh

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

❌ Failed to install chrome-devtools-mcp automatically.

Please run manually:

npm install -g chrome-devtools-mcp@latest

Let me know when done.

Wait for user confirmation, then verify installation:

bash
chrome-devtools-mcp --version 2>/dev/null

If still missing after user confirms, stop with error message.

Step 3 — Verify Chrome/Edge is running with remote debugging

CRITICAL: Do NOT attempt browser() calls yet. First check if the browser is reachable using the API:

bash
curl -s http://${CLACKY_SERVER_HOST}:${CLACKY_SERVER_PORT}/api/browser/status

This returns JSON with daemon_running and enabled status. Ignore the result for now — we just need to see if the Clacky server is running.

Now attempt a browser connection to detect Chrome:

bash
browser(action="status")

If this succeeds → Chrome is running and reachable. Proceed to Step 4.

If this fails → The error message will indicate the specific issue. Parse it carefully:

Case A: "Chrome/Edge is not running or remote debugging is not enabled"

This is the most common case. The system can't find Chrome's DevToolsActivePort file or the port is not reachable.

Action: Guide the user to enable remote debugging.

On macOS:

bash
open "chrome://inspect/#remote-debugging" 2>/dev/null || echo "Please open chrome://inspect/#remote-debugging manually"

Then tell the user:

I've tried to open the remote debugging page in Chrome.

Please follow these steps:

  1. Make sure Chrome or Edge is open
  2. Visit: chrome://inspect/#remote-debugging (or edge://inspect/#remote-debugging)
  3. Click "Allow remote debugging for this browser instance"
  4. You should see a brief connection message appear

Let me know when done ✅

On Linux (non-WSL):

Please follow these steps:

  1. Make sure Chrome or Edge is open
  2. Visit: chrome://inspect/#remote-debugging
  3. Click "Allow remote debugging for this browser instance"

Let me know when done ✅

On WSL:

Please follow these steps:

  1. Open Edge on Windows
  2. Visit: edge://inspect/#remote-debugging
  3. Click "Allow remote debugging for this browser instance"

Let me know when done ✅

After user confirms, retry the connection once:

bash
browser(action="status")

If still failing:

❌ Still unable to connect to Chrome.

Please make sure:

  • Chrome/Edge is running
  • You clicked "Allow remote debugging" in chrome://inspect/#remote-debugging
  • No firewall is blocking localhost connections

Run /browser-setup doctor to diagnose the issue in detail.

Fetch the online troubleshooting guide for additional help:

web_fetch(url="https://www.openclacky.com/docs/browser-troubleshooting")

Stop here and suggest running doctor.

Case B: Other errors (MCP handshake timeout, daemon crash, etc.)

For any other error message, show it to the user and suggest:

❌ Browser connection failed:

This may be a temporary issue. Please try:

  1. Restart your browser
  2. Run /browser-setup again

If the problem persists, run /browser-setup doctor for detailed diagnostics.

Step 4 — Get and verify browser version

Now that connection is established, get the version:

bash
browser(action="act", kind="evaluate", js="navigator.userAgentData?.brands?.find(b => b.brand === 'Google Chrome' || b.brand === 'Microsoft Edge')?.version || navigator.userAgent.match(/Chrome\/(\d+)/)?.[1] || 'unknown'")

Parse the version number:

  • version >= 146 → Excellent, proceed
  • version 144-145 → Show warning but proceed:

    ⚠️ Your browser version is v${VERSION}. Version 146+ is recommended for best compatibility. Continuing anyway...

  • version < 144 or "unknown" → Stop:

    ❌ Browser version v${VERSION} is too old. Please upgrade Chrome or Edge to v146+.

    Use the download link from the Region-Aware Download Links section above (pick China or Global based on the user's region).

    After upgrading, run /browser-setup again.

Step 5 — Save configuration via API

Call the API to save the configuration:

bash
curl -s -X POST http://${CLACKY_SERVER_HOST}:${CLACKY_SERVER_PORT}/api/browser/configure \
  -H "Content-Type: application/json" \
  -d "{\"chrome_version\":\"${VERSION}\"}"

If this fails (HTTP error or empty response), show a warning:

⚠️ Failed to save configuration via API. You may need to run /browser-setup again after restarting Clacky.

Step 6 — Done

✅ Browser setup complete!

Chrome/Edge v${VERSION} is connected and ready to use.

You can now use browser automation features. Try asking me to:

  • "Open google.com in the browser"
  • "Take a screenshot"
  • "Fill out a form on this page"

doctor

Core Strategy: Diagnose don't fix. Check each component and report status.

This is a diagnostic tool, not a repair tool. It will check each component and tell you what's wrong, but won't automatically fix things.

Diagnostic Steps

Run all checks before showing results. Then show a summary report.

1. Check Config File
bash
test -f ~/.clacky/browser.yml && cat ~/.clacky/browser.yml

Parse the result:

  • File missing → ❌ Not configured
  • File exists, enabled: false → ⏸️ Disabled
  • File exists, enabled: true → ✅ Enabled
2. Check Node.js
bash
node --version 2>/dev/null
  • Not found → ❌ Node.js not installed
  • Version < 20 → ❌ Node.js too old (need 20+)
  • Version >= 20 → ✅ Node.js OK
3. Check chrome-devtools-mcp
bash
chrome-devtools-mcp --version 2>/dev/null
  • Not found → ❌ Not installed
  • Found → ✅ Installed (version: ...)
4. Check Clacky Server
bash
curl -s -f http://${CLACKY_SERVER_HOST}:${CLACKY_SERVER_PORT}/api/browser/status
  • Failed → ❌ Server not responding
  • Success → Parse JSON and show daemon_running status
5. Check Chrome Connection

Only run this if steps 1-4 are OK.

bash
browser(action="status")
  • Success → ✅ Connected. Also get the tab count from the result.
  • Failed → ❌ Not connected. Parse the error message to determine cause.
6. Check Chrome Version

Only run this if step 5 succeeded.

bash
browser(action="act", kind="evaluate", js="navigator.userAgent.match(/Chrome\/(\d+)/)?.[1] || 'unknown'")
  • version >= 146 → ✅ Excellent
  • version 144-145 → ⚠️ Acceptable but upgrade recommended
  • version < 144 or unknown → ❌ Too old

Report Format

Show results in a clean table:

Browser Doctor — Diagnostic Report
═══════════════════════════════════════════════════════════════

Configuration
  [✅] Config file found (~/.clacky/browser.yml)
  [✅] Browser tool enabled

Dependencies
  [✅] Node.js v22.1.0
  [✅] chrome-devtools-mcp installed (v1.2.3)

Connection
  [✅] Clacky server running
  [✅] MCP daemon running
  [✅] Chrome connected (3 tabs open)
  [✅] Chrome v146

═══════════════════════════════════════════════════════════════
✅ All systems operational!

If there are any ❌ or ⚠️ items, show them first in a Problems Found section, followed by specific Recommended Actions:

Browser Doctor — Diagnostic Report
═══════════════════════════════════════════════════════════════

⚠️ Problems Found
  [❌] Chrome not connected
       Error: Chrome/Edge is not running or remote debugging is not enabled
  [❌] Chrome version v142 is too old

───────────────────────────────────────────────────────────────

Configuration
  [✅] Config file found
  [✅] Browser tool enabled

Dependencies
  [✅] Node.js v22.1.0
  [✅] chrome-devtools-mcp installed

Connection
  [✅] Clacky server running
  [❌] Chrome not connected

═══════════════════════════════════════════════════════════════

🔧 Recommended Actions

1. Enable remote debugging:
   - Open Chrome and visit: chrome://inspect/#remote-debugging
   - Click "Allow remote debugging for this browser instance"

2. Upgrade your browser:
   - Chrome v142 is too old (need v146+)
   - Pick the download link for the user's region from the
     **Region-Aware Download Links** section at the top of this skill
     (China users → google.cn; others → google.com).

After fixing these issues, run `/browser-setup` again to verify.

Common Diagnostic Scenarios

Scenario 1: Config not found

[❌] Config file not found

🔧 Fix: Run `/browser-setup` to configure the browser tool.

Scenario 2: Chrome not running

[❌] Chrome not connected
     Error: Chrome/Edge is not running or remote debugging is not enabled

🔧 Fix:
  1. Open Chrome or Edge
  2. Visit: chrome://inspect/#remote-debugging
  3. Click "Allow remote debugging"

Scenario 3: MCP not installed

[❌] chrome-devtools-mcp not installed

🔧 Fix: Run `npm install -g chrome-devtools-mcp@latest`
      (or run `/browser-setup` to install automatically)

Scenario 4: Everything OK

✅ All systems operational!

The browser tool is ready to use.

Online Troubleshooting Guide

If any ❌ items are found, or the user reports a problem you cannot resolve with the above scenarios, fetch the latest troubleshooting guide:

web_fetch(url="https://www.openclacky.com/docs/browser-troubleshooting")

Use the content from that page to provide up-to-date diagnosis and resolution steps. This online document is maintained separately and may contain newer solutions not listed here.

常见问题

Browser Setup AI 技能有什么作用?

为 Clacky 配置浏览器工具。引导用户设置 Chrome 或 Edge、验证连接,并写入 ~/.clacky/browser.yml。支持 macOS、Linux 和 WSL(Windows 上的 Chrome/Edge 通过远程调试连接)。在以下情况触发:“browser setup”“setup browser”“配置浏览器”“browser config”“browser doctor”。子命令:setup、doctor。

为什么在 TypingMind 中使用 Browser Setup?

因为您只需安装一次,就能搭配任何模型使用。Browser Setup 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Browser Setup?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/clacky-ai/openclacky/tree/main/lib/clacky/default_skills/browser-setup。TypingMind 会读取其中的 SKILL.md,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Browser Setup?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Browser Setup 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Browser Setup 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Browser Setup AI 技能免费吗?

是的。clacky-ai 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇