All skills
jimliu avatar

/baoyu-comic

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

Knowledge comic creator supporting multiple art styles and tones. Creates original educational comics with detailed panel layouts and batch-capable image generation. Use when user asks to create "知识漫画", "教育漫画", "biography comic", "tutorial comic", or "Logicomix-style comic".

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

This session only. Nothing lands on disk.

referencescodex-imagegen.md

≈933 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-{cover|page}-[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-{cover|page}-[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

1 warning17d5 checks · Risk MEDIUM
  • Gen Agent Trust Hub17d

    This skill is a complex comic creation tool that uses dynamic script execution for PDF merging and environment-aware image generation. It includes logic to discover and run local wrapper scripts by searching directory paths at runtime. While these behaviors are documented as part of its cross-platform support (Codex, Cursor, etc.), the use of dynamic execution from computed paths and the processing of untrusted user content for prompt generation represent notable security surfaces.

  • Socket17d

    No alerts

  • Snyk17d

    Risk: LOW · No issues

  • Runlayer6mo

    2/34 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
1.117.4
Other metadata
metadata
{
  "openclaw": {
    "homepage": "https://github.com/JimLiu/baoyu-skills#baoyu-comic",
    "requires": {
      "anyBins": [
        "bun",
        "npx"
      ]
    }
  }
}
  • TypeScript
  • comic
  • education
  • knowledge
  • image-generation
  • batch-capable
  • panel-layout
  • art-styles
  • storytelling
  • bun

README badge

README badge for jimliu/baoyu-skills/baoyu-comic

Creates original educational comics with flexible art style and tone combinations, supporting batch image generation and detailed panel layouts. Use when asked to generate knowledge comics, biography comics, tutorial comics, or similar educational visual narratives in styles like ligne-claire, manga, or ink-brush.

Generated from the current SKILL.md.

What art styles and tones does this skill support?
Six art styles (ligne-claire, manga, realistic, ink-brush, chalk, minimalist) and seven tones (neutral, warm, dramatic, romantic, energetic, vintage, action) can be combined. Five named presets (ohmsha, wuxia, shoujo, concept-story, four-panel) bundle specific art+tone combinations with special visual rules.
Can I use my own reference images to guide the comic style?
Yes. Pass reference images via `--ref <files...>` and specify usage mode (direct, style, or palette). Direct mode passes the image to the backend; style and palette modes extract traits and embed them in prompts.
What image backends does this skill work with?
It auto-detects and prioritizes Codex `imagegen`, Cursor `GenerateImage`, or other runtime-native tools. If none are available, it falls back to `baoyu-image-gen` or asks you to choose from installed backends.
Can I regenerate just a few pages instead of the whole comic?
Yes. Use `--regenerate N` to regenerate specific pages (e.g., `--regenerate 3` or `--regenerate 2,5,8`), or `--images-only` to generate images from existing prompts without rebuilding the storyboard.
Does this skill require bun or npm?
It requires either `bun` or `npx` installed. The skill will use `bun` if available; otherwise it falls back to `npx -y bun`.

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