ypfaff/google-image-gen-skill
Overview
This skill generates and edits images using Google’s Gemini API from concise text prompts, reference images, or style templates. It is designed to save outputs into a project-root-relative path and to support aspect ratios, multiple variations, and batch generation. Setup runs a quick environment check and sync before first use.
How this skill works
You run a Python script from the skill directory that calls the Gemini image endpoints with your prompt, optional reference images, and options like aspect ratio or edit mode. Outputs are written to a path relative to the project root (the script prepends the correct project-root prefix). The tool can produce multiple numbered variations, apply a style template, or edit an existing image using an input file and a textual instruction.
When to use it
- Create new images or illustrations from text prompts
- Generate multiple variations for concept exploration
- Edit or replace parts of an existing image with textual instructions
- Produce images that match a reference image or style template
- Export images to a specific project-root folder structure or CI workflow
Best practices
- Run the provided environment check and sync once at session start to ensure API key and dependencies are set
- Always run the script from the skill directory so relative paths are resolved correctly
- Specify output paths relative to the project root; the tool automatically prepends the project-root path
- Use reference images and style templates to keep output consistent with brand or mood
- Prefer paid API tier for higher throughput and fewer rate-limit interruptions
Example use cases
- Generate marketing hero images in a specific aspect ratio for web or social
- Create multiple concept variations for an icon set or illustration brief
- Edit background, sky, or object color in photos via textual instructions
- Produce product renders using a reference image for consistent material and lighting
- Batch-generate thumbnails or artwork saved directly into a repo-friendly folder
FAQ
Place your API key into the environment file indicated by the setup script; run the environment check to confirm it is detected.
How should I specify output paths?
Provide paths relative to the project root; the script prepends the required project-root prefix so files are written to the correct location.