baoyu-image-gen

Generate images via OpenAI, Google, DashScope, Replicate, and other image APIs from CLI scripts.

1|Updated Feb 2, 2026
One-click install
npx skills add https://github.com/rockcookies/skills --skill baoyu-image-gen-rockcookies
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: baoyu-image-gen
Source: https://github.com/rockcookies/skills/tree/main/skills/baoyu/baoyu-image-gen
Command: npx skills add https://github.com/rockcookies/skills --skill baoyu-image-gen-rockcookies

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? It provides a single CLI workflow for AI image generation across many providers, so you do not have to write separate integration code for each image API or manually manage batch generation, retries, and provider quirks. ## Core Features & Use Cases - Multi-provider generation: Text-to-image and reference-image generation through OpenAI GPT Image, Azure OpenAI, Google, OpenRouter, DashScope, Z.AI, MiniMax, Jimeng, Seedream, Replicate, Codex CLI, and Agnes. - Batch parallel generation: Run multi-image jobs from a JSON batch file with configurable worker counts, per-provider rate limits, and automatic retries. - Persistent preferences: Store default provider, model, quality, and aspect ratio in an EXTEND.md config resolved per project or per user. - Use Case: After drafting an article outline with per-illustration prompt files, build a batch.json with build-batch.ts and generate all illustrations in parallel with consistent aspect ratio and quality settings. ## Quick Start Ask the agent to generate an image of your subject with the baoyu-image-gen skill, specifying the output path, aspect ratio, and provider if you have a preference.

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 (e.g. 16:9), and --quality normal or 2k. The CLI maps these to each provider's native size or aspect-ratio parameters, and you can override with --size WxH or --imageSize 1K/2K/4K.

How do I generate multiple images in batch from prompt files?▼

Create a JSON batch file listing tasks with promptFiles and output paths, then run main.ts with --batchfile and --jobs. Use scripts/build-batch.ts to assemble the batch file automatically from an outline.md plus a prompts directory.

Which providers support reference images for identity preservation?▼

Reference images work with Google multimodal, OpenAI GPT Image edits, Azure OpenAI, OpenRouter multimodal models, Replicate supported families, MiniMax subject-reference, Seedream 4.0/4.5/5.0, DashScope wan2.7-image models, Codex CLI, and Agnes. Jimeng and SeedEdit 3.0 do not support references.

Can I use my Codex or ChatGPT login instead of an OpenAI API key?▼

Not through the openai provider, which requires OPENAI_API_KEY for the public Images API. Use --provider codex-cli instead, which spawns the bundled codex-imagegen wrapper through the logged-in codex CLI and needs no OpenAI API key.

Why does generation fail with missing API key errors?▼

Each provider needs its own credential, such as GOOGLE_API_KEY, DASHSCOPE_API_KEY, or ARK_API_KEY. Set them in the environment or in a .baoyu-skills/.env file in your project or home directory; the CLI auto-detects the provider from available keys.

What are the limitations of batch parallel generation?▼

Batch mode applies per-provider concurrency caps and start-interval throttling, retries each image up to 3 attempts, and Replicate tasks must use --n 1 since only single-image saves are supported. Worker count defaults to 10 and can be tuned via config or environment variables.