Agent skill

story-cover

小说封面生成。根据书名、作者名自动分析题材风格,调用 GPT-Image-2 直接生成含标题和署名的专业级网文封面。触发方式:/story-cover、/封面、「帮我做个封面」「生成封面图」「做个小说封面」「封面设计」。

pitechen592★ · +23/wk · 2 repos on radarProfile →
claude-codeMIT
Install
npx skills add worldwonderer/oh-story-claudecode --skill story-cover --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 10 KB
Bundled scripts: none
Version: 1.0.0
Path: skills/story-cover/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 5,024
Language: JavaScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# story-cover:小说封面生成 你是小说封面设计师。根据书名和题材,调用 GPT-Image-2 一次性生成包含书名和作者名的完整封面。 **核心原则:封面是读者的第一印象,一眼传达题材和氛围。** --- ## 环境变量 | 变量 | 必填 | 默认 | 说明 | |:-----|:----:|:-----|:-----| | `GPT_IMAGE_API_KEY` | ✅ | — | OpenAI 或兼容代理的 API Key | | `GPT_IMAGE_BASE_URL` | | `https://api.openai.com/v1` | 兼容代理时改这个 | | `GPT_IMAGE_MODEL` | | `gpt-image-2` | 仅在测试新模型时覆盖 | | `GPT_IMAGE_SIZE` | | `1024x1536` | 目标比例提示(番茄 3:4→`768x1024`,默认 2:3→`1024x1536`)。官方 gpt-image-2 认任意 16 倍数尺寸(比例≤3:1),但**很多中转代理会忽略 size、按预设返回约 2:3**(已实测)——平台尺寸不靠它,由「导出平台上传尺寸」步骤兜底 | | `UPLOAD_SIZE` | | — | 平台固定上传像素(番茄 `600x800`);设置后由「导出平台上传尺寸」步骤居中裁剪+缩放出上传版(不变形、不依赖出图尺寸) | | `BOOK_DIR` | ✅ | — | 输出目录,建议 `./covers/<书名>` | | `REF_IMAGE` | | — | 参考图本地路径或 URL;设置后走 `images/edits` 图生图 | --- ## 生成流程 ### Step 1:收集信息 必填:书名、作者名(笔名)、目标平台、输出目录 `BOOK_DIR`(建议 `./covers/<书名>`,调用前 export) 选填:参考图 `REF_IMAGE`(本地路径或 URL,设置后切换到图生图)、风格偏好、尺寸 > **书名和笔名是封面必需信息**:缺任一必须先用 AskUserQuestion 问用户补全,不得编造或留空。 **按目标平台定封面尺寸**:番茄上传 600×800 是 **3:4**(不是 2:3),出图比例不对、平台二次裁剪就会切掉书名/笔名。 | 平台 | 上传尺寸 | 比例 | 生成 `GPT_IMAGE_SIZE`(尽量) | |:-----|:--------|:-----|:-------------------| | 番茄小说 | 600×800 | 3:4 | `768x1024` | | 其他平台(默认竖版) | 按平台规格 | 2:3 | `1024x1536` | `export GPT_IMAGE_SIZE` 给目标比例(官

What's inside
Steps it walks through
  1. 环境变量
  2. 生成流程
  3. Step 1:收集信息
  4. Step 2:题材判定
  5. Step 3:构建提示词
  6. Step 4:调用 API 并保存
  7. Step 5:导出平台上传尺寸(平台有固定像素时)
  8. Step 6:质量检查 + 迭代
  9. 参考资料
  10. 语言
Ships with 1 file
  • references/cover-styles.md
Commands it runs
set -euo pipefail
mkdir -p "$BOOK_DIR/封面"
while [ -f "$BOOK_DIR/封面/封面_v${i}.png" ]; do i=$((i+1)); done
trap 'rm -f "$RESP"' EXIT
curl -fsS --max-time 180 --retry 2 --retry-delay 5 \
API 出错时早退,避免把 error JSON 当成 base64 写成损坏 PNG
if jq -e '.error' "$RESP" >/dev/null 2>&1; then
echo "API error:" >&2
jq '.error' "$RESP" >&2
exit 1
More from oh-story-claudecode
All skills →
About this skill
What does the story-cover skill do?

小说封面生成。根据书名、作者名自动分析题材风格,调用 GPT-Image-2 直接生成含标题和署名的专业级网文封面。触发方式:/story-cover、/封面、「帮我做个封面」「生成封面图」「做个小说封面」「封面设计」。

How do I install it?

Run `npx skills add worldwonderer/oh-story-claudecode --skill story-cover --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From worldwonderer/oh-story-claudecode, a repository with 5,024 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going