Skip to content
Content
Skill

/story-cover

小说封面生成。根据书名、作者名自动分析题材风格,调用 GPT-Image-2 生成含标题和署名的专业级网文封面;Codex CLI 优先使用内置 ImageGen,无需单独 API Key。触发方式:/story-cover、/封面、「帮我做个封面」「生成封面图」「做个小说封面」「封面设计」。

From plugin
oh-story
6.8k13 skills
Install
$ npx -y skills add worldwonderer/oh-story-claudecode --skill story-cover --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/story-cover

Context preview

The summary Claude sees to decide when to auto-load this skill.

小说封面生成。根据书名、作者名自动分析题材风格,调用 GPT-Image-2 生成含标题和署名的专业级网文封面;Codex CLI 优先使用内置 ImageGen,无需单独 API Key。触发方式:/story-cover、/封面、「帮我做个封面」「生成封面图」「做个小说封面」「封面设计」。

SKILL.md

story-cover.SKILL.md
name: story-cover
version: 1.0.0
description: "小说封面生成。根据书名、作者名自动分析题材风格,调用 GPT-Image-2 生成含标题和署名的专业级网文封面;Codex CLI 优先使用内置 ImageGen,无需单独 API Key。触发方式:/story-cover、/封面、「帮我做个封面」「生成封面图」「做个小说封面」「封面设计」。"
metadata: {"openclaw":{"requires":{"env":["GPT_IMAGE_API_KEY"],"bins":["curl","jq","base64"]},"primaryEnv":"GPT_IMAGE_API_KEY","source":"https://github.com/zenstory-ai/oh-story-claudecode"}}

story-cover:小说封面生成

你是小说封面设计师。根据书名和题材,调用 GPT-Image-2 一次性生成包含书名和作者名的完整封面。

**核心原则:封面是读者的第一印象,一眼传达题材和氛围。**

---

生成通路

  • **Codex 内置(优先)**:当前 Codex CLI 会话可调用 `$imagegen` / `image_gen` 时,直接生成并落盘;计入 Codex 通用用量,无需 `OPENAI_API_KEY` 或 `GPT_IMAGE_API_KEY`,也不运行 `curl`。`story-cover` 自行调用工具,不让用户另开命令。
  • **API 回退**:仅在会话没有内置工具或用户明确指定 API 时使用,需要 `GPT_IMAGE_API_KEY`。工具缺失不等于 Codex 订阅不支持生图;内置调用失败时先报告错误,不静默切换到可能收费的 API。

输出参数与 API 回退环境变量

| 变量 | 必填 | 默认 | 说明 | |:-----|:----:|:-----|:-----| | `GPT_IMAGE_API_KEY` | API 回退必填 | — | OpenAI 或兼容代理的 API Key;Codex 内置通路不用 | | `GPT_IMAGE_BASE_URL` | | `https://api.openai.com/v1` | 兼容代理时改这个 | | `GPT_IMAGE_MODEL` | | `gpt-image-2` | 仅在测试新模型时覆盖 | | `GPT_IMAGE_SIZE` | | `1024x1536` | API 回退的目标比例提示(番茄 3:4→`768x1024`,默认 2:3→`1024x1536`)。官方 gpt-image-2 认任意 16 倍数尺寸(比例≤3:1),但**很多中转代理会忽略 size、按预设返回约 2:3**(已实测)——平台尺寸不靠它,由「导出平台上传尺寸」步骤兜底 | | `UPLOAD_SIZE` | | — | 平台固定上传像素(番茄 `600x800`);设置后由「导出平台上传尺寸」步骤居中裁剪+缩放出上传版(不变形、不依赖出图尺寸) | | `BOOK_DIR` | ✅ | — | 输出目录,建议 `./covers/<书名>` | | `REF_IMAGE` | | — | 参考图本地路径或 URL;内置通路先把图片载入会话,API 回退走 `images/edits` 图生图 |

---

生成流程

Step 1:收集信息

必填:书名、作者名(笔名)、目标平台、输出目录 `BOOK_DIR`(建议 `./covers/<书名>`;API 回退用环境变量,内置通路直接使用当前任务值) 选填:参考图 `REF_IMAGE`(本地路径或 URL,设置后切换到图生图)、风格偏好、尺寸

> **书名和笔名是封面必需信息**:缺任一必须先用 AskUserQuestion 问用户补全,不得编造或留空。

**按目标平台定封面尺寸**:番茄上传 600×800 是 **3:4**(不是 2:3),出图比例不对、平台二次裁剪就会切掉书名/笔名。

| 平台 | 上传尺寸 | 比例 | 生成 `GPT_IMAGE_SIZE`(尽量) | |:-----|:--------|:-----|:-------------------| | 番茄小说 | 600×800 | 3:4 | `768x1024` | | 其他平台(默认竖版) | 按平台规格 | 2:3 | `1024x1536` |

内置通路把目标比例写进提示词;API 回退再 `export GPT_IMAGE_SIZE`(很多代理会忽略、返回约 2:3)。平台有固定上传像素时设置 `UPLOAD_SIZE`(番茄 `600x800`)。**平台尺寸最终由「导出平台上传尺寸」步骤居中裁剪+缩放保证,不依赖实际出图尺寸。** 平台与题材风格见 [references/cover-styles.md](references/cover-styles.md)。

Step 2:题材判定

扫描书名(必要时简介)中的关键词,对照 [references/cover-styles.md](references/cover-styles.md) 的「题材推断规则」表选定题材。

  • 单题材命中 → 直接采用
  • 多题材命中 → 按优先级取一:仙侠 > 西幻 > 古言 > 现言 > 都市 > 悬疑 > 科幻 > 历史 > 灵异 > 轻小说
  • 零命中 → 默认 `都市`

Step 3:构建提示词

提示词 = **文字层** + **风格层** + **画面层**,全部用英文编写。

文字层:书名 + 作者名字体设计

在提示词中直接包含中文书名和作者名,GPT-Image-2 可直接渲染。**重点描述字体风格**:

Title text '书名' at top center in [书名字体风格].
Author name '作者名' at bottom center in [作者名字体风格].

书名字体风格

| 题材 | 描述关键词 | |:-----|:-----------| | 玄幻/仙侠 | `bold golden brush calligraphy with metallic glow and sharp strokes` | | 都市 | `modern bold sans-serif with metallic silver finish` | | 古言/宫斗 | `elegant golden traditional Kai script with ornate decoration` | | 现言/甜宠 | `soft rounded handwritten style in white with pink glow` | | 悬疑/推理 | `distorted bold cracked letters in blood red` | | 科幻/末世 | `neon glowing futuristic font in electric blue` | | 西幻 | `metallic embossed fantasy lettering with glow effect` | | 历史/军事 | `heavy stone-carved seal script in deep red` | | 灵异/恐怖 | `eerie dripping handwritten font in sickly green` | | 轻小说 | `colorful cartoon outlined bubbly font` |

作者名字体风格(重点:作者名必须精心设计,不能只是"小字")

作者名虽小,但是封面专业感的关键。必须指定:**字体 + 颜色 + 装饰元素**,让作者名与书名风格呼应但不抢焦点。

| 题材 | 作者名风格提示词 | |:-----|:----------------| | 玄幻/仙侠 | `small refined white serif text with faint golden glow, flanked by delicate cloud-scroll ornaments on both sides, resting on a thin horizontal gold line` | | 都市 | `small clean white modern text with subtle drop shadow, positioned above a thin silver horizontal divider line` | | 古言/宫斗 | `small elegant dark red traditional text inside a thin golden rectangular border frame with corner decorations` | | 现言/甜宠 | `small soft pink-white handwritten text with a tiny heart motif on the left side, light sparkle effect` | | 悬疑/推理 | `small pale grey text with slight blur effect, almost hidden in the shadows, a thin cracked line underneath` | | 科幻/末世 | `small crisp white monospace text with subtle cyan scanline overlay, flanked by small geometric brackets` | | 西幻 | `small bronze medieval script text with aged parchment texture, enclosed in a small decorative shield or banner shape` | | 历史/军事 | `small dignified white Song typeface text above a double horizontal line in dark red` | | 灵异/恐怖 | `small faded grey-green text slightly tilted, with a thin dripping ink line above` | | 轻小说 | `small playful rounded white text with pastel color outline, tiny star decorations on both sides` |

**作者名通用规则**:

  • 大小:`small`(不能太大抢书名焦点,也不能太小看不清)
  • 位置:`at bottom center`,与画面底部保持适当间距
  • 必须有装饰元素:线条/边框/小图标/光效中至少一种
  • 颜色与背景形成对比但不刺眼

风格层:平台风格

平台风格的描述关键词统一来自 [references/cover-styles.md](references/cover-styles.md) 的「平台风格」节,按目标平台直接取对应关键词串使用,不在本文件维护副本以免与参考文件漂移。

画面层:题材 + 构图

从 [references/cover-styles.md](references/cover-styles.md) 读取题材对应的风格标签、色彩、人物、背景描述。

构图变体(首次输出 2-3 个方案):

| 方案 | 构图 | 适合题材 | |:-----|:-----|:---------| | A | 人物特写 + 场景 | 全题材通用 | | B | 全身像 + 动态姿势 | 玄幻、都市、西幻 | | C | 纯场景/氛围图 | 悬疑、科幻、历史 |

完整提示词模板

Chinese web novel cover design, [平台风格].
Title text '{书名}' at top center in [书名字体风格].
Author name '{作者名}' at bottom center in [作者名字体风格 — 从上表选择].
[题材风格标签]. [人物描述]. [背景描述].
[色彩指令]. [光效指令].
Professional book cover, high detail digital painting, portrait [平台比例:番茄=3:4,默认=2:3] ratio, keep title and author name inside the central safe area away from edges (inner ~85%), no watermark

提示词技巧(实测验证)

  • 人物描述越具体越好:服饰、姿态、发型、表情、道具每个维度都指定
  • 背景分层:前景(人物)→ 中景(场景)→ 远景(氛围)
  • 光效是指定光源方向 + 颜色(如 `dramatic golden light from above`)
  • 用 `digital painting style` 而非 `photo`,避免真人照片感

Step 4:生成并保存

Codex 内置 ImageGen(优先)

1. 用 Step 3 的完整提示词调用 `image_gen`。比例和安全区写进提示词,不传 `GPT_IMAGE_MODEL`、`GPT_IMAGE_SIZE`、`response_format` 等 API 参数。 2. 有 `REF_IMAGE` 时,本地文件先用图片查看工具载入会话;URL 先下载再载入。说明它是编辑目标还是风格参考,并列出必须保持的内容。 3. 每个构图方案单独调用一次。先创建 `BOOK_DIR/封面/`,

Read more
Ships withoh-story

网文写作 skill 包,覆盖长篇与短篇网络小说的扫榜、拆文、写作、去AI味、封面图全流程。内置适配 Claude Code、Google Antigravity、OpenCode、ZCode、OpenClaw、Codex CLI、Reasonix;能读取项目文件的 Web AI / Agent 环境也可按通用 skills 路径使用。 Oh Story is an open-source skill pack that turns coding agents — Claude Code, Codex CLI,

Get the whole plugin
Stats
6,889
Stars
980
Forks
Active
Maintenance
JavaScript
Language
MIT
License
3h ago
Last commit
4mo ago
Created

Repo: worldwonderer/oh-story-claudecode

Other skills on oh-story.

story-import
Skill

story-import

逆向导入已有小说。将已写好的小说(半成品或完本)反向解析为标准项目目录结构,兼容 story-long-write / story-short-write 后续写作流程;内部复用 story-long-analyze / story-short-analyze…

story-long-analyze
Skill

story-long-analyze

长篇网文拆文。深度拆解爆款长篇小说的黄金三章、人设架构、爽点设计、节奏控制。单一深度拆解管道:跑完黄金三章(Stage 1)后产出快速预览报告并询问是否继续全量拆解,确认后从 Stage 2 续跑逐章摘要、聚合分析、设定关系、汇总报告,全程产物落盘…

story-long-write
Skill

story-long-write

长篇网文写作。从大纲到正文,辅助长篇网络小说的创作,包括世界观、人物、情节线管理。触发方式:/story-long-write、/写长篇、「帮我开书」「写大纲」「日更」「续写」「继续写」「修改第X章」「回炉」「重写第X章」。