Get the FREE Ultimate OpenClaw Setup Guide →

grok-search

npx machina-cli add skill kaichen/agent-skillset/grok-search --openclaw
Files (1)
SKILL.md
4.2 KB

Grok Search

Search and research using Grok AI via browser automation with Claude in Chrome MCP.

Prerequisites

  • Claude in Chrome MCP extension installed and configured
  • Logged into grok.com in Chrome

Quick Start

Direct URL Query (Recommended)

Use URL parameters to submit queries directly without manual input:

https://grok.com/?q={your_query}

This automatically submits the query and starts generating results.

Example Workflow

// 1. Create new tab
mcp__claude-in-chrome__tabs_create_mcp()

// 2. Navigate with query parameter
mcp__claude-in-chrome__navigate({
  url: "https://grok.com/?q=your search query here",
  tabId: <tab_id>
})

// 3. Wait for results (typically 5-30 seconds for regular, 1-3 minutes for DeepSearch)
mcp__claude-in-chrome__computer({ action: "wait", duration: 10, tabId: <tab_id> })

// 4. Get page text content
mcp__claude-in-chrome__get_page_text({ tabId: <tab_id> })

// 5. Find and click copy button (aria-label="Copy") or (aria-label="复制") 
mcp__claude-in-chrome__find({ query: "复制 button", tabId: <tab_id> })
mcp__claude-in-chrome__computer({ action: "left_click", ref: "ref_xxx", tabId: <tab_id> })

// 6. Save to file via clipboard
Bash: pbpaste > result.md

Search Modes

Default Mode (Fast)

  • URL: https://grok.com/?q={query}
  • Response time: 5-15 seconds
  • Best for: Quick questions, simple lookups

DeepSearch Mode (Thorough)

  • Requires clicking DeepSearch button before submitting
  • Response time: 1-3 minutes
  • Best for: Research, comprehensive analysis, multi-source information

To enable DeepSearch:

// After navigating to grok.com (without query param)
mcp__claude-in-chrome__find({ query: "DeepSearch button", tabId: <tab_id> })
mcp__claude-in-chrome__computer({ action: "left_click", ref: "ref_xxx", tabId: <tab_id> })
// Then input query and submit

Common Use Cases

1. Real-time X/Twitter Analysis

Query: "24h内中文热门推特在讨论什么"
Query: "What are trending topics on X about AI in the last 24 hours"
Query: "24h内我关注的中文推特时间线里有哪些热门讨论"

2. News and Current Events

Query: "最近24小时内 Claude 相关的信息有哪些"
Query: "Latest news about [topic] in the past 24 hours"

3. Research Topics

Query: "[Topic] 的最新进展和讨论"
Query: "Comprehensive overview of [topic]"

Handling Results

Method 1: Copy Button (Preferred)

// Find copy button using aria-label
mcp__claude-in-chrome__find({ query: "复制 button", tabId: <tab_id> })
// Click to copy content to clipboard
mcp__claude-in-chrome__computer({ action: "left_click", ref: "ref_xxx", tabId: <tab_id> })
// Save from clipboard
Bash: pbpaste > result.md

Method 2: Direct Text Extraction (Fallback)

// If copy button fails, extract text directly
const text = mcp__claude-in-chrome__get_page_text({ tabId: <tab_id> })
// Then save content via Write tool

Tips

  1. Check Generation Status: Look for timing indicators like "思考了 Xs" or "Searching" in page text
  2. Wait Adequately: DeepSearch can take 1-3 minutes; check periodically with get_page_text
  3. Tab Management: Create new tabs for parallel searches
  4. Error Recovery: If extension conflicts occur, try get_page_text as fallback for content extraction
  5. URL Encoding: Complex queries with special characters should be URL-encoded

Troubleshooting

Extension Conflicts

If you encounter "Cannot access a chrome-extension:// URL" errors:

  1. Try navigating to a fresh URL
  2. Use get_page_text instead of screenshot
  3. Create a new tab and retry

Results Not Loading

  1. Increase wait time
  2. Check if Grok is still generating (look for loading indicators)
  3. Verify you're logged into grok.com

Copy Button Not Working

  1. Use get_page_text to extract content directly
  2. Format and save the text content manually

Source

git clone https://github.com/kaichen/agent-skillset/blob/main/plugins/grok-search/skills/grok-search/SKILL.mdView on GitHub

Overview

Grok-search enables live web research by driving Grok AI through browser automation in Claude in Chrome MCP. It supports quick lookups and deep, multi-source analysis, including real-time X/Twitter trends and current events. Use direct URL queries or DeepSearch to gather comprehensive insights.

How This Skill Works

The skill uses the Claude in Chrome MCP extension to open Grok, submit queries via a direct URL or in-page input, and then waits for results. For deeper analysis, you can enable DeepSearch and extract results either by copying content with the Copy button or by retrieving page text directly with get_page_text.

When to Use It

  • Real-time X/Twitter data analysis and trending topics
  • News and current events research within the last 24 hours
  • Comprehensive research topics requiring multi-source information
  • Quick lookups for fast answers
  • In-depth topic exploration with DeepSearch

Quick Start

  1. Step 1: Create a new tab with mcp__claude-in-chrome__tabs_create_mcp()
  2. Step 2: Navigate to grok.com with your query: mcp__claude-in-chrome__navigate({ url: "https://grok.com/?q=your search query here", tabId: <tab_id> })
  3. Step 3: Wait for results and copy content to clipboard via the Copy button or extract text with get_page_text()

Best Practices

  • Use Default Mode for fast questions; switch to DeepSearch for thorough research
  • Open multiple Grok searches in separate tabs for parallel results
  • Prefer the Direct URL Query method for speed when possible
  • Copy results to clipboard or use get_page_text for reliable extraction
  • Encode complex queries to ensure reliable URL submission

Example Use Cases

  • Query: 24h内中文热门推特在讨论什么 (Real-time X/Twitter analysis in Chinese)
  • Query: What are trending topics on X about AI in the last 24 hours
  • Query: 最近24小时内 Claude 相关的信息有哪些 (News on Claude in the last 24 hours)
  • Query: [Topic] 的最新进展和讨论 (Comprehensive progress and discussions on [Topic])
  • Query: Comprehensive overview of [Topic] using DeepSearch (in-depth research)

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers