Skip to content
Development
Skill

/baoyu-image-gen

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

From plugin
open-agent-hub
991105 skills5 agents3 commands6 MCP

Claude Code

$ npx -y skills add guanyang/open-agent-hub --skill baoyu-image-gen --agent claude-code

SKILL.md

baoyu-image-gen.SKILL.md
name: baoyu-image-gen
description: 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.
version: 2.2.0
metadata:
  openclaw:
    homepage: https://github.com/JimLiu/baoyu-skills#baoyu-image-gen
    requires:
      anyBins:
        - bun
        - npx

Image Generation (AI SDK)

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; `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:

| Path | Scope | |------|-------| | `.baoyu-skills/baoyu-image-gen/EXTEND.md` | Project | | `${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-image-gen/EXTEND.md` | XDG | | `$HOME/.baoyu-skills/baoyu-image-gen/EXTEND.md` | User home |

  • **Found** → load and apply. If `default_model.[provider]` is null → ask model only.
  • **Not found** → run first-time setup (`references/config/first-time-setup.md`) via AskUserQuestion to collect provider + model + quality + save location. Save EXTEND.md, then continue.

Legacy: if `.baoyu-skills/baoyu-imagine/EXTEND.md` exists and the new path doesn't, the runtime renames it to `baoyu-image-gen`. If both exist, the runtime leaves them alone and uses the new path.

**EXTEND.md keys**: default provider, quality, aspect ratio, image size, OpenAI image API dialect, default models, batch worker cap, provider-specific batch limits. Schema: `references/config/preferences-schema.md`.

Usage

More examples (per provider, batch file format): `references/usage-examples.md`.

${BUN_X} {baseDir}/scripts/main.ts --prompt "A cat" --image cat.png
${BUN_X} {baseDir}/scripts/main.ts --prompt "A landscape" --image out.png --ar 16:9 --quality 2k
${BUN_X} {baseDir}/scripts/main.ts --promptfiles system.md content.md --image out.png
${BUN_X} {baseDir}/scripts/main.ts --prompt "Make blue" --image out.png --ref source.png
${BUN_X} {baseDir}/scripts/main.ts --prompt "A cat" --image out.png --provider dashscope --model qwen-image-2.0-pro
${BUN_X} {baseDir}/scripts/main.ts --prompt "A cat" --image out.png --provider codex-cli --ar 16:9   # Codex login, no OPENAI_API_KEY; needs `codex` on PATH

# Batch; build the payload from outline.md + prompts/ (e.g. baoyu-article-illustrator output)
${BUN_X} {baseDir}/scripts/build-batch.ts --outline outline.md --prompts prompts --output batch.json --images-dir attachments
${BUN_X} {baseDir}/scripts/main.ts --batchfile batch.json --jobs 4

Reference-Image Identity Preservation

When a real person/character/object must be preserved from reference images:

  • Use short, hard identity language instead of a long generic description: "Use the person/object in the reference image(s) as the same identity. Do not redesign it or create a similar-looking new subject. Only change scene, clothing, pose, lighting, rendering style, and composition. Keep the face/proportions/hair/key accessories/overall identity from the references." With multiple refs, say they are the same subject and jointly define identity.
  • Long feature descriptions ("young East Asian woman, oval face, clear eyes...") make the model synthesize a new matching person instead.
  • Prefer 2–4 curated existing source refs; many or multi-megabyte refs can destabilize streaming providers.
  • Don't use newly generated outputs as refs unless the user asks (drift compounds).
  • Too polished/influencer-like → reduce stylized refs, add anti-beautification constraints (no face slimming, eye enlargement, heavy makeup, commercial travel shoot, over-smoothing).
  • Younger/older look → keep the face; express age via clothing, posture, scene, styling. Never ask to change facial identity.

Options

| Option | Description | |--------|-------------| | `--prompt <text>`, `-p` | Prompt text | | `--promptfiles <files...>` | Read prompt from files (concatenated) | | `--image <path>` | Output image path (required in single-image mode) | | `--batchfile <path>` | JSON batch file for multi-image generation | | `--jobs <count>` | Worker count for batch mode (default: auto, max from config, built-in default 10) | | `--provider google\|openai\|azure\|openrouter\|dashscope\|zai\|minimax\|jimeng\|seedream\|replicate\|codex-cli\|agnes` | Force provider (default: auto-detect; `codex-cli` is never auto-selected — must be pinned via CLI or EXTEND.md) | | `--model <id>`, `-m` | Model ID — see provider references for defaults and allowed values | | `--ar <ratio>` | Aspect ratio (`16:9`, `1:1`, `4:3`, …) | | `--size <WxH>` | Explicit size (e.g., `1024x1024`; for `gpt-image-2.5-*` and `gpt-image-2`, width/height must be multiples of 16, max edge 3840px, ratio no wider than 3:1) | | `--quality normal\|2k` | Qual

Read more
@guanyang
Ships withopen-agent-hub

A lightweight, zero-dependency CLI tool to manage and activate capabilities for AI coding assistants (such as Claude Code, Cursor, Trae, etc.).

991105 skills5 agents6 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
991
Star history of guanyang/open-agent-hub on GitHub, a chart by star-history.com

Other skills on open-agent-hub.

academy-guide

academy-guide

Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends…

algorithmic-art

algorithmic-art

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request…

baoyu-comic

baoyu-comic

Knowledge comic creator supporting multiple art styles and tones. Creates original educational comics with detailed panel layouts…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about baoyu-image-gen.

Which coding agents can use baoyu-image-gen?
baoyu-image-gen installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.