baoyu-image-gen_skill

This skill generates high-quality images using OpenAI and Google APIs with prompts, references, aspect ratios, and quality presets.
  • Go

162

GitHub Stars

3

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 smallnest/langgraphgo --skill baoyu-image-gen

  • package-lock.json24.7 KB
  • package.json377 B
  • SKILL.md7.1 KB

Overview

This skill provides CLI-driven image generation using official OpenAI and Google APIs via an AI SDK. It supports text-to-image, reference-image editing, aspect ratios, size presets, and quality levels for quick, reproducible image outputs. The tool auto-selects provider based on available keys but allows explicit provider and model selection.

How this skill works

Scripts in the scripts/ directory expose a main CLI that accepts prompt text, prompt files, reference images, output path, and generation options. The CLI picks a provider (OpenAI or Google) based on flags and available API keys, maps quality/aspect settings to provider parameters, calls the respective SDK image endpoints, saves images, and can print JSON metadata. It retries once on failure and warns/ignores incompatible options like references with image-only models.

When to use it

  • Generate single or batch images from plain prompts or prompt files.
  • Create variants with specific aspect ratios or exact sizes for cover art, banners, and social posts.
  • Produce higher-resolution outputs (2k) for presentations or infographics.
  • Edit images using reference files when using Google multimodal models.
  • Integrate image generation into agent workflows where OpenAI or Google APIs are available.

Best practices

  • Prepare prompts in dedicated files for complex or repeatable scenes and pass them with --promptfiles for consistency.
  • Specify --image to set the exact output path; use --json for machine-readable results in pipelines.
  • Pick quality presets: use normal for quick iterations and 2k for final assets requiring more detail.
  • When both API keys exist, set --provider explicitly if you need a specific model behavior.
  • Provide --ref only when using Google multimodal models; the CLI will warn and ignore refs for image-only models.

Example use cases

  • Generate a 2.35:1 cover image for an article with --ar 2.35:1 and --quality 2k.
  • Create square social media images with --ar 1:1 for Instagram posts.
  • Edit a photo by supplying --ref original.png and a targeted prompt with --provider google.
  • Batch-produce illustrated scenes by supplying multiple prompt files via --promptfiles.
  • Run CI tasks that emit JSON metadata by adding --json for automated asset ingestion.

FAQ

If you don't set --provider, the tool uses the provider selection rules: use the only available API key, or default to Google when both keys exist.

How do I include multiple reference images?

Pass multiple files to --ref (e.g., --ref a.png b.png). Reference images are supported for Google multimodal models; other providers will ignore them with a warning.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational