Picture Storybook Generator

Turn a story idea into a cohesive, illustrated picture book with clear captions and a ready-to-share PDF.

bjbook
2026年10月16日
0 收藏
59 下载

安装与下载

1 ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install zhz-picture-story-book

2 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/
工作区 {'/skills/'}

优先级:工作区 › 全局 › 内置

3 提示词安装

将此提示词复制到 Openclaw 即可自动安装。

请帮我使用 Clawhub 安装 skill-zhz-picture-story-book。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

更倾向于下载?

获取包含原生技能文件的ZIP压缩包。

下载技能 (.zip)

基本信息

名称 Picture Storybook Generator
Slug zhz-picture-story-book
创建者 bjbook
创建时间 2026-10-16 06:05:36
更新时间 2026-10-16 06:05:36
收藏数 0
使用量 59
浏览量 11

安装指南

  1. ClawHub CLI 从源直接安装技能的最快方式。
    npx clawhub@latest install zhz-picture-story-book
  2. 手动安装 将技能文件夹复制到以下位置之一
    全局模式
    ~/.openclaw/skills/
    工作区
    /skills/
    优先级:工作区 > 本地 > 内置
  3. 提示词安装 将此提示词复制到 OpenClaw 即可自动安装。
    请帮我使用 Clawhub 安装 zhz-picture-story-book。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
    更倾向于下载?
    获取包含原生技能文件的ZIP压缩包。
    下载技能 (.zip)

什么是

The Picture Storybook Generator transforms a user-provided story or theme into a sequential illustrated narrative: one complete scene per page, paired with a short caption in a separate, clearly typeset text area. It plans the story, defines recurring characters, writes image prompts, generates illustrations through the zhz-image-gen backend, composites finished pages, and can merge them into a PDF.
As one of the Openclaw Skills for visual storytelling, it offers control over page count, language, aspect ratio, art style, and visual tone. Its workflow keeps text out of generated images, supports consistent character descriptions across pages, and produces both editable intermediate files and finished deliverables.

应用场景

Create traditional Chinese lianhuanhua, picture books, storybooks, and illustrated narratives from an original idea or supplied story.
Turn a plot into a page-by-page storyboard with a scene description and caption for each page.
Produce a children’s story, fable, historical narrative, adventure, or other sequential visual story in a selected art style and tone.
Generate a multilingual story using automatic language detection or a chosen output language: Chinese, English, or Japanese.
Export composited pages as individual PNG files and, when available, a combined PDF.
Use Openclaw Skills to create a structured, reviewable illustration project rather than a collection of disconnected images.

工作原理

Analyze the requested story or theme, identify its narrative arc, estimate or accept a page count, and select the output language.
Present the proposed title, page count, style, tone, scenes, and characters for user confirmation. The user can choose whether to review the storyboard before image generation.
Write storyboard.md with the page-by-page scenes and captions, and characters.md with visual definitions for recurring characters.
Create a separate English image-prompt file for every page. Prompts specify style, composition, characters, actions, setting, lighting, and color, and explicitly exclude text from the image.
Generate each illustration through the configured zhz-image-gen backend and save it as a text-free PNG. Generation is sequential by default, with optional batch processing; a failed page is retried once before being reported as skipped.
Composite each illustration with its caption using composite-page.py. The image occupies the main page area, while the caption is typeset separately on a solid background.
Merge the numbered final pages into a PDF using merge-to-pdf.py. If PDF merging fails, individual page images remain available as deliverables.
Report the output location and generated files, noting any pages that could not be completed.

配置指南

The skill uses zhz-image-gen as its image-generation backend. Ensure it is installed and configured in the Openclaw workspace, and that the skill’s scripts are available relative to the directory containing SKILL.md.
Install the Python dependencies required for page composition and PDF creation:
pip install Pillow fpdf2
For each page, write its complete prompt to a separate prompts/NN-page-[slug].md file before calling the image backend. Generate a raster illustration with the configured backend; do not substitute SVG, HTML, Canvas, or other code-rendered artwork. Example backend invocation:
python ~/.openclaw/workspace/skills/zhz-image-gen/scripts/main.py
--promptfiles prompts/01-page-opening.md
--image illustrations/01-page-opening.png
--ar 3:4
--quality 2k Composite an illustration and its caption into a finished page:
python {baseDir}/scripts/composite-page.py
--image illustrations/01-page-opening.png
--text "Enter the page caption here."
--output pages/01-page-opening.png
--text-ratio 0.20
--aspect 3:4 Merge the finished, numbered pages into a PDF:
python {baseDir}/scripts/merge-to-pdf.py picture-story/{topic}/
The supported story settings include 3–30 pages (10 by default), 3:4, 4:3, or 1:1 aspect ratios, and auto, zh, en, or ja output languages. Image style and tone can also be selected or recommended during the confirmation step.
Picture Storybook Generator 数据架构与分类体系
Projects are written to picture-story/{topic}/. The files separate story planning, image prompts, original illustrations, composited pages, and the final document.
Path Purpose
storyboard.md Story outline and page-by-page scene and caption plan. Front matter can record title, topic, page count, art style, tone, aspect ratio, language, and generation date.
characters.md Visual definitions for recurring characters, including appearance, clothing, specific color values, and distinguishing features.
prompts/NN-page-[slug].md Per-page prompt and scene information. Prompts are written in English and instruct the image model not to include text.
illustrations/NN-page-[slug].png Original AI-generated illustration, without caption text.
pages/NN-page-[slug].png Final page with illustration and separately typeset caption.
{topic}.pdf Combined PDF containing the finished pages in numeric order.
The standard page layout dedicates approximately 80% of page height to the illustration and 20% to the caption; --text-ratio can be adjusted from 0.15 to 0.30. Captions are generally 1–3 sentences and 20–80 Chinese characters. Text is kept outside the image, automatically wrapped and sized, with a minimum font size of 14 px; overflow is shortened with an ellipsis if necessary. Chinese text uses a serif font such as Songti or Noto Serif CJK, while English uses a sans-serif font.

高级特性

Style choices include ink-brush, realistic, watercolor, oil-painting, and minimalist; the documented style options also describe cartoon artwork. Tone options include neutral, warm, dramatic, nostalgic, and action.
Supports 3–30 pages, portrait or landscape aspect ratios ( 3:4 , 4:3 ), square pages ( 1:1 ), and automatic, Chinese, English, or Japanese output language selection.
Uses character sheets with stable visual traits and hexadecimal clothing colors to help maintain character consistency across pages. If the image backend supports --ref , a character reference image can also be used.
Supports configurable illustration batch size from 1 to 8, with a default of 4; sequential generation is the default workflow.
Captions are composed separately from artwork, preserving readable typography and preventing image-model text artifacts.
Includes failure handling: retry image generation once, report pages that remain unsuccessful, and provide individual page images if PDF merging fails.
Intermediate storyboards, character definitions, prompts, and source illustrations remain organized in the project folder for review and iteration—an auditable workflow for Openclaw Skills users.


name: zhz-picture-story-book description: 连环画生成器:每页一幅画+底部文字说明,支持多种画风。用于生成故事绘本、小人书、连环画、图文故事。Use when user asks to create "连环画", "故事绘本", "picture story", "illustrated story", or "picture book". version: 1.0.0

连环画生成器

每页一幅画、底部配文字,生成完整连环画故事。

概述

连环画是中国传统叙事形式,每页包含:

上方:一幅完整插图(约占页面 80%)
下方:一段叙述文字(约占页面 20%),清晰排版,不嵌入图片中

连环画注重单幅完整场景和文字叙事的配合。

图片生成工具

本技能使用 zhz-image-gen 作为图片生成后端。

调用方式:

python ~/.openclaw/workspace/skills/zhz-image-gen/scripts/main.py \

--promptfiles prompts/NN-page-[slug].md
--image illustrations/NN-page-[slug].png
--ar 3:4
--quality 2k

⛔ 禁止用 SVG、HTML、Canvas 等代码渲染替代光栅图片生成。

提示词文件要求(硬性):在调用任何后端之前,必须先将每页的完整提示词写入独立文件 prompts/NN-page-[slug].md。

脚本目录

{baseDir} = 本 SKILL.md 所在目录。所有 scripts/... 路径均相对于 {baseDir}。

Python 环境:需要 Pillow 和 fpdf2 库。如果缺失,先安装:
pip install Pillow fpdf2

脚本 用途
scripts/composite-page.py 将插图与文字合成为最终页面
scripts/merge-to-pdf.py 将最终页面合并为 PDF
参数选项
参数 可选值 说明 --art ink-brush(默认)、realistic、watercolor、oil-painting、minimalist 画风 --tone neutral(默认)、warm、dramatic、nostalgic、action 画面基调/氛围 --pages 3-30 目标页数(默认 10) --aspect 3:4(默认竖版)、4:3、1:1 页面宽高比 --lang auto(默认)、zh、en、ja 输出语言 --text-position bottom(默认)、top 文字位置 --text-ratio 0.20(默认) 文字区域占比(0.15-0.30) --batch-size 1-8 图片生成批处理数量(默认 4) 文件结构

输出目录:picture-story/{主题简称}/

文件 说明
storyboard.md 故事大纲与分镜设计
characters.md 角色视觉定义
prompts/NN-page-[slug].md 图片生成提示词 + 文字说明
illustrations/NN-page-[slug].png 原始插图(不含文字)
pages/NN-page-[slug].png 最终页面(插图 + 文字合成)
{主题简称}.pdf 最终合并的 PDF
页面布局规范

每页最终布局如下:

┌─────────────────────────────┐
│ │
│ │
│ 插图区域 │ ← 占页面高度的 (1 - text_ratio)
│ (AI生成的图片) │
│ │
│ │
├─────────────────────────────┤
│ 文字说明 / 旁白 │ ← 占页面高度的 text_ratio
│ (清晰排版的文字) │
└─────────────────────────────┘

插图区域:AI 生成的图片,不在图上叠加任何文字
文字区域:纯色背景(默认白色),清晰排版
字体:中文用衬线体(宋体/Noto Serif CJK),英文用无衬线体
字号:自动适配区域,最小 14px,行距舒适
分隔线:插图与文字之间有一条细线
工作流程
进度检查表
连环画进度:

  • [ ] 步骤 1:故事规划
  • [ ] 步骤 2:确认 ⚠️ 必须
  • [ ] 步骤 3:生成故事板 + 角色定义
  • [ ] 步骤 4:生成提示词
  • [ ] 步骤 5:生成插图
  • [ ] 步骤 6:合成页面(插图 + 文字)
  • [ ] 步骤 7:合并为 PDF
  • [ ] 步骤 8:完成报告

步骤 1:故事规划

分析用户提供的故事/主题:

提取核心叙事弧线(开端 → 发展 → 高潮 → 结局)
将故事拆分为连续场景(每页一个场景)
确定页数(用户指定或根据故事复杂度推荐)
检测源语言和输出语言
将故事大纲写入 storyboard.md
步骤 2:确认 ⚠️ 必须

向用户展示:

故事标题和推荐页数
画风 + 画面基调(根据内容推荐)
每页场景简介
角色列表

询问用户(合并所有问题):

画风确认:使用哪种视觉风格?(显示推荐项 + 备选)
审阅模式:生成前先审阅故事板?还是直接生成?
步骤 3:生成故事板 + 角色定义
完善 storyboard.md,包含详细的场景描述和每页文字说明
创建 characters.md,包含重复出现角色的视觉定义
保存两个文件

storyboard.md 格式:


title: "故事标题"
topic: "主题简称"
page_count: N
art_style: "画风"
tone: "画面基调"
aspect_ratio: "3:4"
language: "zh"
generated: "YYYY-MM-DD"

# 故事标题 - 连环画故事板

第 1 页:场景标题

文件名:01-page-[slug].png 场景:[画面的视觉描述——插图展示什么] 角色:[出场人物] 文字说明:[页面底部的叙述文字]

第 2 页:场景标题

...

characters.md 格式:

# 角色定义 - 故事标题

角色名

  • 角色:主角/反派/配角
  • 外貌:[详细视觉描述]
  • 服装:[服装细节,含具体颜色和十六进制色值]
  • 标志性特征:[独特的视觉标记]

步骤 4:生成提示词

为每页创建提示词文件 prompts/NN-page-[slug].md:

# 第 NN 页:场景标题

视觉风格

画风:[style] | 画面基调:[tone]

角色参考

[从 characters.md 提取相关角色描述]

场景描述

[详细的画面视觉描述]

生成提示词

[组合好的英文提示词——包含画风关键词、场景构图、角色、动作、环境、光线、色彩。
不要在图片中包含任何文字/词语/标签。]

提示词编写规则:

生成提示词用英文编写,以获得最佳 AI 图片质量
在提示词开头包含画风关键词
描述场景构图、角色、动作、环境、光线
包含角色一致性细节(外貌、服装颜色含十六进制色值)
不要在图片提示词中包含任何文字、词语、标签或说明——文字只出现在底部文字区域
结尾加上宽高比和画质关键词
步骤 5:生成插图

逐页生成图片:

使用已配置的图片后端
保存原始插图到 illustrations/NN-page-[slug].png
宽高比按故事板设定
默认单线程顺序生成;设置 --batch-size 可批处理
如果生成失败,重试一次;仍失败则跳过并在报告中注明
插图中绝不包含任何文字
步骤 6:合成页面(插图 + 文字)

使用 {baseDir}/scripts/composite-page.py 合成每页:

python {baseDir}/scripts/composite-page.py \

--image illustrations/01-page-[slug].png
--text "页面底部的文字说明内容"
--output pages/01-page-[slug].png
--text-ratio 0.20
--aspect 3:4

脚本功能:

读取原始插图
创建画布,按页面尺寸
在上方区域绘制插图
在下方区域填充纯色背景
排版文字说明(自动换行、自动字号)
保存最终合成页面
步骤 7:合并为 PDF

python {baseDir}/scripts/merge-to-pdf.py picture-story/{主题简称}/

页面按数字顺序合并。每页成为 PDF 的完整页面。

步骤 8:完成报告
连环画完成!
标题:[title] | 画风:[art] | 画面基调:[tone] | 页数:[count]
位置:picture-story/{主题简称}/
✓ storyboard.md
✓ characters.md
✓ illustrations/(原始插图)
✓ pages/(最终页面含文字)
✓ {主题简称}.pdf

画风
画风 说明 适合题材
ink-brush 中国水墨画风,毛笔笔触,水墨晕染 古典故事、武侠、神话、民间传说
watercolor 水彩画风格,透明轻盈 儿童故事、温馨题材、自然风景
realistic 写实数字绘画,照片级质感 历史故事、人物传记、纪实题材
oil-painting 油画风格,厚重笔触,丰富色彩 艺术题材、史诗故事、西方经典
minimalist 极简线条风,留白多 寓言、哲理故事、现代绘本
cartoon 卡通风格,造型简化夸张,线条清晰,色彩明快 儿童故事、喜剧、日常轻松题材

卡通

画面基调
画面基调 色彩效果 氛围
neutral 均衡自然色调 平和叙事,客观描述
warm 暖色调,柔和金色光线 温馨、怀旧、家庭
dramatic 高对比度,浓重阴影 紧张、激烈、冲突
nostalgic 棕褐色调,褪色感,颗粒感 回忆、历史、岁月
action 鲜艳饱和,动态十足 战斗、运动、冒险
文字说明写作指南

文字说明是每页底部的叙述文字。详细范例见 references/caption-examples.md。

规则:

长度:1-3 句话,20-80 个汉字
风格:叙述者视角,像说书人一样描述画面中的事件
内容:提供画面之外的信息(心理活动、因果关系、时间推进)
避免重复:不要只描述图中已有的内容

好的写法:"悟空举棒便打,白骨精惨叫一声,化作一缕青烟逃去。唐僧见状大怒:'你这泼猴,又伤人性命!'" 不好的写法:"这一页画的是悟空在打架。"(太简短,无叙事价值) 不好的写法:[500 字长篇描述](太长,放不下)

角色一致性

多页故事中有重复出现的角色时:

在 characters.md 中定义每个角色的视觉外观,包含具体颜色(十六进制色值)
在每页的生成提示词中包含关键视觉特征
跨所有页面使用一致的颜色代码
如果后端支持参考图(--ref),可先生成角色参考图
错误处理
错误 恢复方案
图片生成失败 重试一次;仍失败则跳过该页并在报告中标注
文字太长放不下 自动缩小字号(最小 14px);仍放不下则截断并加"..."
合成脚本失败 尝试 pip install Pillow;降级到 ImageMagick 或纯插图输出
PDF 合并失败 输出单页图片作为最终交付物

注意事项

图片生成:每页 15-30 秒
文字绝不作为图片的一部分生成——始终单独合成以保证排版清晰
所有生成提示词用英文编写以获得最佳图片质量;文字说明用用户选择的语言
默认 10 页;用户可要求更多或更少(范围 3-30 页)
插图提示词中不得包含任何文字渲染指令
面部顾问

Trek Agent Control