grok-image
Skill2 starsChanged 4 months agoMITView on GitHub
AI image generation and editing using Grok Imagine models. Use this skill for ANY request to create, generate, draw, design, or edit an image — regardless of whether the user mentions "grok". This includes: - Creating images from text descriptions in any language (中文/English) - Editing existing images (changing backgrounds, style transfer, 二次元化) - Generating logos, banners, illustrations, concept art, avatars - Quick sketches and fast generation mode - Delivering generated images to Feishu/Lark/Telegram Trigger on ANY of these patterns: "生成图片", "画一张", "画个", "帮我画", "AI画图", "出一张图", "来一张", "grok 生图", "grok image", "generate image", "make an image", "draw me", "create a picture", "design a logo", "换背景", "风格转换", "二次元化", "hero banner", or /grok-image. Do NOT trigger for: image compression/resizing/format conversion, OCR/text extraction, screenshot capture, analyzing existing images, or writing image generation code/API calls.
- Reads credentials
2 other projects use a version of this.
Adopted by
Most recently taken up by
- satasuk03/media-gen-skillstheir own version, first seen Apr 29, 2026
- dipaulavs/ClaudeCode-Workspace-2025their own version, first seen Nov 5, 2025
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- satasuk03/media-gen-skills★ 3same name
- dipaulavs/ClaudeCode-Workspace-2025★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- agnes-aiSkill
- auto-approveSkill
- blog-pipelineSkill
- context-monitorSkill
- curator-pipelineSkill
- handoffSkill
- opportunity-radarSkill
- public-apisSkill
- readme-writerSkill
- sentinelSkill
- smart-fetchSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 74
When delivering images, prefer using auto (omit the channel argument) so the image goes back to wherever the request came from.
- Distinctive: line 97
Keep the user's creative intent intact — enhance, don't override.
- Distinctive: line 105
Read the output file to display
- Distinctive: line 114
If all providers fail, suggest trying again later
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Grok Image Generation Skill
Workflow
- Receive description — the user describes what they want in any language
- Craft prompt — translate to English, add style-appropriate quality keywords
- Pick model — choose variant based on need (see Model Selection below)
- Generate — run the script; it handles provider discovery and failover
- Display — Read the output image file to show the user
- Deliver — ALWAYS send to IM after display using
send.shwithautorouting. Only skip if the user explicitly says they don't need delivery, or if running in direct CLI mode with no IM channels configured.
Commands
Generate
bash ${CLAUDE_SKILL_DIR}/bin/generate.sh "<english_prompt>" [size] [model]| Parameter | Required | Default | Options |
| prompt | yes | — | English text |
| size | no | 1024x1024 | 1024x1024, 1024x1792, 1792x1024 |
| model | no | grok-imagine-1.0 | grok-imagine-1.0, grok-imagine-1.0-fast, grok-imagine-1.0-edit |
The script:
- Reads providers from
~/clawd/proxy/config.json - Tries each matching provider, falling back to other grok-imagine variants
- Skips auth errors (401/403), retries on rate limits (429) and timeouts
- Outputs image path to stdout on success, exits 1 on failure
Send to IM
bash ${CLAUDE_SKILL_DIR}/bin/send.sh <image_path> [channel]| Parameter | Required | Default | Options |
| image_path | yes | — | Local file path |
| channel | no | auto | feishu, telegram, discord, all, auto |
Source-aware routing: In auto mode (default), the script reads the claude-to-im
bridge's binding data to detect which channel sent the current request, and routes
the image back to that same channel. If the request came from Telegram, the image
goes to Telegram; if from Feishu, it goes to Feishu. If detection fails (e.g. direct
CLI usage), it falls back to the first available channel.
When delivering images, prefer using auto (omit the channel argument) so the image
goes back to wherever the request came from. Only specify a channel explicitly when
the user asks for a specific destination (e.g. "发到飞书" → feishu, "send to all" → all).
Config in ~/.claude-to-im/config.env:
- Feishu/Lark:
CTI_FEISHU_APP_ID,CTI_FEISHU_APP_SECRET,CTI_FEISHU_ALLOWED_USERS - Telegram:
CTI_TG_BOT_TOKEN,CTI_TG_CHAT_ID - Discord:
CTI_DISCORD_WEBHOOK_URL
Model Selection
- grok-imagine-1.0 — best quality, use by default for most requests
- grok-imagine-1.0-fast — faster but slightly lower quality, good when speed matters
- grok-imagine-1.0-edit — for image modification concepts
Prompt Crafting
Translate the user's idea to fluent English, then add keywords matching the style:
- Photo / Portrait: cinematic photography, ultra realistic, soft bokeh, golden hour lighting
- Illustration / Cartoon: digital illustration, vibrant colors, detailed, trending on artstation
- Concept Art: concept art, highly detailed, dramatic lighting, 8k resolution
Keep the user's creative intent intact — enhance, don't override.
Example
User: "画一张赛博朋克风格的城市夜景"
- Prompt:
"A cyberpunk cityscape at night, neon lights reflecting on wet streets, towering skyscrapers with holographic ads, flying vehicles, cinematic photography, ultra realistic, 8k resolution" bash ${CLAUDE_SKILL_DIR}/bin/generate.sh "A cyberpunk cityscape..." "1024x1024"- Read the output file to display
- ALWAYS deliver:
bash ${CLAUDE_SKILL_DIR}/bin/send.sh /tmp/grok_image_xxx.jpg(auto-routes back to the channel that sent the request) User can specify destination: "发到飞书" →feishu, "send to all" →all
Notes
- Generation takes 5-30 seconds depending on provider and model
- Images save to
/tmp/grok_image_<timestamp>.jpg(cleaned on reboot) - If all providers fail, suggest trying again later
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

