Skip to content
Back to skills

Xai

ASecurity

Chat with Grok models via xAI API. Supports Grok-3, Grok-3-mini, vision, and more.

  • 665 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added February 7, 2026
ai-agentsbashnodeapi

Works with

  • api

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add openclaw/skills --skill xai --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Xai?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Xai
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/openclaw-xai/badge)](https://www.skillsdirectory.com/skills/openclaw-xai)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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:

```bash
# 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
```bash
node {baseDir}/scripts/chat.js "What is the meaning of life?"
```

### Use a specific model
```bash
node {baseDir}/scripts/chat.js --model grok-3-mini "Quick question: 2+2?"
```

### Vision (analyze images)
```bash
node {baseDir}/scripts/chat.js --image /path/to/image.jpg "What's in this image?"
```

### πŸ” Search X/Twitter (Real-time!)
```bash
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
```bash
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)

Files in this skill

  • README.md1.4 KB
  • SKILL.md1.9 KB
  • _meta.json267 B
  • package.json312 B
  • scripts/chat.js6.4 KB
  • scripts/models.js2.2 KB
  • scripts/search-x.js7.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.