← Back to Skills Marketplace
edwardwason

wx-peitu

by AI花生 · GitHub ↗ · v6.0.0 · MIT-0
cross-platform ⚠ suspicious
33
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install wx-peitu
Description
公众号长文配图生成器。输入MD文章,输出PNG配图包,同步到飞书云盘。Invoke for '公众号配图'/'文章配图'/'长文配图'/'公众号排版'. Do NOT use for editing existing code.
README (SKILL.md)

公众号长文配图生成器 v6.0

Persona: 你是一位公众号长文配图大师。你的工作不是让用户理解设计术语,而是通过简单问题,把用户模糊的"好看"翻译成精确的设计参数。你说的每一句话,都应该是用户能直接回答的。

Task

输入 MD 长文,输出公众号配图 PNG 包。每张配图生成独立 HTML → Puppeteer 截图 → PNG → 保存到桌面文件夹 → 同步到飞书云盘。

核心交付物: PNG/JPEG 图片,不是代码。

Out of Scope

  • 全文排版 → 用 md2wechat-skill 或 Kami
  • 视频/动效 → 用视频工具
  • 纯图片编辑 → 用图片编辑器
  • 追星粉丝向 → 视觉语言不匹配
  • 纯促销硬广 → 违反内容优先设计哲学
  • 超过15张配图 → 考虑拆分文章

Mode Detection

User says "大师推荐"/"你定"/"直接来"/"快速搞定"?
  → YES: Master Mode (全自动,跳过确认)

  → NO: Multi-Illustration Mode (6步流程,2个确认点)

Master Mode

零门槛全自动生成:

  1. Auto-parse 文章 → 提取可视化单元
  2. Auto-score 密度 → 静默跳过不达标项
  3. Auto-match 风格 → 品类检测 + 文章调性
  4. Batch generate HTML → 截图 → 保存桌面 → 同步云盘
  5. Show results + 使用指南

不满意 → 进入"微调模式"(只改指定配图)。


Multi-Illustration Mode

Read references/workflow.md for full spec.

MD文章 → Step A: 解析 → Step B: 方案(确认1) → Step C: 风格(确认2) → Step D: 生成HTML → Step E: 使用指南 → Step F: 截图交付+云盘同步

Step A: Article Parsing (静默)

从文章提取20种可视化单元(核心论点、数据点、逻辑链、流程、对比、金句等),每单元标注 Purpose(attention/readability/memorability/conversion)。Read references/workflow.md Step A.

Step B: Illustration Plan (确认点1)

展示配图方案(emoji + 一句话描述)。密度评分内部计算,不暴露给用户。Read references/workflow.md Step B.

用户可以:确认 / 去掉 / 加上 / 合并 / "大师推荐"跳过。

Step C: Style Customization (确认点2)

3个简单问题定风格。品类自动检测(10品类)。视觉节奏规划。Read references/workflow.md Step C.

跳过条件:"直接生成" / "大师推荐"。

Step D: Batch Generate HTML

每张配图生成独立 HTML 文件(内联CSS + \x3Cimg>标签背景 + 固定尺寸 + overflow:hidden)。Read references/workflow.md Step D.

输出目录:

[article-name]-illustrations/
├── 01-cover.html
├── 02-metrics.html
├── ...
├── 08-back-cover.html
└── screenshot.js          ← 一键截图脚本

封面/封底必须用照片背景\x3Cimg> 标签,非 CSS background-image)。

Step E: Illustration Map

展示文章章节 ↔ 配图映射 + 使用指南。Read references/workflow.md Step E.

Step F: Screenshot & Deliver & Sync

完整交付流程(3步自动执行):

  1. 截图: Puppeteer-core + 系统Chrome → PNG
  2. 本地保存: PNG 保存到桌面文件夹 ~/Desktop/[文章名]公众号配图/,用 explorer.exe 打开
  3. 飞书云盘同步: 用 lark-cli drive +create-folder 创建同名文件夹 → lark-cli drive +upload 逐张上传 → 返回云盘链接

Read references/workflow.md Step F.

关键规则:照片背景必须用 \x3Cimg> 标签(非CSS background-image),确保Puppeteer兼容。


Rules

Design Philosophy

  1. 双风格系统: Editorial Magazine(衬线+暖纸底+水墨氛围)或 Swiss International(无衬线+灰白底+单一accent)。Read references/design-system.md.
  2. Content-first: 布局服务内容结构。每个视觉元素承载信息。
  3. 三大约束: 克制(品牌色≤5%) + 呼吸(whisper shadow) + 温度(暖灰色系)。不可协商。 Read references/design-system.md.

Typography & Style

  1. WeChat Card Type Scale: 640px画布专用字号(Display 36-44px/300-400, Body 14-16px/400, Meta 10-12px/500)。最大比例4:1。Read references/design-system.md.
  2. 越大越轻: 大字轻字重,小字重字重。44px+标题weight≤400。
  3. 本地字体优先: CJK字体本地优先,衬线weight锁定500。Read references/design-system.md.

Quality Gates

  1. 密度门控: 单张≥9/15。8类48条反模式。Read references/quality-gates.md.
  2. AI Voice去污染: 禁止AI官话、空洞强调、假精确。Read references/quality-gates.md Category 8.
  3. 公众号密度检查: 活跃构图≥70%,≥3内容元素,缩略图测试。Read references/workflow.md.

Images & Delivery

  1. 图源优先级: 用户图片 > Unsplash(Editorial) / Pexels(通用) / Wallhaven(暗色科技)。照片背景用\x3Cimg>标签。Read references/assets.md.
  2. 截图交付: Puppeteer-core → PNG → 桌面文件夹 → 飞书云盘同步。Read references/workflow.md Step F.
  3. 公众号尺寸规范: 封面900×383, 正文640×auto, 金句640×640, 分隔640×200, 封底900×383。Read references/workflow.md.

必读参考文件

文件 用途
references/workflow.md 6步工作流:解析→方案→风格→生成HTML→指南→截图交付+云盘同步
references/design-system.md 设计系统:双风格+字号阶梯+色板+品牌DNA+布局
references/quality-gates.md 质量门控:密度评分+48条反模式+AI去污染
references/assets.md 资源:图库接入+图表系统+截图美化+HTML模板规范
Usage Guidance
Install only if you are comfortable with the agent creating local Desktop files, launching a browser-based screenshot workflow, loading third-party fonts/images, and using your existing lark-cli access to upload generated images. For sensitive drafts, use a local-only run, disable or refuse cloud sync, and ask the agent to confirm the exact files and destination before Step F.
Capability Tags
cryptorequires-sensitive-credentials
Capability Assessment
Purpose & Capability
The stated purpose, generating WeChat article illustration PNG packs from Markdown, matches the main workflow: HTML generation, Puppeteer screenshots, local PNG output, and Lark Drive sync are described as core features.
Instruction Scope
The skill defines Master Mode as fully automatic and able to skip confirmations, while the same flow performs file creation, folder opening, and cloud upload. Broad trigger phrases like “大师推荐”, “你定”, and “直接来” increase the chance of accidental activation.
Install Mechanism
The artifact contains markdown instructions only and no bundled executable installer, package scripts, or hidden install-time code. Installation is documented as ClawHub install or manual git clone.
Credentials
Runtime guidance asks the agent to use system Chrome, registry/path discovery, Puppeteer with no-sandbox flags, remote fonts/images, and explorer.exe. Much of this is related to screenshot delivery, but it is broader host interaction than a simple content-generation skill needs.
Persistence & Privilege
The workflow saves generated images to a predictable Desktop folder and uploads them with lark-cli to Feishu/Lark Drive. This is disclosed, but the artifacts do not require explicit per-run approval, destination review, or local-only default before transmitting potentially sensitive article content.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install wx-peitu
  3. After installation, invoke the skill by name or use /wx-peitu
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v6.0.0
v6.0.0: Architecture overhaul - React JSX to pure HTML, 23 styles to 2, 9 refs to 4, Puppeteer PNG delivery, Lark Drive sync, Layout Diversity Rule, Tweak Mode
Metadata
Slug wx-peitu
Version 6.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is wx-peitu?

公众号长文配图生成器。输入MD文章,输出PNG配图包,同步到飞书云盘。Invoke for '公众号配图'/'文章配图'/'长文配图'/'公众号排版'. Do NOT use for editing existing code. It is an AI Agent Skill for Claude Code / OpenClaw, with 33 downloads so far.

How do I install wx-peitu?

Run "/install wx-peitu" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is wx-peitu free?

Yes, wx-peitu is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does wx-peitu support?

wx-peitu is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created wx-peitu?

It is built and maintained by AI花生 (@edwardwason); the current version is v6.0.0.

💬 Comments