openclaw
Summary
OpenClaw provides skills, configuration files, and workspace resources to extend and customize the OpenClaw AI agent framework. This workspace contains a collection of modular skills—including image generation via Google Gemini—as well as supporting scripts and documentation for configuration and usage.
Included Assets
- skills/README.md
Overview of provided skills for OpenClaw. - skills/gemini-image/SKILL.md
Details about thegemini-imageskill, including triggers, configuration, and usage examples. - skills/gemini-image/scripts/generate.js
Node.js script for generating images using Google's Gemini API. Supports text-to-image and image editing workflows. - skills/gemini-image/references/prompts.md
Tips and guidance on prompt engineering for effective image generation with Gemini.
How to Use
1. Configure API Access
Set your Gemini API key via environment variable or CLI flag:
- Environment variable:
export GEMINI_API_KEY=your_api_key - Or pass
--key YOUR_API_KEYwhen running the script.
2. Generate Images
Navigate to the skills/gemini-image/scripts/ directory and run:
node generate.js "a cat sitting on a windowsill"
Supported options:
--keyProvide a Gemini API key--output-dirSet a custom output directory (default: skill_output/)--formatOutput format (png,jpeg, orwebp)--sizeImage dimensions (default: 1024x1024)--inputPath to an input image for editing--outputSet explicit output filename
Example (custom JPEG output):
node generate.js "a city skyline at night" --format jpeg --output-dir ./images
3. Writing Effective Prompts
See skills/gemini-image/references/prompts.md for best practices on prompt structure, style selection, and descriptive keywords.
Notes
- Image generation is powered by Google Gemini (2.0 Flash Preview, "Nano Banana").
- The
gemini-imageskill supports text-to-image, configurable image size/format, and prompt-based image inpainting/outpainting (editing) using the CLI. - Negative prompts are not supported; focus on describing the desired outcome.
- Images are saved to disk in the chosen output directory.
- For editing, use the
--inputflag to specify a base image, and supply a new prompt describing the intended final result.
No comments yet.