# 公众号配图生成器

> Generate one cover image and two inline illustrations for a WeChat article draft, prioritizing a 2.35:1 cover ratio and returning a structured image bundle.

- Skill: `bbwdadfg/skill-4` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add bbwdadfg/skill-4`
- Raw SKILL.md: https://api.skillmd.com/api/skills/bbwdadfg/skill-4/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: bbwdadfg (https://skillmd.com/u/bbwdadfg)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/bbwdadfg/skill-4

---


# 公众号配图生成器

这个 skill 只负责生成公众号配图，不负责写文案或做发布。

## 目标产物

- 1 张封面图
- 2 张正文插图

其中：
- 封面图目标比例为 `2.35:1`
- 如果模型不支持精确比例，允许退到最接近的横向比例，但必须记录实际比例
- 正文插图分别用于文章约三分之一处和三分之二处

## 输入

- `input`: `article_draft.json`
- `cover_ratio_target`: 默认 `2.35:1`
- `inline_count`: 固定为 `2`
- `out`: 输出文件路径，推荐 `image_bundle.json`

输入应满足 [`../shared/schemas/article_draft.schema.json`](../shared/schemas/article_draft.schema.json)。

## 输出

输出应满足 [`../shared/schemas/image_bundle.schema.json`](../shared/schemas/image_bundle.schema.json)：

- `cover_image_path`
- `cover_image_url`
- `cover_ratio_actual`
- `inline_image_1_path`
- `inline_image_2_path`
- `inline_positions`
- `alt_texts`
- `generation_metadata`
- `status`

## 规则

- 只根据 `image_briefs` 生成，不擅自重写文章意图
- 不改变插图数量
- 不决定发布样式，只负责产出可复用素材
- 对于正文插图，要附带清晰的 `alt_texts`
- `inline_positions` 固定标记为 `one_third` 与 `two_thirds`

## 工作流程

1. 读取 `article_draft.json` 中的 `image_briefs`。
2. 生成封面图。
3. 生成两张正文插图。
4. 记录实际比例、文件路径和元数据。
5. 输出 `image_bundle.json`。

## 实施说明

如果已有图片生成脚本，优先使用 `scripts/` 中的稳定入口。
如果脚本尚未实现，可先按本 contract 产出 prompt、路径规划和元数据占位。


