← Back to Skills Marketplace
stanestane

Grok Image Generation

by Stanislav Stankovic · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
35
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install grok-image-generation
Description
Generate new images and edit existing images with xAI Grok Imagine from a local OpenClaw workspace. Use when the user wants Grok/xAI as the image source for...
README (SKILL.md)

Grok Image Generation

Use the local scripts in this skill when the user specifically wants Grok/xAI for image generation or editing.

Quick workflow

  1. Confirm XAI_API_KEY exists in the local environment.
  2. For new images, run scripts/grok_imagine.py generate ....
  3. For edits or variations from source images, run scripts/grok_imagine.py edit ... with one to three --image or --image-url inputs.
  4. Save outputs under a task-specific folder when the user names a destination; otherwise use the default output/grok-images/.
  5. If prompts are weak or generic, read references/prompt-templates.md and improve them before generating.

Commands

Run from the skill directory or give absolute paths.

Generate

py -3 scripts\grok_imagine.py generate "A retro sci-fi poster with a giant moon" --aspect-ratio 2:3 --resolution 2k --n 1

Batch variations

py -3 scripts\grok_imagine.py generate "A clean premium mockup of a horror-movie T-shirt design" --n 4 --aspect-ratio 1:1

Edit one source image

py -3 scripts\grok_imagine.py edit "Turn this into a vintage pulp-poster illustration" --image C:\path	o\source.png --resolution 2k

Combine multiple references

py -3 scripts\grok_imagine.py edit "Place the subject from image one into the lighting and palette of image two" --image C:\path\subject.png --image C:\path\style.png

Prompting rules

  • State what must be preserved before what must change.
  • For products and mockups, prioritize subject accuracy and readability.
  • For T-shirt art, ask for strong silhouette, high contrast, and print-friendly detail.
  • For batches, request meaningful variation in composition, angle, and lighting.
  • For edits, keep the instruction narrow unless the user wants radical transformation.

Read references/prompt-templates.md when you need a starting prompt pattern.

Editing and variations

Treat variation in three ways depending on the job:

  • Same prompt, multiple fresh outputs -> use generate with --n > 1
  • Same image, changed style or cleanup -> use edit with one source image
  • Composite / transfer / merge references -> use edit with two or three source images

Failure handling

  • If xAI returns 403 mentioning credits, licenses, or permissions, stop and tell the user billing/access is the blocker.
  • If returned image URLs are temporary, download them immediately; the script already does this.
  • If xAI changes payload shape, update scripts/grok_imagine.py using references/api-reference.md plus the latest xAI docs.

Resources

  • scripts/grok_imagine.py - local generator/editor wrapper for xAI
  • references/prompt-templates.md - reusable prompt skeletons
  • references/api-reference.md - current endpoint assumptions and payload shapes
Usage Guidance
Install this only if you are comfortable using xAI's remote API. Do not provide private prompts or source images unless you are willing to send them to xAI, and keep the XAI_API_KEY protected. Review or clean the output directory if generated images, prompts, URLs, or response metadata should not be retained.
Capability Tags
requires-sensitive-credentials
Capability Assessment
Purpose & Capability
The stated purpose is Grok/xAI image generation and editing, and the artifacts match that purpose: the script calls xAI image generation/edit endpoints, reads only user-specified edit images, and saves returned images and metadata.
Instruction Scope
Instructions are scoped to user-directed commands and do not include broad workspace scanning or hidden role changes, though the skill could be clearer that local edit images are uploaded to xAI.
Install Mechanism
The package contains markdown guidance, references, and one Python wrapper script; there are no install hooks, dependency installers, startup tasks, or obfuscated setup steps.
Credentials
Use of XAI_API_KEY, outbound requests to api.x.ai, local image reads, and output writes are proportionate for a remote image API wrapper, but users should treat prompts and source images as data sent to a third party.
Persistence & Privilege
There is no background persistence, privilege escalation, credential storage, or automatic execution; the script does persist generated images and full API responses in the chosen output directory.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install grok-image-generation
  3. After installation, invoke the skill by name or use /grok-image-generation
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: xAI Grok image generation and editing skill with prompt templates and local wrapper script.
Metadata
Slug grok-image-generation
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Grok Image Generation?

Generate new images and edit existing images with xAI Grok Imagine from a local OpenClaw workspace. Use when the user wants Grok/xAI as the image source for... It is an AI Agent Skill for Claude Code / OpenClaw, with 35 downloads so far.

How do I install Grok Image Generation?

Run "/install grok-image-generation" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Grok Image Generation free?

Yes, Grok Image Generation is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Grok Image Generation support?

Grok Image Generation is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Grok Image Generation?

It is built and maintained by Stanislav Stankovic (@stanestane); the current version is v1.0.0.

💬 Comments