baoyu-image-gen
Installation
Summary
Multi-provider AI image generation with text-to-image, reference images, batch processing, and quality presets.
- Supports seven providers: OpenAI, Google, OpenRouter, DashScope, Jimeng, Seedream, and Replicate with automatic provider selection or explicit override
- Handles single images via CLI flags or batch parallel generation from JSON files with configurable worker counts and per-provider throttling
- Supports reference images (Google, OpenAI, OpenRouter, Replicate, Seedream), custom aspect ratios, quality presets (normal/2k), and free-form or fixed sizes depending on provider
- Loads preferences from EXTEND.md (project or user home) for default provider, model, quality, and batch settings; requires first-time setup before any generation
- Reads prompts from text arguments or markdown files; batch mode auto-retries up to 3 times per image and outputs success/failure summaries
SKILL.md
Image Generation (AI SDK)
User Input Tools
When this skill prompts the user, follow this tool-selection rule (priority order):
- Prefer built-in user-input tools exposed by the current agent runtime — e.g.,
AskUserQuestion,request_user_input,clarify,ask_user, or any equivalent. - Fallback: if no such tool exists, emit a numbered plain-text message and ask the user to reply with the chosen number/answer for each question.
- Batching: if the tool supports multiple questions per call, combine all applicable questions into a single call; if only single-question, ask them one at a time in priority order.
Concrete AskUserQuestion references below are examples — substitute the local equivalent in other runtimes.
Script Directory
{baseDir} = this SKILL.md's directory; scripts/... paths are relative to it. Main script: {baseDir}/scripts/main.ts. Batch payload helper: {baseDir}/scripts/build-batch.ts. Resolve ${BUN_X}: prefer bun; else npx -y bun; else suggest brew install oven-sh/bun/bun.
Step 0: Load Preferences (blocking)
No image generation until EXTEND.md exists. Check in order; first hit wins: