image-gen: AI Image Generation & Editing for Openclaw

A comprehensive image generation and editing tool for AI agents that supports text-to-image, image-to-image, and automatic file optimization.

zweien
v0.1.0
Mar 11, 2026
0
2.8k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install image-gen-skill

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install image-gen-skill using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is image-gen: AI Image Generation & Editing?

The image-gen skill is a powerful expansion for your collection of Openclaw Skills, designed to provide AI agents with advanced visual creation capabilities. By leveraging the Nano-banana-3.1-Flash API, it allows agents to interpret natural language prompts and transform them into high-fidelity images. This skill is particularly useful for developers who need their agents to not only generate code or text but also create visual assets, modify existing images, and handle the complexities of image compression and storage within a standardized workspace environment.

As part of the broader ecosystem of Openclaw Skills, image-gen focuses on technical reliability and ease of use. It handles the entire lifecycle of an image, from the initial API call to the final delivery in messaging platforms. It features built-in logic for aspect ratio management, image resizing, and multi-format support, making it an essential component for any AI-driven creative workflow.

image-gen: AI Image Generation & Editing Use Cases

  • Creating custom illustrations and marketing assets directly from text prompts.
  • Transforming uploaded photos into new artistic styles such as watercolor, oil painting, or cyberpunk aesthetics.
  • Generating high-resolution background images for web development and UI/UX projects.
  • Automating the production of social media content with specific aspect ratios like 16:9 or 9:16.

How image-gen: AI Image Generation & Editing Works

  1. The AI agent identifies a request for image creation and parses parameters like prompt, size, and aspect ratio.
  2. If a reference image is provided, the skill downloads and converts it to a base64 encoded string for image-to-image processing.
  3. The skill constructs a JSON payload and sends a POST request to the configured image generation endpoint.
  4. Once the API returns a URL, the skill downloads the high-resolution original image to the workspace directory.
  5. An automated compression script checks the file size; if it exceeds 1MB, it iteratively reduces quality and resolution to meet platform limits.
  6. The final optimized image is saved and can be automatically sent to users via integrated communication channels like Feishu.

image-gen: AI Image Generation & Editing Setup

To integrate this into your Openclaw Skills workspace, create a .env file in the skill directory with the following configuration:

# .env configuration
IMAGE_API_BASE_URL=https://api.imyaigc.top
IMAGE_API_KEY=your-api-key-here
IMAGE_MODEL=gemini-3.1-flash-image-preview
IMAGE_SIZE=2K
IMAGE_ASPECT_RATIO=1:1

Ensure that Python 3 and the required dependencies for the compression tool are available in your environment.

image-gen: AI Image Generation & Editing Data Schema & Taxonomy

The skill manages generated assets within a structured directory inside the Openclaw Skills workspace:

Path Purpose Format
~/.openclaw/workspace/img/ Primary storage for all generated visuals Directory
image_{TIMESTAMP}_original.png Unmodified high-quality output from the API PNG
image_{TIMESTAMP}.png Optimized and compressed version for delivery PNG
compress_image.py Utility script for managing file size constraints Python

image-gen: AI Image Generation & Editing Advanced Features

  • Smart Image-to-Image (I2I) capabilities supporting both URL and base64 input formats.
  • Dynamic aspect ratio support ranging from standard 1:1 to ultra-wide 21:9 and panoramic 8:1 formats.
  • Automated image compression engine that intelligently balances JPEG quality and resolution to hit target file sizes.
  • Seamless integration with communication protocols to deliver visual results directly to group chats or individual users.
  • Built-in timestamping and versioning to prevent file name collisions in high-concurrency environments.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*