← 返回 Skills 市场
inphinitiz

Grok Query

作者 InphinitiZ · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
339
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install grok-query
功能描述
Query Grok AI (grok.com) for real-time information via browser automation. Requires: OpenClaw browser enabled, user pre-logged-in to grok.com, and a Grok acc...
使用说明 (SKILL.md)

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.
  3. 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)

# Check if grok.com is already open
openclaw browser tabs

If a grok.com tab already exists, directly switch to it:

openclaw browser focus \x3Cexisting-grok-tab-id>

If not, open a new tab:

openclaw browser open https://grok.com

Both return a target id — keep this for all subsequent calls.

Step 2: Snapshot & Check Page State

openclaw browser snapshot

After taking a snapshot, check for two things before proceeding:

  1. Popups / banners blocking the page (see Step 2a)
  2. 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:

# Find the close/dismiss button ref from snapshot, then click it
openclaw browser click \x3Cclose-button-ref>

# Verify it's gone
openclaw browser snapshot

Or try pressing Escape to dismiss overlays:

openclaw browser press Escape

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:

# Scroll the input box into view (if you know its ref)
openclaw browser scrollintoview \x3Cref>

# Or re-snapshot to check
openclaw browser snapshot

Step 3: Type Question

openclaw browser type \x3Cinput-ref> "What is the latest news about AI?"

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).

# After typing, snapshot to find the send button ref
openclaw browser snapshot

# Click the send button — look for the "Submit" button near the input box
openclaw browser click \x3Csend-button-ref>

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:

# 1. Wait 10 seconds
openclaw browser wait --time 10000

# 2. Snapshot and check for completion
openclaw browser snapshot
# Look for "Regenerate" button → response is done
# If "Stop response" button is still visible → still generating, repeat from step 1

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:

openclaw browser evaluate --fn "(el) => el.src" --ref \x3Cimg-ref>

Multi-turn Conversation

Stay in the same tab to maintain conversation context. Grok understands follow-up questions that reference earlier messages.

# 1. Make sure you're on the correct tab
openclaw browser focus \x3Ctarget-id>

# 2. Snapshot to find the input box (placeholder changes to "Ask anything" in follow-ups)
openclaw browser snapshot

# 3. Type your follow-up question
openclaw browser type \x3Cinput-ref> "What about tomorrow?"

# 4. Snapshot to find the "Submit" button and click it
openclaw browser snapshot
openclaw browser click \x3Csend-button-ref>

# 5. Wait and poll for completion (repeat until "Regenerate" appears)
openclaw browser wait --time 10000
openclaw browser snapshot

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 snapshot, find close button ref, click it; or press Escape
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
安全使用建议
This skill automates your existing Grok web session and will read and interact with whatever is visible in that logged‑in tab. That is necessary for its function but means the skill can capture private Grok conversation content or images if present. No extra credentials or installs are requested, which is good. Before installing: confirm you trust the skill source (there's no homepage and owner ID is unfamiliar), avoid having sensitive accounts or unrelated private data in the same browser profile, and ensure OpenClaw browser permissions are acceptable. If you need stronger assurance, prefer a skill from a known publisher or test it with a throwaway Grok account/browser profile first.
功能分析
Type: OpenClaw Skill Name: grok-query Version: 1.0.0 The skill bundle is designed to query Grok AI using OpenClaw's browser automation capabilities. All commands and instructions in SKILL.md are directly related to navigating grok.com, interacting with its UI (typing, clicking, handling popups), and extracting information (e.g., image URLs via `openclaw browser evaluate --fn "(el) => el.src"`). While the `evaluate` command allows arbitrary JavaScript execution within the browser context, the provided example is benign and serves a legitimate purpose. There is no evidence of intentional harmful behavior such as data exfiltration, malicious execution, persistence, or prompt injection against the agent to perform unauthorized actions. The instructions are clear and align with the stated goal.
能力评估
Purpose & Capability
Name/description say it will query grok.com via browser automation and the SKILL.md only uses OpenClaw browser commands (open, focus, snapshot, click, type, evaluate). No unrelated binaries, env vars, or config paths are requested — this is proportionate to the stated purpose.
Instruction Scope
Instructions explicitly require a pre-logged-in Grok session and direct the agent to read page content, click buttons, extract image URLs, and run small evaluate JS snippets on the page. These actions are expected for browser automation, but they do give the skill access to any data visible in the user's Grok session (including private chat content or account-specific info). The instructions do not attempt to read unrelated local files or other external services.
Install Mechanism
No install spec and no code files are present (instruction-only). Nothing is downloaded or written to disk by the skill itself, which is the lowest-risk install profile.
Credentials
The skill requests no environment variables, credentials, or config paths. The only prerequisite is that the OpenClaw browser is enabled and the user is already logged into grok.com — which is reasonable and proportionate to the task.
Persistence & Privilege
The skill is not marked always:true and does not request elevated or persistent platform-wide privileges. It can be invoked autonomously (platform default), which is expected for a skill but not by itself a concern given the narrow scope.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install grok-query
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /grok-query 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of grok-query skill. - Enables real-time querying of Grok AI (grok.com) via browser automation. - Requires the user to be pre-logged-in to Grok in an OpenClaw browser. - Supports both single and multi-turn conversational research, including handling news, real-time info, and external knowledge verification. - Includes robust error handling and step-by-step workflow for interacting with Grok’s web interface, including popup management and interface element detection. - No SuperGrok subscription required; works with free-tier accounts.
元数据
Slug grok-query
版本 1.0.0
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Grok Query 是什么?

Query Grok AI (grok.com) for real-time information via browser automation. Requires: OpenClaw browser enabled, user pre-logged-in to grok.com, and a Grok acc... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 339 次。

如何安装 Grok Query?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install grok-query」即可一键安装,无需额外配置。

Grok Query 是免费的吗?

是的,Grok Query 完全免费(开源免费),可自由下载、安装和使用。

Grok Query 支持哪些平台?

Grok Query 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Grok Query?

由 InphinitiZ(@inphinitiz)开发并维护,当前版本 v1.0.0。

💬 留言讨论