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/codex-image2-fallback.md

View on GitHub
---
name: codex-image2-fallback
description: Fallback behavior when baoyu-image-gen lacks OpenAI API credentials but Codex/native image generation is available
---

# Codex Image2 Fallback

`--provider openai --model gpt-image-2.5-flare` without `OPENAI_API_KEY` fails with:

```text
OPENAI_API_KEY is required. Codex/ChatGPT desktop login does not automatically grant OpenAI Images API access to this script.
```

Expected: the `openai` provider uses the public OpenAI Images API; Codex/ChatGPT image2 entitlement is a separate runtime-native path.

## Fallback pattern

1. Use `baoyu-image-gen` when provider credentials are available.
2. If it fails only because `OPENAI_API_KEY` is missing, don't leave the user waiting. Use the first available:
   - Codex runtime native `imagegen` skill/tool.
   - `baoyu-image-gen --provider codex-cli` (preferred; wraps the bundled `scripts/codex-imagegen/main.ts`, upstream `packages/baoyu-codex-imagegen/src/main.ts`), if `codex` CLI is installed and logged in.
   - Hermes native `image_generate`.
3. Reference images: pass them if the backend accepts refs; otherwise derive a concise identity-preserving prompt from them and state it is a text-description fallback, not strict reference-image editing.
4. Return the generated media path or structured backend error promptly.

## User-facing wording

> The OpenAI API path needs `OPENAI_API_KEY`; Codex login is a separate image2 backend. I used the available Codex/native image backend instead. Reference images were [passed directly / reconstructed from visual traits].

Don't imply `baoyu-image-gen --provider openai` can use Codex OAuth without a dedicated provider implementation.
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