baoyu-image-gen

Generates images via OpenAI, Google, DashScope, Replicate, and other image generation APIs.

2|Updated May 30, 2026
One-click install
npx skills add https://github.com/virahitvin8/crafty-gis --skill baoyu-image-gen-virahitvin8
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: baoyu-image-gen
Source: https://github.com/virahitvin8/crafty-gis/tree/main/GIT_STAR/assignment-generator/antigravity-skills-main/antigravity-skills-main/skills/baoyu-image-gen
Command: npx skills add https://github.com/virahitvin8/crafty-gis --skill baoyu-image-gen-virahitvin8

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Generating images through multiple AI provider APIs requires juggling different authentication schemes, model IDs, size rules, and reference-image capabilities. This Skill unifies text-to-image and reference-based image generation behind one CLI with automatic provider detection, retries, and batch parallelism. ## Core Features & Use Cases - Multi-Provider Generation: Supports OpenAI GPT Image 2, Azure OpenAI, Google, OpenRouter, DashScope, Z.AI, MiniMax, Jimeng, Seedream, Replicate, and a Codex CLI provider, with automatic provider selection based on available API keys. - Reference-Image Identity Preservation: Accepts reference images on ref-capable providers and provides prompting guidance to preserve subject identity across generations. - Batch Parallel Generation: Runs multi-image jobs from a JSON batch file with configurable worker counts, per-provider rate limits, and up to 3 retries per image. - Use Case: A content team saves finalized prompts from an article outline, builds a batch.json with scripts/build-batch.ts, and generates all illustrations in parallel through Replicate with consistent aspect ratio and quality settings. ## Quick Start Ask the agent to generate an image of your subject with your chosen aspect ratio and save it to a specific file, for example: generate a 16:9 image of a cat and save it as cat.png.

Frequently Asked Questions about baoyu-image-gen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate an image with a specific aspect ratio and quality?

Run scripts/main.ts with --prompt, --image, --ar for the aspect ratio (such as 16:9 or 1:1), and --quality normal or 2k. The default quality preset is 2k, which maps to 2K-class output sizes on supported providers.

Which image generation providers does this CLI support?

It supports OpenAI GPT Image 2, Azure OpenAI, Google, OpenRouter, DashScope, Z.AI GLM-Image, MiniMax, Jimeng, Seedream, Replicate, and a codex-cli provider. Provider auto-detection uses whichever API keys are present in the environment.

Can I use reference images to preserve a person or object identity?

Yes, pass reference files with --ref on ref-capable providers such as Google, OpenAI, Azure, OpenRouter, Replicate, Seedream, MiniMax, or DashScope wan2.7 models. Use short identity-preservation prompts rather than long generic descriptions to avoid synthesizing a new subject.

Why does the OpenAI provider fail when I am logged into Codex or ChatGPT?

The openai provider uses the public OpenAI Images API and requires OPENAI_API_KEY; Codex or ChatGPT OAuth is a separate entitlement. Use --provider codex-cli with a logged-in codex CLI instead, which needs no OpenAI API key.

How do I generate multiple images in parallel from saved prompts?

Create a JSON batch file listing tasks with promptFiles and output paths, then run main.ts with --batchfile and optionally --jobs. Batch mode runs workers in parallel with per-provider rate limits and retries each image up to 3 times.

What are the limitations of the Replicate provider?

Replicate currently requires --n 1 because the skill supports saving exactly one image per request. Reference image support also depends on the specific Replicate model family, such as nano-banana or Seedream.