xai
Chat with Grok models via xAI API. Supports Grok-3, Grok-3-mini, vision, and more.
Why use this skill?
Use the xAI skill to chat with Grok-3, perform real-time X/Twitter searches, and analyze images directly within the OpenClaw environment.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/mvanhorn/xaiWhat This Skill Does
The xAI skill enables deep integration between the OpenClaw agent and xAI’s powerful Grok language models. It provides a robust interface for text generation, visual perception, and real-time social media research. By utilizing the xAI API, the agent can leverage high-reasoning models like Grok-3 to process complex queries, summarize technical documentation, or generate code. A standout feature of this skill is the built-in integration with the X (formerly Twitter) platform, allowing the agent to perform real-time searches for current events, technical trends, or specific user updates directly through the x_search tool. The skill is designed with modularity in mind, offering dedicated scripts for chatting, model management, and social research, ensuring that users have fine-grained control over how the agent interacts with these advanced AI services.
Installation
To integrate this skill into your environment, use the OpenClaw installation command:
clawhub install openclaw/skills/skills/mvanhorn/xai
Once installed, you must obtain an API key from the xAI console (https://console.x.ai). Configure your local environment by exporting the XAI_API_KEY variable:
export XAI_API_KEY="xai-YOUR-KEY"
Use Cases
This skill is ideal for tasks requiring real-time information or high-level reasoning. Use it for analyzing current sentiment on X, obtaining summaries of breaking news, or performing complex reasoning tasks that benefit from Grok’s unique model capabilities. The vision capabilities make it excellent for developers needing to interpret UI layouts or analyze image-based data, while the model-switching capability allows users to toggle between the high-performance 'grok-3' and the high-speed 'grok-3-mini' depending on the latency requirements of the specific task.
Example Prompts
- "Use the xAI skill to search for the latest updates on the OpenClaw framework from @openclaw_hq."
- "Analyze this screenshot of the dashboard using the vision capabilities and summarize the current system load."
- "Summarize the last 7 days of discussions on X regarding 'AI agent security' using the search tool."
Tips & Limitations
- Model Selection: Always choose
grok-3-minifor fast, lightweight tasks to conserve API costs and reduce response latency. - Search Precision: Use the
--handlesand--daysflags insearch-x.jsto avoid noise and narrow down results effectively. - Security: This skill operates via the
api.x.aiendpoint only. It does not access your private filesystem; the--imageflag strictly filters for valid image formats. Ensure yourXAI_API_KEYis kept secure and never committed to version control.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-mvanhorn-xai": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, file-read, external-api
Related Skills
supabase
Query Supabase projects - count users, list signups, check stats. Use for database queries and user analytics.
spotify-web-api
Spotify control via Web API - playback, history, top tracks, search. Cross-platform (no Mac required).
granola
Access Granola AI meeting notes - CSV import, shared note fetching, and MCP-ready for upcoming API support.
remotion-server
Headless video rendering with Remotion. Works on any Linux server - no Mac or GUI needed. Templates for chat demos, promos, and more.
polymarket
Query Polymarket prediction markets - check odds, trending markets, search events, track prices and momentum. Includes watchlist alerts, resolution calendar, momentum scanner, and paper trading (simulated, no real money).