baoyu-image-gen Skill: Generate Images With Many AI Providers
Makes your coding assistant generate images through OpenAI, Google, OpenRouter, Replicate and other image APIs from one script.
- Installs
- 33.9K
- on skills.sh
- Stars
- 27.2K
- on GitHub
- Files
- 48
- besides SKILL.md
- Updated
- Nov 2026
- last repo commit
baoyu-image-gen makes your assistant run a bundled script that turns a prompt into an image file. It supports OpenAI, Azure OpenAI, Google, OpenRouter, DashScope, Z.AI, MiniMax, Jimeng, Seedream, Replicate and Agnes, plus reference images, aspect ratios and batch generation from saved prompt files.
You need an API key for a provider, or a logged-in Codex CLI for the codex-cli provider. The script runs with bun or npx -y bun, and the skill will not generate anything until a preferences file exists.
Good for
- Writers and marketers who want cover images and illustrations from a prompt
- Developers who want one command for several image providers
- People who already have an API key and want batch generation from saved prompt files
Install baoyu-image-gen
Claude Code
- 1
Copy this prompt.
Install the baoyu-image-gen skill in Claude Code. Run this command: npx skills add https://github.com/jimliu/baoyu-skills --skill baoyu-image-gen Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
From its listing on skills.sh. Source.
What's in the skill
When it loads
AI image generation with OpenAI GPT Image 2.5, Azure OpenAI, Google, OpenRouter, DashScope, Z.AI GLM-Image, MiniMax, Jimeng, Seedream, Replicate and Agnes APIs. Supports text-to-image, reference images, aspect ratios, and batch generation from saved prompt files. Sequential by default; use batch parallel generation when the user already has multiple prompts or wants stable multi-image throughput. Use when user asks to generate, create, or draw images.
Sections in SKILL.md
- User Input Tools
- Script Directory
- Step 0: Load Preferences ⛔ BLOCKING
- Usage
- Identity-preserving reference prompts
- Reference-Image Identity Preservation
- Options
- Environment Variables
- Codex/ChatGPT OAuth is not an OpenAI API key
- Model Resolution
- OpenAI-Compatible Gateway Dialects
- Provider-Specific Guides
- Provider Selection
- Quality Presets
- Aspect Ratios
- Generation Mode
Key facts
- Installs on skills.sh
- 33,853 as of 2026-11-02
- Last commit to the repo
- 2026-11-01
- Version in SKILL.md
- 2.2.0
- Part of
- The baoyu-skills plugin, which lists 21 skills; the README advises installing only the ones you need
- skills.sh audits
- Gen Agent Trust Hub pass, Socket warn, Snyk pass (2026-11-02)
What it includes
Blocks generation until an EXTEND.md file exists
The skill looks in .baoyu-skills/, the XDG config folder and ~/.baoyu-skills/. If none is found it asks for provider, model, quality and save location, then writes EXTEND.md.
Try: “Generate a 16:9 cover image of a lighthouse at dusk.”
Write ·
Step 0: load preferencesGenerates one image from a prompt
Run with bun or npx -y bun. Options include --ar for aspect ratio, --quality normal or 2k (default 2k), --size WxH, --imageSize 1K, 2K or 4K, --model and --n.
Runs code ·
scripts/main.ts --prompt --imageEdits or restyles from reference images
Supported by Google, OpenAI GPT Image edits, Azure OpenAI (PNG or JPG), OpenRouter multimodal models, Replicate, MiniMax, Seedream and some DashScope models. Not Jimeng.
Files ·
--refForces one of 12 providers
google, openai, azure, openrouter, dashscope, zai, minimax, jimeng, seedream, replicate, codex-cli or agnes. Without it the script picks one from the API keys it finds.
Network ·
--providerUses your Codex login instead of an API key
Runs codex exec through a bundled wrapper. Needs codex on PATH and an active codex login. It is never picked automatically.
Runs code ·
--provider codex-cliGenerates many images from saved prompts in parallel
Starts automatically when a batch file has two or more pending tasks. Each image retries up to 3 times, and the result lists successes and failures.
Runs code ·
--batchfile and --jobsBuilds a batch file from outline.md and a prompts folder
Made for output from the baoyu-article-illustrator skill.
Write ·
scripts/build-batch.tsKeeps a person or object the same across reference images
Use short, firm identity wording, 2 to 4 curated references, and do not feed generated images back in as references unless asked.
Read ·
Identity preservation rulesProvider notes, config schema and usage examples
Provider guides for DashScope, Z.AI, MiniMax, OpenRouter, Replicate, Codex CLI and Agnes, plus first-time setup and usage examples.
Read ·
Reference guides
From the official docs
Permissions
Medium risk
This skill runs a script that uses your image-provider account and sends your prompts and reference images to that provider. Use a key with a spending limit.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
It uses your API key and your provider's billing
The default quality is 2k and batch mode starts up to 10 workers by default. Check your provider's pricing and use a key with a spending limit. github.com
Prompts and reference images leave your machine
The script sends your prompt and any --ref images to the provider. Do not use private photos with a provider you do not trust. github.com
It runs third-party code through bun or npx
The script runs with bun, or with npx -y bun if bun is missing. If neither is found the skill suggests brew install oven-sh/bun/bun. github.com
It writes a preferences file
Step 0 saves EXTEND.md under .baoyu-skills/ in your project or in your home folder. Check it before you commit. github.com
Security advisories
No published security advisories as of Nov 2, 2026.
Technical details
| Turning on read-only | No read-only mode. The script writes the image files you ask for. |
|---|---|
| Talks to | Your chosen image provider: OpenAI, Azure OpenAI, Google, OpenRouter, DashScope, Z.AI, MiniMax, Jimeng or Seedream (Volcengine), Replicate or Agnes. Reference images and prompts you pass go to that provider |
| Sign-in and keys | API keys come from environment variables or .env files at ~/.baoyu-skills/.env and <project>/.baoyu-skills/.env. The codex-cli provider uses your existing codex login. |
| Scopes |
|
Questions
What does baoyu-image-gen do?
It makes your assistant generate images by running a bundled script against image APIs. It handles text-to-image, reference images, aspect ratios and batch jobs from saved prompt files.
How do I install baoyu-image-gen?
Use the install box at the top of this page. The repo holds more than 20 skills, and the README advises installing only the ones you need. You also need bun or npx to run the script.
Do I need an API key?
Yes, for most providers. Set the key for your provider, such as OPENAI_API_KEY, GOOGLE_API_KEY or REPLICATE_API_TOKEN, in the environment or in a .env file in ~/.baoyu-skills/ or the project's .baoyu-skills/ folder. The codex-cli provider uses a Codex login instead.
Can I use my ChatGPT or Codex login instead of an OpenAI key?
Not for the openai provider. The skill says a Codex or ChatGPT login is a different entitlement and must never be pasted into OPENAI_API_KEY. Use --provider codex-cli with a logged-in codex CLI instead.
How much does it cost?
The skill gives no prices. The script uses your own provider account, so that provider's pricing applies, and quality defaults to 2k. Use --quality normal for quick previews, and use a key with a spending limit.
Is baoyu-image-gen safe to use?
It sends your prompts and any reference images to the image provider you pick, and it uses your API key and billing. It also runs a bundled script through bun or npx -y bun. Review the commands, and use a limited key.
Does it work in the Claude app or Codex?
The README documents a Codex project-level install, and the skill has a native path for Codex. It does not document uploading to the Claude app, and the skill runs a script, so it needs an assistant that can run commands.
Information
updated Nov 2, 2026
- Repository
- jimliu/baoyu-skills
- Folder
skills/baoyu-image-gen
Sources
Docs, issue trackers and discussions this page is built from.
Show all 5Hide
- baoyu-image-gen SKILL.md · github.com
- first-time-setup.md · github.com
- baoyu-skills README · github.com
- usage-examples.md · github.com
- codex-oauth-vs-openai-api-key.md · github.com