Skip to content

JimLiu/baoyu-skills / skills/baoyu-image-gen

baoyu-image-gen

Verified

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.

FileKindSize
SKILL.mdskill md16.2 KB
references/codex-image2-fallback.mdmarkdown1.6 KB
references/codex-oauth-vs-openai-api-key.mdmarkdown1.4 KB
references/config/first-time-setup.mdmarkdown8.8 KB
references/config/preferences-schema.mdmarkdown2.5 KB
references/providers/agnes.mdmarkdown1.9 KB
references/providers/codex-cli.mdmarkdown5.0 KB
references/providers/dashscope.mdmarkdown4.2 KB
references/providers/minimax.mdmarkdown1.1 KB
references/providers/openrouter.mdmarkdown707 B
references/providers/replicate.mdmarkdown1.4 KB
references/providers/zai.mdmarkdown953 B
references/usage-examples.mdmarkdown4.9 KB
scripts/build-batch.test.tsscript4.5 KB
scripts/build-batch.tsscript7.4 KB
scripts/codex-imagegen/cache.tsscript2.2 KB
scripts/codex-imagegen/logger.tsscript1.3 KB
scripts/codex-imagegen/main.tsexecutablescript11.9 KB
scripts/codex-imagegen/parser.tsscript2.0 KB
scripts/codex-imagegen/spawn.tsscript6.5 KB
scripts/codex-imagegen/types.tsscript1.6 KB
scripts/codex-imagegen/validator.tsscript2.3 KB
scripts/main.test.tsscript18.4 KB
scripts/main.tsscript45.5 KB
scripts/providers/agnes.test.tsscript6.7 KB
scripts/providers/agnes.tsscript4.9 KB
scripts/providers/azure.test.tsscript5.3 KB
scripts/providers/azure.tsscript5.7 KB
scripts/providers/codex-cli.test.tsscript1.6 KB
scripts/providers/codex-cli.tsscript5.8 KB
scripts/providers/dashscope.test.tsscript11.4 KB
scripts/providers/dashscope.tsscript18.1 KB
scripts/providers/google.test.tsscript4.1 KB
scripts/providers/google.tsscript10.5 KB
scripts/providers/jimeng.test.tsscript2.7 KB
scripts/providers/jimeng.tsscript12.5 KB
scripts/providers/minimax.test.tsscript5.1 KB
scripts/providers/minimax.tsscript6.2 KB
scripts/providers/openai.test.tsscript6.0 KB
scripts/providers/openai.tsscript12.4 KB
scripts/providers/openrouter.test.tsscript5.3 KB
scripts/providers/openrouter.tsscript9.7 KB
scripts/providers/replicate.test.tsscript7.0 KB
scripts/providers/replicate.tsscript17.4 KB
scripts/providers/seedream.test.tsscript6.4 KB
scripts/providers/seedream.tsscript9.6 KB
scripts/providers/zai.test.tsscript5.2 KB
scripts/providers/zai.tsscript8.7 KB
scripts/types.tsscript2.3 KB

references/config/first-time-setup.md

View on GitHub
---
name: first-time-setup
description: First-time setup and default model selection flow for baoyu-image-gen
---

# First-Time Setup

Triggered when:
1. No EXTEND.md found → full setup (Flow 1), create EXTEND.md
2. EXTEND.md found but `default_model.[provider]` is null → model question only (Flow 2), update EXTEND.md

Then continue with generation. Ask in the user's input language or saved language preference.

## Flow 1: Full Setup

Use AskUserQuestion with ALL questions in ONE call:

1. **Provider**:

```yaml
header: "Provider"
question: "Default image generation provider?"
options:
  - label: "Google (Recommended)"
    description: "Gemini multimodal - high quality, reference images, flexible sizes"
  - label: "OpenAI"
    description: "GPT Image 2 - latest OpenAI image model, reference-image workflows"
  - label: "Azure OpenAI"
    description: "Azure-hosted GPT Image deployments with resource-specific routing"
  - label: "OpenRouter"
    description: "Router for Gemini/FLUX/OpenAI-compatible image models"
  - label: "DashScope"
    description: "Alibaba Cloud - Qwen-Image, strong Chinese/English text rendering"
  - label: "Z.AI"
    description: "GLM-image, strong poster and text-heavy image generation"
  - label: "MiniMax"
    description: "MiniMax image generation with subject-reference character workflows"
  - label: "Replicate"
    description: "Curated Replicate image families - nano-banana-2, Seedream, and Wan image models"
  - label: "Agnes"
    description: "Sapiens AI Agnes - optimized for high information density, complex layouts, reference-image support"
```

2. **Model** — only for these choices, using the matching question under [Model Questions](#model-questions): Google (also when auto-detect / no explicit provider), OpenRouter, Azure OpenAI, MiniMax, Z.AI.

3. **Quality**:

```yaml
header: "Quality"
question: "Default image quality?"
options:
  - label: "2k (Recommended)"
    description: "2048px - covers, illustrations, infographics"
  - label: "normal"
    description: "1024px - quick previews, drafts"
```

4. **Save location**:

```yaml
header: "Save"
question: "Where to save preferences?"
options:
  - label: "Project (Recommended)"
    description: ".baoyu-skills/ (this project only)"
  - label: "User"
    description: "~/.baoyu-skills/ (all projects)"
```

| Choice | Path | Scope |
|--------|------|-------|
| Project | `.baoyu-skills/baoyu-image-gen/EXTEND.md` | Current project |
| User | `$HOME/.baoyu-skills/baoyu-image-gen/EXTEND.md` | All projects |

EXTEND.md template:

```yaml
---
version: 1
default_provider: [selected provider or null]
default_quality: [selected quality]
default_aspect_ratio: null
default_image_size: null
default_image_api_dialect: null
default_model:
  google: [selected google model or null]
  openai: null
  azure: [selected azure deployment or null]
  openrouter: [selected openrouter model or null]
  dashscope: null
  zai: [selected Z.AI model or null]
  minimax: [selected minimax model or null]
  replicate: null
  agnes: null
---
```

If the user picks `OpenAI` but says the endpoint is only OpenAI-compatible and fronts another image model family, save `default_image_api_dialect: ratio-metadata` only when they confirm the gateway expects aspect-ratio `size` plus metadata-based resolution. Otherwise leave it `null` / `openai-native`.

## Flow 2: Model Only

Ask ONLY the model question for the current provider (below). Then:

1. Read existing EXTEND.md
2. If `default_model:` exists → update the provider-specific key
3. If `default_model:` is missing → add the full section:

```yaml
default_model:
  google: [value or null]
  openai: [value or null]
  azure: [value or null]
  openrouter: [value or null]
  dashscope: [value or null]
  zai: [value or null]
  minimax: [value or null]
  replicate: [value or null]
  agnes: [value or null]
```

Only set the selected provider's model; leave others as their current value or null.

## Model Questions

Model details and limits: `references/providers/*.md`.

### Google

```yaml
header: "Google Model"
question: "Default Google image generation model?"
options:
  - label: "gemini-3-pro-image (Recommended)"
    description: "Highest quality, best for production use"
  - label: "gemini-3.1-flash-image"
    description: "Fast generation, good quality, lower cost"
  - label: "gemini-3.1-flash-lite-image"
    description: "Cheapest and fastest; 1K output only"
  - label: "gemini-3-flash-preview"
    description: "Fast generation, balanced quality and speed"
```

### OpenAI

```yaml
header: "OpenAI Model"
question: "Default OpenAI image generation model?"
options:
  - label: "gpt-image-2.5-flare (Recommended)"
    description: "Latest GPT Image model, fastest; flexible sizes up to 4K, high-fidelity image inputs"
  - label: "gpt-image-2.5-sunburst"
    description: "Most capable GPT Image model for complex scenes and precise edits; slower"
  - label: "gpt-image-2"
    description: "Previous GPT Image generation, flexible sizes up to 4K"
  - label: "gpt-image-1.5"
    description: "Previous GPT Image model"
  - label: "gpt-image-1"
    description: "Earlier GPT Image model"
```

### Azure

```yaml
header: "Azure Deploy"
question: "Default Azure image deployment name?"
options:
  - label: "gpt-image-2.5-flare (Recommended)"
    description: "Use when your Azure deployment name matches the GPT Image 2.5 Flare model"
  - label: "gpt-image-2.5-sunburst"
    description: "Use when your Azure deployment name matches the GPT Image 2.5 Sunburst model"
  - label: "gpt-image-2"
    description: "Use when your Azure deployment name matches the GPT Image 2 model"
  - label: "gpt-image-1.5"
    description: "Use when your Azure deployment name matches the GPT Image 1.5 model"
  - label: "gpt-image-1"
    description: "Use when your Azure deployment name matches GPT-image-1"
```

Azure `--model` / `default_model.azure` is the deployment name, not the model family. If the deployment name is custom, save that exact name.

### OpenRouter

```yaml
header: "OpenRouter Model"
question: "Default OpenRouter image generation model?"
options:
  - label: "google/gemini-3.1-flash-image (Recommended)"
    description: "Recommended for image output and reference-image edits"
  - label: "google/gemini-2.5-flash-image-preview"
    description: "Fast preview-oriented image generation"
  - label: "black-forest-labs/flux.2-pro"
    description: "High-quality text-to-image through OpenRouter"
```

### DashScope

```yaml
header: "DashScope Model"
question: "Default DashScope image generation model?"
options:
  - label: "qwen-image-2.0-pro (Recommended)"
    description: "Best-verified DashScope model for text rendering and custom sizes"
  - label: "qwen-image-3.0-pro"
    description: "Newest Qwen flagship; same sizing rules, not yet the built-in default"
  - label: "qwen-image-2.0"
    description: "Faster 2.0 variant with flexible output size"
  - label: "qwen-image-max"
    description: "Legacy Qwen model with five fixed output sizes"
  - label: "qwen-image-plus"
    description: "Legacy Qwen model, same current capability as qwen-image"
  - label: "wan2.7-image-pro"
    description: "Wan 2.7 Pro — supports up to 4K text-to-image and reference-image editing"
  - label: "wan2.7-image"
    description: "Wan 2.7 base — faster generation, up to 2K, supports reference-image editing"
  - label: "z-image-turbo"
    description: "Legacy DashScope model for compatibility"
  - label: "z-image-ultra"
    description: "Legacy DashScope model, higher quality but slower"
```

### Z.AI

```yaml
header: "Z.AI Model"
question: "Default Z.AI image generation model?"
options:
  - label: "glm-image (Recommended)"
    description: "Current flagship image model with better text rendering and poster layouts"
  - label: "cogview-4-250304"
    description: "Legacy model on the sync image endpoint"
```

### Replicate

```yaml
header: "Replicate Model"
question: "Default Replicate image generation model?"
options:
  - label: "google/nano-banana-2 (Recommended)"
    description: "Current default for general Replicate image generation in baoyu-image-gen"
  - label: "bytedance/seedream-4.5"
    description: "Replicate Seedream 4.5 with validated local size/ref guardrails"
  - label: "bytedance/seedream-5-lite"
    description: "Replicate Seedream 5 Lite with validated local size/ref guardrails"
  - label: "wan-video/wan-2.7-image-pro"
    description: "Replicate Wan 2.7 Image Pro with 4K text-to-image support"
```

### MiniMax

```yaml
header: "MiniMax Model"
question: "Default MiniMax image generation model?"
options:
  - label: "image-01 (Recommended)"
    description: "Best general-purpose MiniMax image model with custom width/height support"
  - label: "image-01-live"
    description: "Lower-latency MiniMax image model using aspect ratios"
```

## After Setup

1. Create directory if needed
2. Write/update EXTEND.md with frontmatter
3. Confirm: "Preferences saved to [path]"
4. Continue with image generation
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall