grok-imagine
Generate images and videos using xAI Grok Imagine Extended. Text-to-image, image editing, text-to-video, image-to-video. Use when: user asks to generate, create, or draw an image, or create/animate a video. NOT for: image analysis/understanding (use the image tool instead). Triggers: generate image, create image, draw, grok imagine, make a picture, text to image, generate video, animate, text to video.
Best use case
grok-imagine is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Generate images and videos using xAI Grok Imagine Extended. Text-to-image, image editing, text-to-video, image-to-video. Use when: user asks to generate, create, or draw an image, or create/animate a video. NOT for: image analysis/understanding (use the image tool instead). Triggers: generate image, create image, draw, grok imagine, make a picture, text to image, generate video, animate, text to video.
Teams using grok-imagine should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/grok-imagine-extended/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How grok-imagine Compares
| Feature / Agent | grok-imagine | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Generate images and videos using xAI Grok Imagine Extended. Text-to-image, image editing, text-to-video, image-to-video. Use when: user asks to generate, create, or draw an image, or create/animate a video. NOT for: image analysis/understanding (use the image tool instead). Triggers: generate image, create image, draw, grok imagine, make a picture, text to image, generate video, animate, text to video.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for ChatGPT
Find the best AI skills to adapt into ChatGPT workflows for research, writing, summarization, planning, and repeatable assistant tasks.
AI Agent for YouTube Script Writing
Find AI agent skills for YouTube script writing, video research, content outlining, and repeatable channel production workflows.
AI Agent for Product Research
Browse AI agent skills for product research, competitive analysis, customer discovery, and structured product decision support.
SKILL.md Source
# Grok Imagine Extended (xAI Image & Video Generation)
Generate images and videos from text prompts using the xAI API.
## Image Generation
```bash
python3 {baseDir}/scripts/generate_image.py --prompt "your image description" --filename "output.png"
```
With options:
```bash
python3 {baseDir}/scripts/generate_image.py --prompt "a cyberpunk city at night" --filename "city.png" --resolution 2k --aspect-ratio 16:9
```
## Image Editing
Single source image:
```bash
python3 {baseDir}/scripts/generate_image.py --prompt "make it a watercolor painting" --filename "edited.png" -i "/path/to/source.jpg"
```
Multiple source images (up to 3):
```bash
python3 {baseDir}/scripts/generate_image.py --prompt "combine into one scene" --filename "combined.png" -i img1.png -i img2.png
```
## Video Generation
Text-to-video:
```bash
python3 {baseDir}/scripts/generate_image.py --prompt "a cat walking through flowers" --filename "cat.mp4" --video --duration 5
```
Image-to-video (animate a still):
```bash
python3 {baseDir}/scripts/generate_image.py --prompt "add gentle camera zoom and wind" --filename "animated.mp4" --video -i photo.jpg --duration 5
```
## Models
| Model | Type | Cost |
|-------|------|------|
| `grok-imagine-image` | Image (default) | $0.02/img |
| `grok-imagine-image-pro` | Image (high quality) | $0.07/img |
| `grok-imagine-video` | Video (auto for --video) | $0.05/sec |
Select model with `--model grok-imagine-image-pro`. Video mode always uses `grok-imagine-video`.
## All Options
| Flag | Description |
|------|-------------|
| `--prompt`, `-p` | Text description (required) |
| `--filename`, `-f` | Output path (required) |
| `-i` | Input image for editing/animation (repeatable, max 3 for images, 1 for video) |
| `--model`, `-m` | Image model (default: grok-imagine-image) |
| `--aspect-ratio`, `-a` | 1:1, 16:9, 9:16, 4:3, 3:4, etc. |
| `--resolution`, `-r` | Image: 1k/2k. Video: 480p/720p |
| `--n` | Number of images 1-10 (default 1) |
| `--video` | Generate video instead of image |
| `--duration`, `-d` | Video duration 1-15 seconds (default 5) |
| `--api-key`, `-k` | Override XAI_API_KEY |
## API Key
- `XAI_API_KEY` env var
- Or set `skills."grok-imagine".apiKey` / `skills."grok-imagine".env.XAI_API_KEY` in `~/.openclaw/openclaw.json`
- Or auto-read from `~/keys.txt`
## Notes
- Use timestamps in filenames: `2026-03-01-cyberpunk-city.png`
- The script prints a `MEDIA:` line for OpenClaw to auto-attach on supported chat providers
- Do not read the image back; report the saved path only
- Image URLs from xAI are temporary; the script downloads them immediately
- Video generation is async and polls until done (can take 1-5 minutes)
- 2k resolution returns PNG; 1k returns JPEGRelated Skills
grok-research
Crypto research via Grok model's real-time X/Twitter knowledge. Forwards the user's query as-is to Grok API — no prompt injection, no context bloat. Use when: (1) user asks to research a token's narrative/story/sentiment, (2) user says "调研", "research", "grok research", "查一下叙事", "帮我看看这个币", (3) user wants to know what CT is saying about a token/project. NOT for: price analysis, on-chain data, or trading execution.
grok-scraper
Execute queries to Grok AI via Playwright browser automation without requiring an X API KEY. Use when the user wants to "ask Grok", search X for real-time info, or specifically requests to use Grok for free without API billing.
images_generate_grok
使用 Grok Imagine 生成图片的技能。
---
name: article-factory-wechat
humanizer
Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.
find-skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
tavily-search
Use Tavily API for real-time web search and content extraction. Use when: user needs real-time web search results, research, or current information from the web. Requires Tavily API key.
baidu-search
Search the web using Baidu AI Search Engine (BDSE). Use for live information, documentation, or research topics.
agent-autonomy-kit
Stop waiting for prompts. Keep working.
Meeting Prep
Never walk into a meeting unprepared again. Your agent researches all attendees before calendar events—pulling LinkedIn profiles, recent company news, mutual connections, and conversation starters. Generates a briefing doc with talking points, icebreakers, and context so you show up informed and confident. Triggered automatically before meetings or on-demand. Configure research depth, advance timing, and output format. Walking into meetings blind is amateur hour—missed connections, generic small talk, zero leverage. Use when setting up meeting intelligence, researching specific attendees, generating pre-meeting briefs, or automating your prep workflow.
self-improvement
Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Claude ('No, that's wrong...', 'Actually...'), (3) User requests a capability that doesn't exist, (4) An external API or tool fails, (5) Claude realizes its knowledge is outdated or incorrect, (6) A better approach is discovered for a recurring task. Also review learnings before major tasks.
botlearn-healthcheck
botlearn-healthcheck — BotLearn autonomous health inspector for OpenClaw instances across 5 domains (hardware, config, security, skills, autonomy); triggers on system check, health report, diagnostics, or scheduled heartbeat inspection.