← 返回
AI智能 中文

Grok Browser

Query Grok AI via browser automation. Use when you need to ask Grok questions, get AI responses, or use Grok's DeepSearch/Think features. Copies response tex...
通过浏览器自动化查询 Grok AI。适用于需要向 Grok 提问、获取 AI 回复或使用 DeepSearch/Think 功能,并将回复文本复制到剪贴板。
easonc13
AI智能 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 1,321
下载
💾 34
安装
1
版本
#latest

概述

Grok Browser Skill

Query Grok (grok.com) via Chrome browser automation and copy responses.

Prerequisites

  • Chrome with Browser Relay extension
  • Use profile=chrome (never profile=clawd)

Quick Start

# 1. Open Chrome with Grok
open -a "Google Chrome" "https://grok.com"
sleep 3

# 2. Attach browser relay
/Users/eason/clawd/scripts/attach-browser-relay.sh

# 3. Check tabs
browser action=tabs profile=chrome

Input Method (IMPORTANT!)

Grok uses contenteditable, not a standard textbox. Use JavaScript evaluate:

// Type query via evaluate
browser action=act profile=chrome targetId=<id> request={
  "kind": "evaluate",
  "fn": "(() => { const editor = document.querySelector('[contenteditable=\"true\"]'); if(editor) { editor.focus(); editor.innerText = 'YOUR_QUERY_HERE'; return 'typed'; } return 'not found'; })()"
}

Then submit with Enter:

browser action=act profile=chrome targetId=<id> request={"kind":"press","key":"Enter"}

Complete Workflow

1. Open Grok & Attach Relay

open -a "Google Chrome" "https://grok.com"
sleep 3
/Users/eason/clawd/scripts/attach-browser-relay.sh

2. Get Tab ID

browser action=tabs profile=chrome

Look for Grok tab, note the targetId.

3. Input Query

browser action=act profile=chrome targetId=<id> request={
  "kind": "evaluate",
  "fn": "(() => { const e = document.querySelector('[contenteditable=\"true\"]'); if(e) { e.focus(); e.innerText = 'What is quantum computing?'; return 'ok'; } return 'fail'; })()"
}

4. Submit

browser action=act profile=chrome targetId=<id> request={"kind":"press","key":"Enter"}

5. Wait for Response

sleep 10-20  # Grok can take 10-30 seconds

6. Snapshot & Find Copy Button

browser action=snapshot profile=chrome targetId=<id>

Look for button with "Copy" in the response area (usually last message).

7. Click Copy

browser action=act profile=chrome targetId=<id> request={"kind":"click","ref":"<copy_button_ref>"}

8. Read Clipboard

pbpaste

Response Detection

After submitting, response is complete when:

  • Copy button appears below the response text
  • Response time indicator shows (e.g., "952ms")
  • Suggested follow-up buttons appear

New Chat for New Topics

Always start fresh chats for unrelated queries to avoid context overflow:

browser action=navigate profile=chrome targetId=<id> targetUrl="https://grok.com"

Or use Cmd+J shortcut:

browser action=act profile=chrome targetId=<id> request={"kind":"press","key":"Meta+j"}

DeepSearch

To enable DeepSearch, click the button before submitting:

# In snapshot, find DeepSearch button
browser action=act profile=chrome targetId=<id> request={"kind":"click","ref":"<deepsearch_ref>"}
# Then type and submit as normal

Troubleshooting

Tab Not Found

Re-run attach script:

/Users/eason/clawd/scripts/attach-browser-relay.sh

Relay Not Working

Check status:

browser action=status profile=chrome

Should show cdpReady: true.

Context Overflow

Navigate to fresh grok.com, don't continue old chats.

Multiple Windows

Close extra Chrome windows. Keep only one for reliable relay.

Copy Button Not Found

Response may still be streaming. Wait longer and snapshot again.

Example Session

# Open and attach
exec: open -a "Google Chrome" "https://grok.com"
exec: sleep 3
exec: /Users/eason/clawd/scripts/attach-browser-relay.sh

# Get tab
browser action=tabs profile=chrome
# Returns targetId: ABC123...

# Type query
browser action=act profile=chrome targetId=ABC123 request={
  "kind":"evaluate",
  "fn":"(() => { const e = document.querySelector('[contenteditable=\"true\"]'); e.focus(); e.innerText = 'Explain quantum entanglement briefly'; return 'ok'; })()"
}

# Submit
browser action=act profile=chrome targetId=ABC123 request={"kind":"press","key":"Enter"}

# Wait
exec: sleep 15

# Snapshot to find Copy button
browser action=snapshot profile=chrome targetId=ABC123
# Find Copy button ref, e.g., e326

# Copy
browser action=act profile=chrome targetId=ABC123 request={"kind":"click","ref":"e326"}

# Read result
exec: pbpaste

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 07:03 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,360 📥 318,618
developer-tools

Sui Move

easonc13
{"answer":"Sui区块链与Move智能合约开发。当用户询问Sui、Move语言、智能合约、对象、交易或Sui上的区块链开发时使用。"}
★ 4 📥 2,260
ai-intelligence

Proactive Agent

halthelobster
将AI智能体从任务执行者升级为主动预判需求、持续优化的智能伙伴。集成WAL协议、工作缓冲区、自主定时任务及实战验证模式。Hal Stack核心组件 🦞
★ 836 📥 213,248