Grok - External Knowledge Query
Use Grok AI to fetch real-time information, latest news, and external knowledge that may not be in your training data.
Prerequisites
Before using this skill, ensure the following:
- 1. OpenClaw browser enabled — verify with:
openclaw browser status
- 2. Logged in to grok.com — the user must have already logged in to grok.com in the OpenClaw browser. This skill cannot handle login flows automatically.
- Grok account — a free-tier Grok account is sufficient for basic queries; SuperGrok is not required.
When to Use This Skill
Activate when the user:
- - Needs real-time information (news, events, product status)
- Wants reasoning and synthesis beyond what
web_search can provide - Needs multi-turn conversational research
- Asks to verify uncertain knowledge against up-to-date sources
Workflow
Step 1: Open Grok (or Reuse Existing Tab)
CODEBLOCK1
If a grok.com tab already exists, directly switch to it:
CODEBLOCK2
If not, open a new tab:
CODEBLOCK3
Both return a target id — keep this for all subsequent calls.
Step 2: Snapshot & Check Page State
CODEBLOCK4
After taking a snapshot, check for two things before proceeding:
- 1. Popups / banners blocking the page (see Step 2a)
- The input box (see Step 2b)
Step 2a: Handle Popups and Banners
Common obstructions:
- - "Upgrade to SuperGrok" banner
- Login prompts
- Cookie consent dialogs
If you see any popup or banner in the snapshot:
CODEBLOCK5
Or try pressing Escape to dismiss overlays:
CODEBLOCK6
Step 2b: Locate the Input Box
The Grok input box is a contenteditable div (ProseMirror editor) at the bottom of the page. In snapshot output, look for a paragraph element with placeholder text such as "How can I help you today?" (or its localized equivalent).
If you can't find the input box:
CODEBLOCK7
Step 3: Type Question
CODEBLOCK8
Step 4: Click Send Button
Important: Grok uses Enter for newline, NOT for sending. You must click the send button (the circular ⬆ icon button to the right of the input box).
CODEBLOCK9
Do NOT use press Enter or --submit — they only insert a newline in Grok's input box.
Step 5: Wait for Response and Capture
While Grok is generating, a "Stop response" button replaces the voice button next to the input box. When it disappears, the response is complete. A "Regenerate" button appearing confirms completion.
Important: Do NOT use wait --text-gone or wait --fn with long timeouts — the browser tool call has a timeout limit and will fail before the wait finishes. Use short waits + snapshot polling instead.
Poll until response is complete:
CODEBLOCK10
Repeat the wait-then-snapshot cycle until you see completion indicators or 5 minutes have elapsed:
- - Done: "Regenerate", "Read aloud", "Copy" buttons appear
- Still generating: "Stop response" button is present, or content is still growing
- Timeout: If 5 minutes pass with no completion, stop polling and inform the user that the Grok response timed out
Note on localized UI: Button text depends on Grok UI language:
- - English: "Stop response" / "Regenerate"
- Chinese: "停止模型响应" / "Regenerate"
Handling Image Responses
If the snapshot contains img elements in the response area (e.g. from Grok's Imagine feature), extract the image URL:
CODEBLOCK11
Multi-turn Conversation
Stay in the same tab to maintain conversation context. Grok understands follow-up questions that reference earlier messages.
CODEBLOCK12
Note: The input box and submit button refs change between turns — always snapshot to get fresh refs before typing or clicking.
Error Handling
| Problem | Solution |
|---|
| Popup / banner blocking | INLINECODE8 , find close button ref, click it; or INLINECODE10 |
| Input box not found |
press Escape, re-
snapshot; or
scrollintoview |
| Login required | Ask user to log in to grok.com manually, then
openclaw browser navigate https://grok.com |
| Page not loading |
openclaw browser navigate https://grok.com or re-open |
| Response incomplete | Increase wait time, take multiple snapshots to confirm |
| Clicked wrong element | Re-
snapshot to get fresh refs |
| "Unknown ref" error | The ref is stale — page has changed since last snapshot. Run a new
snapshot and use refs from that result. Never reuse refs from a previous snapshot. |
| Free tier quota exceeded | Inform user their Grok quota is used up; wait for reset or upgrade to SuperGrok |
| CAPTCHA / human verification | Cannot be automated; ask user to complete it manually, then retry |
| "Something went wrong" mid-response | Re-send the question or reload the page and try again |
| "Continue generating" button | Click the button to resume generation, then continue polling |
| Session expired / redirected to login | Ask user to re-login in the browser, then reload grok.com |
| Multiple grok.com tabs open | Use
tabs to list all, pick the correct one by URL or title |
| DeepSearch UI differs | Completion indicator may differ; poll snapshot and look for source count or result summary instead of "Regenerate" |
| Accidentally opened model selector |
press Escape to close the dropdown, then re-
snapshot |
| Tab closed or browser killed mid-response | Start over:
openclaw browser open https://grok.com and re-send the question |
Common Use Cases
- - Quick fact check: "What is the capital of France?"
- Latest news: "What are the top tech news today?"
- Real-time info: "What's the current status of [event]?"
- Complex research: Break into multiple queries in the same session
Tips
- - Session persistence: Stay in the same tab for multi-turn conversations
- Must click send: Grok's Enter key is newline, always click the ⬆ send button to submit
- Long responses: May need to scroll down and take additional snapshots
- Pre-login: User should be logged in to grok.com beforehand for best results
- Screenshot: Use
openclaw browser screenshot if you need visual confirmation
Alternative: Direct Web Search
For simpler queries, consider using web_search tool first (faster, no browser needed).
Use Grok when you need:
- - Reasoning and synthesis
- Multi-step analysis
- Conversational follow-up
- Complex explanations
Grok - 外部知识查询
使用Grok AI获取实时信息、最新新闻以及训练数据中可能未包含的外部知识。
前置条件
使用此技能前,请确保满足以下条件:
- 1. 已启用OpenClaw浏览器 — 通过以下命令验证:
bash
openclaw browser status
- 2. 已登录grok.com — 用户必须在OpenClaw浏览器中已登录grok.com。此技能无法自动处理登录流程。
- Grok账户 — 免费版Grok账户足以应对基本查询;无需SuperGrok。
何时使用此技能
在以下情况下激活:
- - 用户需要实时信息(新闻、事件、产品状态)
- 用户需要超越web_search所能提供的推理与综合能力
- 用户需要多轮对话式研究
- 用户要求根据最新来源核实不确定的知识
工作流程
步骤1:打开Grok(或复用现有标签页)
bash
检查grok.com是否已打开
openclaw browser tabs
如果grok.com标签页已存在,直接切换到该标签页:
bash
openclaw browser focus
如果不存在,则打开新标签页:
bash
openclaw browser open https://grok.com
两者都会返回一个目标ID——请保留此ID用于后续所有调用。
步骤2:截图并检查页面状态
bash
openclaw browser snapshot
截图后,在继续操作前检查两件事:
- 1. 遮挡页面的弹窗/横幅(参见步骤2a)
- 输入框(参见步骤2b)
步骤2a:处理弹窗和横幅
常见遮挡物:
- - 升级到SuperGrok横幅
- 登录提示
- Cookie同意对话框
如果在截图中看到任何弹窗或横幅:
bash
从截图中找到关闭/关闭按钮的引用,然后点击它
openclaw browser click
确认弹窗已消失
openclaw browser snapshot
或者尝试按Escape键关闭覆盖层:
bash
openclaw browser press Escape
步骤2b:定位输入框
Grok输入框是一个位于页面底部的contenteditable div(ProseMirror编辑器)。在截图输出中,查找带有占位文本(如How can I help you today?或其本地化版本)的paragraph元素。
如果找不到输入框:
bash
将输入框滚动到可视区域(如果知道其引用)
openclaw browser scrollintoview [
]或重新截图检查
openclaw browser snapshot
步骤3:输入问题
bash
openclaw browser type 关于AI的最新新闻是什么?
步骤4:点击发送按钮
重要提示:Grok使用Enter键换行,而非发送。必须点击发送按钮(输入框右侧的圆形⬆图标按钮)。
bash
输入后,截图查找发送按钮引用
openclaw browser snapshot
点击发送按钮——查找输入框附近的Submit按钮
openclaw browser click
不要使用press Enter或--submit——它们在Grok输入框中只会插入换行符。
步骤5:等待响应并捕获
当Grok生成响应时,输入框旁边的语音按钮会替换为Stop response按钮。当该按钮消失时,表示响应完成。Regenerate按钮出现则确认完成。
重要提示:不要使用wait --text-gone或带有长超时的wait --fn——浏览器工具调用有超时限制,会在等待完成前失败。请使用短等待加截图轮询。
轮询直到响应完成:
bash
1. 等待10秒
openclaw browser wait --time 10000
2. 截图并检查是否完成
openclaw browser snapshot
查找Regenerate按钮 → 响应完成
如果Stop response按钮仍可见 → 仍在生成,从步骤1重复
重复等待-截图循环,直到看到完成指示或5分钟已过:
- - 完成:Regenerate、Read aloud、Copy按钮出现
- 仍在生成:Stop response按钮存在,或内容仍在增长
- 超时:如果5分钟过去仍未完成,停止轮询并告知用户Grok响应超时
关于本地化UI的说明:按钮文本取决于Grok UI语言:
- - 英文:Stop response / Regenerate
- 中文:停止模型响应 / Regenerate
处理图片响应
如果截图中响应区域包含img元素(例如来自Grok的Imagine功能),提取图片URL:
bash
openclaw browser evaluate --fn (el) => el.src --ref
多轮对话
保持在同一标签页以维持对话上下文。Grok能够理解引用之前消息的后续问题。
bash
1. 确保在正确的标签页上
openclaw browser focus
2. 截图查找输入框(后续对话中占位文本变为Ask anything)
openclaw browser snapshot
3. 输入后续问题
openclaw browser type 那明天呢?
4. 截图查找Submit按钮并点击
openclaw browser snapshot
openclaw browser click
5. 等待并轮询直到完成(重复直到Regenerate出现)
openclaw browser wait --time 10000
openclaw browser snapshot
注意:输入框和提交按钮的引用在轮次之间会变化——在输入或点击前务必截图获取新的引用。
错误处理
| 问题 | 解决方案 |
|---|
| 弹窗/横幅遮挡 | snapshot,找到关闭按钮引用,click;或press Escape |
| 找不到输入框 |
press Escape,重新snapshot;或scrollintoview |
| 需要登录 | 要求用户手动登录grok.com,然后openclaw browser navigate https://grok.com |
| 页面加载失败 | openclaw browser navigate https://grok.com或重新打开 |
| 响应不完整 | 增加等待时间,多次截图确认 |
| 点击了错误元素 | 重新snapshot获取新的引用 |
| Unknown ref错误 | 引用已过期——自上次截图后页面已变化。运行新的snapshot并使用该结果中的引用。切勿复用之前截图中的引用。 |
| 免费版配额已用尽 | 告知用户Grok配额已用完;等待重置或升级到SuperGrok |
| CAPTCHA/人机验证 | 无法自动化;要求用户手动完成,然后重试 |
| 响应中途出现Something went wrong | 重新发送问题或重新加载页面重试 |
| Continue generating按钮 | 点击按钮继续生成,然后继续轮询 |
| 会话过期/重定向到登录页 | 要求用户在浏览器中重新登录,然后重新加载grok.com |
| 多个grok.com标签页打开 | 使用tabs列出所有标签页,通过URL或标题选择正确的标签页 |
| DeepSearch界面不同 | 完成指示可能不同;轮询截图并查找来源数量或结果摘要,而非Regenerate |
| 意外打开了模型选择器 | press Escape关闭下拉菜单,然后重新snapshot |
| 标签页关闭或浏览器在响应中被终止 | 重新开始:openclaw browser open https://grok.com并重新发送问题 |
常见用例
- - 快速事实核查:法国的首都是什么?
- 最新新闻:今天有哪些顶级科技新闻?
- 实时信息:[事件]的当前状态如何?
- 复杂研究:在同一会话中分解为多个查询
提示
- - 会话持久性:多轮对话保持在同一标签页
- 必须点击发送:Grok的Enter键是换行,始终点击⬆发送按钮提交
- 长响应:可能需要向下滚动并额外截图
- 预登录:用户应事先登录grok.com以获得最佳效果
- 截图:如果需要视觉确认,使用openclaw browser screenshot
替代方案:直接网页搜索
对于更简单的查询,考虑先使用web_search工具(更快,无需浏览器)。
在以下情况下使用Grok:
- - 需要推理和综合
- 需要多步骤分析
- 需要对话式跟进
- 需要复杂解释