
Baoyu Imagine
Generate product, marketing, and doc illustrations via official image APIs from the agent with aspect ratios, references, and optional batch runs.
Overview
Baoyu Imagine is an agent skill most often used in Build (also Launch, Grow) that generates images through major hosted image APIs with reference and batch options.
Install
npx skills add https://github.com/jimliu/baoyu-skills --skill baoyu-imagineWhat is this skill?
- Multi-provider routing: OpenAI GPT Image 2, Azure, Google, OpenRouter, DashScope, Z.AI, MiniMax, Jimeng, Seedream, Repli
- Text-to-image, reference images, aspect ratios, and batch generation from saved prompt files
- Sequential default with optional parallel batch when multiple prompts exist
- User-input tool priority: AskUserQuestion-style flows with numbered plain-text fallback
- Requires `bun` or `npx` per skill metadata (v1.58.0)
- Skill version 1.58.0
- 10+ named image API backends in the skill description
Adoption & trust: 9.4k installs on skills.sh; 20.9k GitHub stars; 1/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need on-brand visuals for your product or launch but switching between API consoles and chat breaks your agent workflow.
Who is it for?
Solo builders who already have API keys and want one skill to cover many image backends from the agent.
Skip if: Fully offline or proprietary-model-only pipelines with no supported API and no bun/npx on the machine.
When should I use this skill?
User asks to generate, create, or draw images; or when batch parallel generation is needed for multiple existing prompts.
What do I get? / Deliverables
You get generated image assets from your chosen provider with configured aspect ratio, references, or batched prompts without manual API scripting each time.
- Generated image files from configured provider runs
- Batch output set when parallel prompt-file generation is requested
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Build is the primary shelf because founders most often need generated visuals while composing docs, UI mocks, and in-app assets. Docs subphase covers README art, pitch decks, help-center images, and reference-guided assets alongside written deliverables.
Where it fits
Illustrate a README architecture diagram with a reference screenshot and fixed aspect ratio.
Produce placeholder hero art while scaffolding a landing page component.
Quick mock visuals for a clickable prototype pitch without hiring a designer.
Generate social post variants from a saved prompts file in parallel batch mode.
Refresh blog and newsletter headers with the same provider settings you used at ship.
How it compares
An API integration skill for image generation, not a journey-wide brainstorming or brand-strategy methodology.
Common Questions / FAQ
Who is baoyu-imagine for?
Indie builders and agent users who need quick illustrations and marketing art via mainstream cloud image APIs from their coding environment.
When should I use baoyu-imagine?
In Build for docs and UI mock imagery; in Launch for social and store assets; in Grow for content visuals—whenever you ask the agent to generate, create, or draw images.
Is baoyu-imagine safe to install?
It calls third-party APIs and may use network and API keys; review the Security Audits panel on this page and scope keys with least privilege.
SKILL.md
READMESKILL.md - Baoyu Imagine
# Image Generation (AI SDK) Official API-based image generation. Supports OpenAI GPT Image 2, Azure OpenAI, Google, OpenRouter, DashScope (阿里通义万象), Z.AI GLM-Image, MiniMax, Jimeng (即梦), Seedream (豆包) and Replicate. ## User Input Tools When this skill prompts the user, follow this tool-selection rule (priority order): 1. **Prefer built-in user-input tools** exposed by the current agent runtime — e.g., `AskUserQuestion`, `request_user_input`, `clarify`, `ask_user`, or any equivalent. 2. **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. 3. **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. Main script: `{baseDir}/scripts/main.ts`. Resolve `${BUN_X}`: prefer `bun`; else `npx -y bun`; else suggest `brew install oven-sh/bun/bun`. ## Step 0: Load Preferences ⛔ BLOCKING This step MUST complete before any image generation — generation is blocked until EXTEND.md exists. Check these paths in order; first hit wins: | Path | Scope | |------|-------| | `.baoyu-skills/baoyu-imagine/EXTEND.md` | Project | | `${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-imagine/EXTEND.md` | XDG | | `$HOME/.baoyu-skills/baoyu-imagine/EXTEND.md` | User home | - **Found** → load, parse, apply. If `default_model.[provider]` is null → ask model only. - **Not found** → run first-time setup (`references/config/first-time-setup.md`) using AskUserQuestion to collect provider + model + quality + save location. Save EXTEND.md, then continue. Do not generate images before this completes. Legacy compatibility: if `.baoyu-skills/baoyu-image-gen/EXTEND.md` exists and the new path doesn't, the runtime renames it to `baoyu-imagine`. If both exist, the runtime leaves them alone and uses the new path. **EXTEND.md keys**: default provider, default quality, default aspect ratio, default image size, OpenAI image API dialect, default models, batch worker cap, provider-specific batch limits. Schema: `references/config/preferences-schema.md`. ## Usage Minimum working examples — see `references/usage-examples.md` for the full set including per-provider invocations and batch mode. ```bash # Basic ${BUN_X} {baseDir}/scripts/main.ts --prompt "A cat" --image cat.png # With aspect ratio and high quality ${BUN_X} {baseDir}/scripts/main.ts --prompt "A landscape" --image out.png --ar 16:9 --quality 2k # Prompt from files ${BUN_X} {baseDir}/scripts/main.ts --promptfiles system.md content.md --image out.png # With reference image ${BUN_X} {baseDir}/scripts/main.ts --prompt "Make blue" --image out.png --ref source.png # Specific provider ${BUN_X} {baseDir}/scripts/main.ts --prompt "A cat" --image out.png --provider dashscope --model qwen-image-2.0-pro # OpenAI GPT Image 2 ${BUN_X} {baseDir}/scripts/main.ts --prompt "A cat" --image out.png --provider openai --model gpt-image-2 # Batch mode ${BUN_X} {baseDir}/scripts/main.ts --batchfile batch.json --jobs 4 ``` ## Options | Option | Description | |--------|-------------| | `--prompt <