xai-grok

Delegate queries to xAI Grok for X search, web search, and code execution.

Updated Oct 24, 2025
One-click install
npx skills add https://github.com/shalomma/social-media-research --skill xai-grok
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xai-grok
Source: https://github.com/shalomma/social-media-research/tree/main/.claude/skills/xai-grok
Command: npx skills add https://github.com/shalomma/social-media-research --skill xai-grok

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires typer, xai-sdk, python-dotenv, and includes scripts (resource) components.

What problem does it solve?

Accessing real-time information from Twitter/X, performing complex web research, and executing code for analysis often requires switching between multiple tools. This Skill centralizes these capabilities through xAI's Grok model, allowing Claude to autonomously find and synthesize information, so you don't have to.

Core Features & Use Cases

  • Real-time X (Twitter) Search: Get up-to-the-minute social media insights, trends, and user data directly from the X platform.
  • Agentic Web Search & Browsing: Grok intelligently searches the web and browses pages to answer complex queries, providing comprehensive and current information.
  • Code Execution: Perform data analysis, calculations, and generate visualizations directly within the AI workflow, streamlining your research.
  • Use Case: Ask Claude to "Analyze the sentiment of recent tweets about a new tech product and summarize key opinions," and Grok will use its tools to deliver a comprehensive report, saving you hours of manual aggregation.

Quick Start

Query Grok for recent tweets about Israeli tech nano-influencers

python3 .claude/skills/xai-grok/src/grok.py "Find recent tweets from Israeli tech nano-influencers"

Use all tools including code execution to analyze tech trends

python3 .claude/skills/xai-grok/src/grok.py "Analyze tech trends with charts" --enable-code-execution

Frequently Asked Questions about xai-grok

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search Twitter and the web in real-time using an AI agent?

Real-time web and Twitter search through an AI agent is performed by delegating queries to xAI Grok, which autonomously executes X search, web search, and code execution tools. Grok synthesizes results into comprehensive answers without requiring you to switch between platforms.

Can I execute code and perform data analysis within an AI workflow?

Code execution within an AI workflow allows you to run calculations, data analysis, and generate visualizations directly during query processing. xAI Grok integrates code execution as a built-in tool, streamlining research and eliminating manual export steps.

What's the best way to gather multi-tool information and synthesize current events analysis?

Multi-tool information gathering is best handled through agentic orchestration, where a single AI model coordinates real-time X search, web browsing, and code execution. This approach centralizes research workflows and delivers cited, comprehensive reports without manual aggregation.

Do I need Python and API credentials to set up real-time search capabilities?

Setting up real-time search requires Python, the xAI SDK, typer for CLI handling, and python-dotenv for credential management. You'll need valid xAI API credentials configured in your environment to enable Grok's search and code execution tools.

How do I analyze sentiment and trends from social media at scale?

Social media sentiment analysis and trend detection are performed by querying Grok with natural language instructions; it searches recent X posts, executes analytical code, and returns structured insights. This approach scales analysis across thousands of posts without manual data collection.

What are the limitations of delegating search and analysis to an AI agent?

Agent-based search depends on real-time data availability from X and web sources, which may be incomplete or rate-limited. Code execution is constrained by available libraries and runtime resources, and citation accuracy relies on the underlying tool responses from xAI Grok.