baoyu-image-gen

baoyu-image-gen is a skill for Claude Code, Codex from LetheChen/openclaw-longmen-inn. It costs 55 tokens per session (2,123 once invoked), scanned A, a copy of baoyu-image-gen, MIT.

An AI image-generation tool that creates pictures from text and can use reference images. It supports several image-generation services and different image shapes.

In plain words
What is it for?
Use it when you need to create or draw images, choose a provider and model, use a reference image, or generate images in a specific aspect ratio.
Why use it?
It gives coding agents a defined way to request generated visuals without building the image-making process themselves.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; names the AskUserQuestion tool.

Good fit Use it when you need to create or draw images, choose a provider and model, use a reference image, or generate images in a specific aspect ratio.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lethechen/openclaw-longmen-inn/baoyu-image-gen
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add LetheChen/openclaw-longmen-inn --skill baoyu-image-gen
Clone the repo
git clone --depth 1 https://github.com/LetheChen/openclaw-longmen-inn

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for baoyu-image-gen

README.md
[![agentmods](https://agentmods.dev/badge/skills/lethechen/openclaw-longmen-inn/baoyu-image-gen/github.svg)](https://agentmods.dev/skills/lethechen/openclaw-longmen-inn/baoyu-image-gen)
Your own site
<a href="https://agentmods.dev/skills/lethechen/openclaw-longmen-inn/baoyu-image-gen"><img src="https://agentmods.dev/badge/skills/lethechen/openclaw-longmen-inn/baoyu-image-gen/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for baoyu-image-gen

Your own site · 80×15
<a href="https://agentmods.dev/skills/lethechen/openclaw-longmen-inn/baoyu-image-gen"><img src="https://agentmods.dev/badge/skills/lethechen/openclaw-longmen-inn/baoyu-image-gen.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,123 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 88% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00055 $0.02123
Opus 5 $0.00028 $0.01061
Sonnet 5 $0.00011 $0.00425
Haiku 4.5 $0.00006 $0.00212

Measured 11d ago against content hash 19200d2efd1e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

baoyu-image-gen scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

The scan reads SKILL.md. This mod also ships 6 executable files (scripts/main.ts, scripts/providers/dashscope.ts, scripts/providers/google.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

88% identical to baoyu-image-gen — 20 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

roles/painter/skills/Baoyu-Image-Gen/SKILL.md · 197 lines

How it starts

The opening of the file, as written. The whole thing — 197 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Image Generation (AI SDK)

Official API-based image generation. Supports OpenAI, Google, DashScope (阿里通义万象) and Replicate providers.

Script Directory

Agent Execution:

  1. SKILL_DIR = this SKILL.md file's directory
  2. Script path = ${SKILL_DIR}/scripts/main.ts

Step 0: Load Preferences ⛔ BLOCKING

CRITICAL: This step MUST complete BEFORE any image generation. Do NOT skip or defer.

Check EXTEND.md existence (priority: project → user):

test -f .baoyu-skills/baoyu-image-gen/EXTEND.md && echo "project"
test -f "$HOME/.baoyu-skills/baoyu-image-gen/EXTEND.md" && echo "user"
Result Action
Found Load, parse, apply settings. If default_model.[provider] is null → ask model only (Flow 2)
Not found ⛔ Run first-time setup (references/config/first-time-setup.md) → Save EXTEND.md → Then continue

CRITICAL: If not found, complete the full setup (provider + model + quality + save location) using AskUserQuestion BEFORE generating any images. Generation is BLOCKED until EXTEND.md is created.

Path Location
.baoyu-skills/baoyu-image-gen/EXTEND.md Project directory
$HOME/.baoyu-skills/baoyu-image-gen/EXTEND.md User home

EXTEND.md Supports: Default provider | Default quality | Default aspect ratio | Default image size | Default models

Schema: references/config/preferences-schema.md

Usage

# Basic
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "A cat" --image cat.png

# With aspect ratio
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "A landscape" --image out.png --ar 16:9

# High quality
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "A cat" --image out.png --quality 2k

# From prompt files
npx -y bun ${SKILL_DIR}/scripts/main.ts --promptfiles system.md content.md --image out.png

# With reference images (Google multimodal or OpenAI edits)
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "Make blue" --image out.png --ref source.png

# With reference images (explicit provider/model)
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "Make blue" --image out.png --provider google --model gemini-3-pro-image-preview --ref source.png

# Specific provider
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "A cat" --image out.png --provider openai

# DashScope (阿里通义万象)
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "一只可爱的猫" --image out.png --provider dashscope

# Replicate (google/nano-banana-pro)
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "A cat" --image out.png --provider replicate

# Replicate with specific model
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "A cat" --image out.png --provider replicate --model google/nano-banana

Read the full file on GitHub · 197 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 197 lines · 55 tokens per session scan A 19200d2efd1e

Subscribe to this mod's changes

baoyu-image-gen is a skill published in the GitHub repository LetheChen/openclaw-longmen-inn (10 stars, last pushed 5mo ago), licensed MIT. It adds 55 tokens to every session and 2,123 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 88% identical to baoyu-image-gen, differing in 20 lines, and is treated as a copy.