bozhoudev/bozhou-skills/image-gen

Claude Code and agent skill by bozhoudev/bozhou-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

AI image generation with OpenAI, Google and DashScope APIs. Supports text-to-image, reference images, aspect ratios, and direct Cloudflare R2 upload. Sequential by default; parallel generation available on request. Use when user asks to generate, create, or draw images.

Install

npx vskill@latest install bozhoudev/bozhou-skills/image-gen

SKILL.md

Image Generation

Generate images via OpenAI, Google Gemini, or DashScope APIs. R2 upload is the default workflow for persistent article/social images.

Scripts

SKILL_DIR/
scripts/main.ts — generate image (+ optional R2 upload)
scripts/upload-r2.ts — upload any existing file to R2
scripts/r2.ts — R2 upload module (AWS SigV4, no external deps)
scripts/providers/ — google.ts / openai.ts / dashscope.ts
scripts/types.ts — shared types

Usage

bash
SKILL_DIR="/path/to/image-gen"
# Basic generation
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
# From prompt file
npx -y bun ${SKILL_DIR}/scripts/main.ts --promptfiles prompt.md --image out.png
# Generate + upload to R2 (prints public URL)
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "A cat" --image cat.png --r2
# Generate + upload with custom R2 key
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "A cat" --image cat.png --r2 --r2-key articles/hero.png
# Upload existing file to R2
npx -y bun ${SKILL_DIR}/scripts/upload-r2.ts --file image.png
npx -y bun ${SKILL_DIR}/scripts/upload-r2.ts --file image.png --key custom/path.png
# With reference image
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "Make it blue" --image out.png --ref source.png
# Force provider
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "A cat" --image out.png --provider openai

Options

OptionDescription
-p, --prompt <text>Prompt text
--promptfiles <files...>Read prompt from files
--image <path>Output path (required)
`--provider google\openai\dashscope`Force provider
-m, --model <id>Model ID
--ar <ratio>Aspect ratio: 16:9, 1:1, 4:3, 9:16, 2.35:1
`--quality normal\2k`Default: 2k
`--imageSize 1K\2K\4K`Google only
--ref <files...>Reference images
--r2Upload to R2 after generation, print public URL
--r2-key <name>R2 object key (default: filename)
--jsonJSON output

Environment Variables

Set in the vault-local .env.r2, ~/.skills/.env, or ~/.baoyu-skills/.env:

VariableDescription
GOOGLE_API_KEY / GEMINI_API_KEYGoogle API key
OPENAI_API_KEYOpenAI API key
DASHSCOPE_API_KEYDashScope API key
R2_ACCESS_KEY_IDCloudflare R2 access key
R2_SECRET_ACCESS_KEYCloudflare R2 secret key
R2_ACCOUNT_IDCloudflare account ID
R2_BUCKETR2 bucket name
R2_PUBLIC_BASE_URLPublic base URL (e.g. https://cdn.example.com)

Provider Selection

Auto-detects from available API keys. Priority: Google → OpenAI → DashScope. With --ref: Google first (Gemini multimodal), then OpenAI.

R2 Upload

Uses AWS SigV4 signing with built-in Node.js crypto — no external dependencies. With --r2, prints the R2 public URL instead of the local path. For article/social images, always use --r2 and insert the returned URL into Markdown; keep local files only as temporary cache.

Generation Mode

Sequential by default. For parallel batch generation, use multiple background subagents.

Default Workflow in This Vault

For any image that will be referenced by articles, tweets, covers, or long-lived notes:

  1. Generate the image to a temporary or ignored local path.
  2. Upload immediately with --r2 or scripts/upload-r2.ts.
  3. Insert the returned R2_PUBLIC_BASE_URL URL into Markdown.
  4. Do not rely on committed local image files as the canonical asset.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
78
Repository forks
7
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/bozhoudev/bozhou-skills/image-gen/badge)](https://verified-skill.com/skills/bozhoudev/bozhou-skills/image-gen)

Something wrong with this skill or its page? Tell us.