aws-wechat-article-images

为公众号文章生成封面图和正文配图,根据文章内容自动匹配风格。当用户提到「封面」「配图」「插图」「生成图片」「给文章加图」「做个封面」「文章插图」「配个图」时使用。

3,891 stars

Best use case

aws-wechat-article-images is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

为公众号文章生成封面图和正文配图,根据文章内容自动匹配风格。当用户提到「封面」「配图」「插图」「生成图片」「给文章加图」「做个封面」「文章插图」「配个图」时使用。

Teams using aws-wechat-article-images should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/aws-wechat-article-images/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/bbd145/aws-wechat-article-images/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/aws-wechat-article-images/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How aws-wechat-article-images Compares

Feature / Agentaws-wechat-article-imagesStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

为公众号文章生成封面图和正文配图,根据文章内容自动匹配风格。当用户提到「封面」「配图」「插图」「生成图片」「给文章加图」「做个封面」「文章插图」「配个图」时使用。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# 配图

## 路由

完整长文从选题到发布 → [aws-wechat-article-main](../aws-wechat-article-main/SKILL.md);图片消息/九宫格等多图推送 → [aws-wechat-sticker](../aws-wechat-sticker/SKILL.md)。

读取文章中的配图标记,按 Type × Style 体系生成图片。专注于**长文配图**,贴图请用 sticker。

## 脚本目录

**Agent 执行**:确定本 SKILL.md 所在目录为 `{baseDir}`(仓库内即 `skills/aws-wechat-article-images/`)。

| 脚本 | 用途 |
|------|------|
| `scripts/image_create.py` | 专用生图 API:读 **`.aws-article/config.yaml`** 的 **`image_model`** + 仓库根 **`aws.env`** 的 **`IMAGE_MODEL_API_KEY`**|

## 配置检查 ⛔

任何操作执行前,**必须**按 **[首次引导](../aws-wechat-article-main/references/first-time-setup.md)** 执行其中的 **「检测顺序」**。检测通过后才能进行以下操作(或用户明确书面确认「本次不检查」):

从选题到发布的**前置规则**见 [aws-wechat-article-main/SKILL.md](../aws-wechat-article-main/SKILL.md);本 skill 只描述配图步骤。

**图片模型**:**`image_model`**(`provider`、`base_url`、`model`、`default_size`、`default_quality` 等)在 **`config.yaml`**;**`IMAGE_MODEL_API_KEY`** 在 **`aws.env`**。键名对照 **`.aws-article/env.example.yaml`**。

**交互约定**:可提示用户上述项是否已填;**一条龙**下通常已通过 **`validate_env.py`**。须遵守 main 的**智能体行为约束**——未通过环境校验且未获用户明确「本次例外」时,不得假装已走专用生图 API。

## Type × Style 体系

Type(画面构成)× Style(视觉风格)自由组合。

完整风格库、兼容矩阵、预设组合、prompt 模板:见 [shared/image-styles/](../shared/image-styles/) 目录。

## 工作流

```
配图进度:
- [ ] 第1步:环境检查 + 本篇约束与文章
- [ ] 第2步:解析配图标记
- [ ] 第3步:确定风格
- [ ] 第4步:生成配图方案
- [ ] 第5步:展示方案并等待确认 ⛔
- [ ] 第6步:生成图片(**脚本失败时**见同节「调用失败」分支,勿静默吞掉报错)
- [ ] 第7步:插入文章
```

### 第1步:环境检查 + 本篇约束与文章

- **全局**:读 **`.aws-article/config.yaml`** — `cover_aspect`、`cover_style`、`image_density`、`caption_style`、`default_image_style`、`multi_image_count`、`tone` 等以之为准(完整字段见 [articlescreening-schema.md](../aws-wechat-article-main/references/articlescreening-schema.md) 与 **`config.example.yaml`**)。
- **本篇**:若同目录有 **`article.yaml`**,可读取 **`cover_image`** 等本篇字段;与 **`config.yaml`** 同名字段时**本篇优先**(与写稿侧合并规则一致)。
- 读取 **`article.md`**(或当前流程规定的正文来源)。

### 第2步:解析配图标记

提取所有 `![类型:描述](placeholder)`。`实证` 类型提示用户提供素材或从 `.aws-article/assets/` 搜索。

**可用素材库**:

- `.aws-article/assets/screenshots/` — 可直接复用的产品/系统截图。优先用于「实证」「界面」类图片;如含敏感信息请打码后使用。

### 第3步:确定风格

**风格加载优先级**:
1. 用户指定(「用水彩风」)
2. **`config.yaml`** 的 **`default_image_style`**(若有)
3. `.aws-article/presets/image-styles/` 下的自定义风格
4. **fallback**:根据正文与 **`config.yaml`** 的 **`tone`** 自动推荐(规则见 [auto-selection.md](../shared/image-styles/auto-selection.md)),默认「扁平矢量」

全文统一风格。完整风格库:[shared/image-styles/styles.md](../shared/image-styles/styles.md)

### 第4步:生成配图方案

为每张图生成方案(类型、风格、prompt 要点)。

**图片内文字**:画面中出现的文字必须为中文。在 prompt 里**直接写出要显示的中文文案**(如「传统对话AI」「OpenClaw」),禁止只写 “labels in Chinese” 或 “Chinese or English OK”,否则模型会生成英文。

Prompt 构建:[shared/image-styles/prompt-construction.md](../shared/image-styles/prompt-construction.md)

### 第5步:展示方案并等待确认 ⛔

### 第6步:生成图片

**生成方式(优先级)**:

1. **优先:调用专用生图 API**(`scripts/image_create.py`)— 依赖 **`config.yaml` 的 `image_model` + `aws.env` 的 `IMAGE_MODEL_API_KEY`**
2. **降级:当前 Agent 多模态 / 仅出 prompts** — 仅当环境未就绪、用户接受 main「本次例外」、或**已按本节下方「调用失败」表格处理**(网络重试后仍失败等)时

**必须告知用户当前使用的方式**:

- 已配置且调用脚本 → `ℹ️ 使用 image_create.py 调用专用生图模型({model})`
- Agent 生图 / 仅 prompts → `ℹ️ 本次未走 image_create.py(原因:…)`

**⛔ 未调用专用 API 时的终点**:只做到第 4 步(或第 5 步)。产出 `imgs/prompts/*.md` 与方案;**不执行**「替换 article 中的 placeholder」或「修复 HTML」。若 `imgs/README.md` 尚不存在或需补充当前方案的说明,可创建/更新(如何配置 **`aws.env` / `config.yaml`**、如何跑 `image_create.py batch`、如何在 `article.html` 中替换);若已存在且已涵盖当前方案,**不必重写**。

**调用专用 API 时**(在**仓库根**执行,`{baseDir}` 按上表解析;路径按本篇 `imgs/` 调整):

```bash
python {baseDir}/scripts/image_create.py batch drafts/YYYYMMDD-slug/imgs/prompts/ -o drafts/YYYYMMDD-slug/imgs/
```

单张:`python {baseDir}/scripts/image_create.py generate imgs/prompts/01-cover.md -o imgs/01-cover.png`

连通性自检:`python {baseDir}/scripts/image_create.py test`

图片规格:[references/specs.md](references/specs.md)

#### `image_create.py` 调用失败时(智能体必选分支)

只要执行了 `image_create.py` 且**非零退出或 stderr 有 API/网络错误**,就必须走本节,**不得**只说「生图失败」而不分类、不摘要报错。

运行脚本后**须把终端 stderr 中的具体报错摘要给用户**(含 `❌`、HTTP 状态码、`【配置/认证】`、`网络错误(可重试)` 等关键行),勿只说「失败」。

| 类型 | 判断线索 | 智能体动作 |
|------|----------|------------|
| **网络类** | `URLError`、`网络错误(可重试)`、超时、临时 502/503 | **必须自动再试 1 次**(可短暂等待后重跑同一命令)。**第二次仍为网络类** → 可降级为 **Agent 多模态生图** 或仅保留 prompts;**须明确告知**用户本次未走专用 API。 |
| **配置/凭证类** | 401/403、图片模型配置不完整、`【配置/认证】` | **不要**静默降级。**列出须检查项**(**`config.yaml` 的 `image_model`**、**`aws.env` 的 `IMAGE_MODEL_API_KEY`**、端点、权限),请用户改正后重跑。用户**明确打字**接受本次仅用 Agent/仅 prompts 时,再按 main「本次例外」处理。 |
| **业务/参数类** | `【请求参数】`、400、返回体提示 model/size 不支持 | 将响应摘要给用户;可改 **`config.yaml` 或 env** 中的 model/尺寸后再试;仍失败则与用户商定是否 Agent 生图。 |

**禁止**:配置明显错误时静默改用 Agent 却不说明;网络降级后不告知「本次未走专用生图」。

### 第7步:插入文章

仅当**已生成图片**时执行:替换 placeholder 为实际图片路径,输出到 `imgs/`。

**修复 HTML 的触发条件**:仅当在 `article.html` 中**确实存在** `href="placeholder"` 或 placeholder 被渲染成可点击链接时,才将误转的 `<a>` 改为 `<img>` 或占位说明;**不要**默认每次都执行「修复流程图占位」或「修复 HTML」。

## 过程文件

| 读取 | 产出 |
|------|------|
| **`article.md`**、**`.aws-article/config.yaml`**、本篇可选 **`article.yaml`** 中的标记与配图约束 | `imgs/`(outline + prompts + 图片;未走 API 时为 prompts + 可选 imgs/README.md) |

Related Skills

name: welight-wechat-layout-publish

3891
from openclaw/skills

description: Welight standalone skill for turning an article into WeChat Official Accounts compatible Markdown/HTML, presenting built-in theme choices, and publishing to WeChat as a draft or formal post when publishing prerequisites are already configured.

Content & Documentation

wechat-publisher

3891
from openclaw/skills

一键发布 Markdown 到微信公众号草稿箱。基于 wenyan-cli,支持多主题、代码高亮、图片自动上传。

Content & Documentation

wechat-report

3891
from openclaw/skills

Generate a structured comparison report for multiple WeChat Official Account articles under one topic. Use this when the user wants several公众号文章 collected into one local report with article metadata, engagement status, content structure tables,爆款写法标签, and a later optional Feishu sync step.

wechat-collect

3891
from openclaw/skills

Fetch a public WeChat article URL, archive the raw HTML, and convert the article into a stage-1 compatible brief in `content-production/inbox/`. Use when Codex needs to collect公众号文章素材 or start the Stage 2 collect-to-create pipeline from a public `mp.weixin.qq.com` URL.

wechat-studio

3891
from openclaw/skills

Launch a local WeChat article workbench for Markdown import, WeChat HTML preview, theme tuning, image selection, and optional draft push. Use when Codex needs a browser-based preview and manual QA layer before publishing.

wechat-formatter

3891
from openclaw/skills

Render article markdown into WeChat-style HTML as an independent executor. Use when Codex needs公众号排版预览, WeChat HTML output, or a publishable HTML artifact generated from an article markdown draft.

wechat-article-extractor

3891
from openclaw/skills

Extract metadata and content from WeChat Official Account articles. Use when user needs to parse WeChat article URLs (mp.weixin.qq.com), extract article info (title, author, content, publish time, cover image), or convert WeChat articles to structured data. Supports various article types including posts, videos, images, voice messages, and reposts.

wechat-monitor

3891
from openclaw/skills

微信公众号调研 + 监控 + 报告推送。每个产品独立目录,互不影响。

wechat-auto-publishing-complete

3891
from openclaw/skills

Use this skill to fully reproduce and operate a local end-to-end WeChat Official Account publishing workflow: prepare the environment, validate dependencies, configure non-sensitive placeholders for credentials, gather source material, draft articles, prepare cover and body images, assemble a WeChat-ready Markdown package, publish to draft, optionally submit for formal publication, poll status, archive outputs, and attach scheduling or alerting. Use whenever the user wants a complete reproducible公众号自动发文 skill with environment setup, templates, runbooks, and execution scaffolding, while keeping all secrets and personal account details outside the skill package. Key real-world findings: freepublish does not always behave like manual platform publishing for homepage visibility, production mode should often default to draft-only, image files must be validated by real format rather than extension alone, and multi-account deployments should use isolated directories.

aws-wechat-article-review

3891
from openclaw/skills

审核公众号文章,检查敏感词、错别字、合规性和写作规范,输出修改清单。当用户提到「审稿」「审核」「检查一下」「校对」「合规」「敏感词」「错别字」「帮我看看」「写完了」「检查下有没有问题」「能不能发」时使用。

aws-wechat-article-publish

3891
from openclaw/skills

将文章发布到微信公众号(API 写入草稿箱或提交发布),含发布前检查。当用户提到「发布」「提交」「群发」「推送」「发出去」「上传到公众号」「发到公众号」「可以发了吗」「发布前检查」时使用。

aws-wechat-article-main

3891
from openclaw/skills

管理微信公众号从选题到发布的完整内容的固定流程,路由到各子能力。任何新任务执行时必须严格按这个流程顺序推进,选题 → 写稿 → 审稿(内容审) → 排版 → 配图 → 审稿(终审) →发布 ,且每一步完成是进入下一步的前提。当用户提到「公众号运营」「自动运营」「发篇文章」「内容规划」「怎么运营」「一条龙」「完整流程」「从头做」「帮我发一篇」「今天发什么」或需要了解整体流程时使用。