Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

baoyu-image-gen

Skill by JimLiu

Generates AI images from text prompts through many providers, including OpenAI, Google, Azure OpenAI and Replicate. It supports reference images, aspect ratios and batch generation from saved prompt files. Built for users who ask their assistant to generate, create or draw images.

  • Score 94
  • 28k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install baoyu-image-gen

Built from the published package, never by AI.

git clone --depth 1 https://github.com/JimLiu/baoyu-skills /tmp/baoyu-skills && mkdir -p ~/.claude/skills && cp -r /tmp/baoyu-skills/skills/baoyu-image-gen ~/.claude/skills/baoyu-image-gen

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install baoyu-image-gen in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

baoyu-image-gen is an agent skill that generates images through a set of AI providers. The source lists OpenAI GPT Image, Azure OpenAI, Google, OpenRouter, DashScope, Z.AI GLM-Image, MiniMax, Jimeng, Seedream, Replicate and Agnes. It supports text-to-image generation, reference images, aspect ratios, explicit sizes and batch generation from saved prompt files. A main script runs through Bun, and the provider can be auto-detected or pinned with a flag or preferences file. Batch mode runs sequentially by default, with a jobs option for parallel workers.

Before the first generation, the skill requires a preferences file named EXTEND.md. A first-time setup collects the provider, model, quality and save location. The skill also includes guidance for keeping a real person or character consistent across reference images. It suits users who ask an assistant to generate, create or draw images, and workflows that produce several prompts at once, such as article illustration output.

Written from the project's SKILL.md and checked against it.

What it can do

  • Text-to-image generationCreates images from a prompt passed with --prompt or read from prompt files.
  • Reference imagesUses one or more source images with --ref, depending on the chosen provider and model.
  • Aspect ratios and sizesSets an output shape with --ar or an explicit width and height with --size.
  • Batch generationGenerates many images from a batch JSON file, with a --jobs worker count.
  • Provider selectionAuto-detects a provider or forces one with --provider, such as openai, google or replicate.
  • Model selectionPicks a model with --model, EXTEND.md defaults or per-provider environment variables.
  • Quality presetsSets normal or 2k quality with --quality, and 1K, 2K or 4K image size for some providers.
  • Batch payload builderBuilds a batch file from an outline and prompts folder using a helper script.
  • JSON outputReturns results as JSON with the --json option.

What you need

  • Bun, or npx to run Bun
  • An API key for the chosen provider, such as OPENAI_API_KEY or GOOGLE_API_KEY
  • An EXTEND.md preferences file, created by first-time setup
  • The codex CLI installed and logged in, only for the codex-cli provider

Try asking

  • Generate an image of a cat in a sunny garden, 16:9, using the default provider
  • Make a batch of images from my saved prompt files with 4 parallel jobs
  • Draw a blue version of this photo using source.png as a reference

Good to know

  • No image generation runs until the EXTEND.md preferences file exists.
  • Reference images are not supported by Jimeng, Seedream 3.0, SeedEdit 3.0, or DashScope models outside the wan2.7-image family.
  • Replicate requires --n 1.
  • A Codex or ChatGPT login is not treated as an OpenAI API key.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/baoyu-image-gen/SKILL.md, skills/baoyu-image-gen/scripts/build-batch.test.ts, skills/baoyu-image-gen/scripts/build-batch.ts, skills/baoyu-image-gen/scripts/codex-imagegen/cache.ts, skills/baoyu-image-gen/scripts/codex-imagegen/logger.ts, skills/baoyu-image-gen/scripts/codex-imagegen/main.ts, skills/baoyu-image-gen/scripts/codex-imagegen/parser.ts, skills/baoyu-image-gen/scripts/codex-imagegen/spawn.ts, skills/baoyu-image-gen/scripts/codex-imagegen/types.ts. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md16 KB
  • references/codex-image2-fallback.md2 KB
  • references/codex-oauth-vs-openai-api-key.md1 KB
  • references/config/first-time-setup.md9 KB
  • references/config/preferences-schema.md3 KB
Show all 49 files
  • references/providers/agnes.md2 KB
  • references/providers/codex-cli.md5 KB
  • references/providers/dashscope.md4 KB
  • references/providers/minimax.md1 KB
  • references/providers/openrouter.md707 B
  • references/providers/replicate.md1 KB
  • references/providers/zai.md953 B
  • references/usage-examples.md5 KB
  • scripts/build-batch.test.ts4 KB
  • scripts/build-batch.ts7 KB
  • scripts/codex-imagegen/cache.ts2 KB
  • scripts/codex-imagegen/logger.ts1 KB
  • scripts/codex-imagegen/main.ts12 KB
  • scripts/codex-imagegen/parser.ts2 KB
  • scripts/codex-imagegen/spawn.ts7 KB
  • scripts/codex-imagegen/types.ts2 KB
  • scripts/codex-imagegen/validator.ts2 KB
  • scripts/main.test.ts18 KB
  • scripts/main.ts45 KB
  • scripts/providers/agnes.test.ts7 KB
  • scripts/providers/agnes.ts5 KB
  • scripts/providers/azure.test.ts5 KB
  • scripts/providers/azure.ts6 KB
  • scripts/providers/codex-cli.test.ts2 KB
  • scripts/providers/codex-cli.ts6 KB

And 19 more files on GitHub.

Alternatives to baoyu-image-gen

All alternatives →

Compare with intelligence-vocabulary, media-use or media_library

baoyu-image-gen: common questions

Which image providers does baoyu-image-gen support?

The source lists OpenAI GPT Image, Azure OpenAI, Google, OpenRouter, DashScope, Z.AI GLM-Image, MiniMax, Jimeng, Seedream, Replicate and Agnes. A codex-cli option is also listed for use with a Codex login.

Can I use a Codex or ChatGPT subscription instead of an API key?

The source says a Codex or ChatGPT login is not an OpenAI API key and must not be pasted into OPENAI_API_KEY. It describes the codex-cli provider as a separate route when the codex CLI is installed and logged in.

How does batch generation work?

Batch mode reads a JSON batch file and runs sequentially by default. The source says parallel generation is available through the --jobs option, with a worker cap set by configuration.

How do I install baoyu-image-gen?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is baoyu-image-gen free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is baoyu-image-gen safe to use?

It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to baoyu-image-gen?

Similar skills: intelligence-vocabulary, media-use, media_library, speak-summary.

baoyu-image-gen Install

Add to stack

Loading.