Coding

Chat with Grok models via xAI API. Supports Grok-4, Grok-4.20, Grok-3, Grok-3-mini, vision, and real-time X search.

What it does

Chat with xAI's Grok models. Supports text and vision.

The skill document

xAI / Grok

Chat with xAI's Grok models. Supports text and vision.

Setup

Set your API key in the skill config:

# Via openclaw config
openclaw 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 tasks
  • grok-3-mini - Fast and efficient
  • grok-3-fast - Optimized for speed
  • grok-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)

Related skills

Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.

by Iván854 installs69 stars

figma-use

Official

Run JavaScript against the Figma Plugin API to create, modify, and inspect Figma files from code.

by OpenAI27.5k stars

cli-creator

Official

Scaffold a durable Codex CLI from API docs, OpenAPI specs, curl samples, SDKs, or existing scripts.

by OpenAI27.5k stars

aspnet-core

Official

Pick the right ASP.NET Core app model and follow Microsoft's current guidance for host, pipeline, and features.

by OpenAI27.5k stars

Original p5.js algorithmic art with a written philosophy, interactive viewer, and reproducible seed.

by Anthropic177.2k stars

More from mvanhorn

Browse all skills

Cross-platform research report drawn from the last 30 days of community signals.

by mvanhorn281 installs20 stars

Query and trade on Polymarket prediction markets — check odds, trending markets, search events, view order books, place trades, and manage positions. Now ava...

by Matt Van Horn304 installs24 stars

Real-time X/Twitter search powered by Grok-4. Find tweets, trends, and discussions with citations. Grok-4.20 also returns image results alongside tweet citat...

by mvanhorn275 installs32 stars

Connect to Supabase for SQL queries, CRUD, table management, and vector similarity search using pgvector extension and OpenAI embeddings.

by Matt Van Horn34 installs

Create and manage AI agent tasks via Manus API. Manus 1.5 autonomously browses the web, uses tools, and delivers complete work products. Cost-efficient Manus...

by mvanhorn101 installs4 stars

Headless video rendering with Remotion v5 on any Linux server — no Mac or GUI needed. Templates for chat demos, promos, and more. Uses Chrome Headless Shell...

by mvanhorn137 installs4 stars