4.3k★by mvanhorn
xai – OpenClaw Skill
xai is an OpenClaw Skills integration for coding workflows. Chat with Grok models via xAI API. Supports Grok-3, Grok-3-mini, vision, and more.
Skill Snapshot
| name | xai |
| description | Chat with Grok models via xAI API. Supports Grok-3, Grok-3-mini, vision, and more. OpenClaw Skills integration. |
| owner | mvanhorn |
| repository | mvanhorn/xai |
| language | Markdown |
| license | MIT |
| topics | |
| security | L1 |
| install | openclaw add @mvanhorn/xai |
| last updated | Feb 7, 2026 |
Maintainer

name: xai description: Chat with Grok models via xAI API. Supports Grok-3, Grok-3-mini, vision, and more. homepage: https://docs.x.ai triggers:
- grok
- xai
- ask grok metadata: clawdbot: emoji: "🤖"
xAI / Grok
Chat with xAI's Grok models. Supports text and vision.
Setup
Set your API key in the skill config:
# Via clawdbot config
clawdbot config set skills.entries.xai.apiKey "xai-YOUR-KEY"
# Or environment variable
export XAI_API_KEY="xai-YOUR-KEY"
Get your API key at: https://console.x.ai
Commands
Chat with Grok
node {baseDir}/scripts/chat.js "What is the meaning of life?"
Use a specific model
node {baseDir}/scripts/chat.js --model grok-3-mini "Quick question: 2+2?"
Vision (analyze images)
node {baseDir}/scripts/chat.js --image /path/to/image.jpg "What's in this image?"
🔍 Search X/Twitter (Real-time!)
node {baseDir}/scripts/search-x.js "Remotion video framework"
node {baseDir}/scripts/search-x.js --days 7 "Claude AI tips"
node {baseDir}/scripts/search-x.js --handles @remotion_dev "updates"
Uses xAI Responses API with x_search tool for real X posts with citations.
List available models
node {baseDir}/scripts/models.js
Available Models
grok-3- Most capable, best for complex tasksgrok-3-mini- Fast and efficientgrok-3-fast- Optimized for speedgrok-2-vision-1212- Vision model for image understanding
Example Usage
User: "Ask Grok what it thinks about AI safety" Action: Run chat.js with the prompt
User: "Use Grok to analyze this image" (with attached image) Action: Run chat.js with --image flag
User: "What Grok models are available?" Action: Run models.js
API Reference
xAI API Docs: https://docs.x.ai/api
Environment Variables
XAI_API_KEY- Your xAI API key (required)XAI_MODEL- Default model (optional, defaults to grok-3)
xAI / Grok Skill for Clawdbot
Chat with xAI's Grok models from Clawdbot. Supports text chat, vision, and all Grok models including Grok-4.
Installation
clawdhub install xai
# or
cd ~/clawd/skills && git clone https://github.com/mvanhorn/clawdbot-skill-xai xai
Setup
Get your API key from console.x.ai, then:
clawdbot config set skills.entries.xai.apiKey "xai-YOUR-KEY"
Or set environment variable:
export XAI_API_KEY="xai-YOUR-KEY"
Usage
Chat with Grok
node scripts/chat.js "What is the meaning of life?"
Use specific model
node scripts/chat.js --model grok-4-0709 "Complex question here"
node scripts/chat.js --model grok-3-mini "Quick question"
Vision (analyze images)
node scripts/chat.js --image photo.jpg "What's in this image?"
System prompts
node scripts/chat.js --system "You are a pirate" "Tell me about ships"
List available models
node scripts/models.js
Available Models
grok-3- Capable general modelgrok-3-mini- Fast and efficientgrok-4-0709- Latest Grok 4grok-4-fast-reasoning- Fast with reasoninggrok-2-vision-1212- Image understandinggrok-2-image-1212- Image generation
Clawdbot Integration
Once installed, you can just say:
- "Ask Grok about [topic]"
- "Use Grok to analyze this image"
- "Have Grok 4 explain [concept]"
License
MIT
Permissions & Security
Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.
Requirements
- OpenClaw CLI installed and configured.
- Language: Markdown
- License: MIT
- Topics:
FAQ
How do I install xai?
Run openclaw add @mvanhorn/xai in your terminal. This installs xai into your OpenClaw Skills catalog.
Does this skill run locally or in the cloud?
OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.
Where can I verify the source code?
The source repository is available at https://github.com/openclaw/skills/tree/main/skills/mvanhorn/xai. Review commits and README documentation before installing.
