All skills
jimliu avatar

/baoyu-xhs-images

@b0ac523 official
by Jim Liu 宝玉jimliu/baoyu-skills26k stars
2,896

Generates infographic image card series with 12 visual styles, 8 layouts, and 3 color palettes. Breaks content into 1-10 cartoon-style image cards optimized for social media engagement. Use when user mentions "小红书图片", "小红书种草", "小绿书", "微信图文", "微信贴图", "image cards", "图片卡片", baoyu-xhs-images, or wants social media infographic series.

Use this Skill: https://skilld.dev/gh/jimliu/baoyu-skills/baoyu-xhs-images

This session only. Nothing lands on disk.

referencescodex-imagegen.md

≈930 tokens on demand. Your agent reads this file only when SKILL.md points to it.

codex-imagegen Wrapper Invocation

Load this reference only when the Image Generation Tools rule has resolved to codex-imagegen — i.e., the current runtime exposes no native imagegen skill but codex CLI is on PATH with an active codex login.

Preferred path: route through baoyu-image-gen

If the baoyu-image-gen skill is available in this runtime, always invoke through it rather than calling the wrapper directly. It handles retry/cache/batch/EXTEND.md preferences uniformly with every other provider.

${BUN_X} <baoyu-image-gen-base>/scripts/main.ts \
  --provider codex-cli \
  --image <ABSOLUTE_output> \
  --promptfiles <ABSOLUTE_prompts/NN-{type}-[slug].md> \
  --ar <ratio> \
  [--ref <ABSOLUTE_file>]...

Resolve <baoyu-image-gen-base> the same way you resolve any sibling skill — through your runtime's skill registry (Skill tool, plugin marketplace, or $HOME/.baoyu-skills/baoyu-image-gen/).

Fallback: spawn the wrapper directly

Only when baoyu-image-gen is NOT installed in the current runtime. Discover the wrapper's location at runtime — do NOT hard-code ../../packages/... from this skill:

  1. Honor explicit override: if $BAOYU_CODEX_IMAGEGEN_BIN is set and points to a real file, use that path. It may be .ts (spawn bun <path>) or .sh/binary (spawn directly).
  2. Search the plugin root: walk up from this skill's directory looking for packages/baoyu-codex-imagegen/src/main.ts. If found, that is the wrapper. Spawn it with bun.
  3. Last resort: tell the user that codex-imagegen is not available in this runtime and ask whether to install the baoyu-skills plugin (or set BAOYU_CODEX_IMAGEGEN_BIN) or pick another backend.

Once located, the invocation shape is:

bun <WRAPPER>/main.ts \
  --image <ABSOLUTE_output> \
  --prompt-file <ABSOLUTE_prompts/NN-{type}-[slug].md> \
  --aspect <ratio> \
  [--ref <ABSOLUTE_file>]... \
  [--timeout <ms>] \
  [--cache-dir ~/.cache/baoyu-codex-imagegen] \
  [--log-file <ABSOLUTE_jsonl_log_path>]

If bun is missing, npx -y bun <WRAPPER>/main.ts ... works as a fallback.

Parameter notes

  • All filesystem inputs are auto-resolved against process.cwd() when relative, but agents should pass absolute paths to be robust against cwd drift.
  • --timeout defaults to 300000 (5 min) per codex exec attempt. Raise (e.g. --timeout 600000 for 10 min) on slow networks or large prompts.
  • --cache-dir is off by default. Enable for repeatable runs to skip redundant generations of the same prompt+aspect+refs.
  • Authentication: the wrapper uses the user's Codex subscription — no OPENAI_API_KEY is read or sent.

Stdout contract

Single JSON line:

  • Success: {"status":"ok","path":"...","bytes":N,"elapsed_seconds":N,"thread_id":"...","attempts":N,"cached":bool,...}
  • Failure: {"status":"error","path":"...","bytes":0,"error":"...","error_kind":"..."}

error_kind values: codex_not_installed, invalid_args, prompt_file_missing, spawn_failed, timeout, no_image_gen_tool_use, output_missing, invalid_png, agent_refused, lock_busy.

On retryable errors (timeout, spawn_failed, no_image_gen_tool_use, output_missing, invalid_png, agent_refused), ask the user whether to retry or fall back to another backend.

Batch semantics

  • Codex image_gen returns one image per call (n=1 only). Multi-image jobs must dispatch one wrapper call per image.
  • The wrapper does NOT accept a --sessionId flag. Chain/scene consistency must come from --ref reference images.
  • --size and --quality are silently ignored — Codex picks pixel dimensions from --aspect.

Source: SKILL.md on GitHub

No alerts16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill is generally safe and implements structured workflows for social media image card generation. It has an indirect prompt injection surface from processing untrusted text, which is addressed with structural delimiters.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer6mo

    1/21 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at b0ac523. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 4 months ago
version
2.0.1
Other metadata
metadata
{
  "openclaw": {
    "homepage": "https://github.com/JimLiu/baoyu-skills#baoyu-xhs-images"
  }
}
  • xhs
  • infographic
  • image-cards
  • social-media
  • content-generation
  • cartoon-style
  • layout
  • color-palette

README badge

README badge for jimliu/baoyu-skills/baoyu-xhs-images

Generates 1-10 cartoon-style infographic image cards with 12 visual styles, 8 layouts, and 3 color palettes, optimized for social media sharing. Targets Xiaohongshu (Little Red Book), WeChat, and similar platforms where content is broken into visually distinct card series.

Generated from the current SKILL.md.

What image formats and dimensions does this skill output?
The SKILL.md does not specify output image formats or dimensions. You should clarify with the skill's documentation or test run to confirm.
Which image generation backends does this skill support?
The skill supports Codex imagegen, Cursor GenerateImage, and baoyu-image-gen as backends. It auto-selects based on your runtime and can fall back to asking you which backend to use.
Can I use reference images when generating the card series?
Yes. Use the `--ref <files...>` option to provide reference images that are applied to the first image card as the series anchor.
What languages does this skill work in?
The skill responds in the user's language for questions and confirmations. It is triggered by English terms like 'image cards' or Chinese terms like '小红书图片' and '微信图文'.
Does this skill require confirmation before generating images?
By default, yes — the skill confirms your strategy and settings before generation. Use `--yes` to skip confirmation and generate immediately with defaults.

Generated from the current SKILL.md. These answers refresh after source changes.