116
GitHub Stars
4
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill einverne/dotfiles --skill gemini-image-gen- .env.example123 B
- README.md7.0 KB
- SKILL_CREATION_SUMMARY.md8.4 KB
- SKILL.md7.0 KB
Overview
This skill guides implementation of Google Gemini image generation using the gemini-2.5-flash-image model to create high-quality images from text prompts and source images. It provides setup instructions, example code, and practical features like text-to-image, image editing, multi-image composition, and iterative refinement. The skill includes prompt engineering and safety configuration guidance to produce reliable outputs for documentation, design, and creative projects.
How this skill works
The skill uses the Google GenAI client to call the gemini-2.5-flash-image model, passing text prompts and optional image inputs to generate image outputs. It supports response modalities for image-only, text-only, or combined outputs and exposes configuration for aspect ratios, safety settings, and output handling. Helper scripts handle API key detection and save generated images to a standardized assets directory for easy integration.
When to use it
- Generate visuals from descriptive text prompts for documentation or marketing.
- Edit existing images by adding, removing, or restyling elements.
- Compose multiple source images into a single cohesive scene.
- Iteratively refine images via conversational edits until the desired result is reached.
- Implement text-to-image features in web apps, design tools, or content pipelines.
Best practices
- Store GEMINI_API_KEY in environment variables or a project .env file and verify before running.
- Structure prompts with subject, context, and style; include quality modifiers like “4K” or “HDR”.
- Prefer generating text descriptions separately when precise text rendering is required.
- Limit source images to three for composition and keep prompts concise to avoid token limits.
- Save outputs to ./docs/assets/ and use timestamped filenames for reproducibility.
Example use cases
- Produce banner images at 16:9 for website headers or product pages.
- Create social avatars and thumbnails at 1:1 with specific stylistic directions.
- Modify a photo by adding objects or changing lighting while preserving composition.
- Combine background and foreground source images into a single illustrated scene.
- Automate image generation for documentation screenshots, diagrams, or concept art.
FAQ
The skill checks GEMINI_API_KEY from environment variables, a skill-level .env, then a project .env file in that order.
What aspect ratios and resolutions are supported?
Common presets include 1:1 (1024×1024), 16:9 (1344×768), 9:16 (768×1344), 4:3 (1152×896), and 3:4 (896×1152); each has associated token costs.
Can I edit images with text instructions?
Yes—pass an existing image plus an instruction string to modify elements, style, or composition in the same generate call.