ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified ai models Safety 4/5

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.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/mvanhorn/xai
Or

What 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

  1. "Use the xAI skill to search for the latest updates on the OpenClaw framework from @openclaw_hq."
  2. "Analyze this screenshot of the dashboard using the vision capabilities and summarize the current system load."
  3. "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-mini for fast, lightweight tasks to conserve API costs and reduce response latency.
  • Search Precision: Use the --handles and --days flags in search-x.js to avoid noise and narrow down results effectively.
  • Security: This skill operates via the api.x.ai endpoint only. It does not access your private filesystem; the --image flag strictly filters for valid image formats. Ensure your XAI_API_KEY is kept secure and never committed to version control.

Metadata

Author@mvanhorn
Stars1335
Views3
Updated2026-02-23
View Author Profile
AI Skill Finder

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 skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-mvanhorn-xai": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#grok#xai#search#vision#llm
Safety Score: 4/5

Flags: network-access, file-read, external-api