
Xiaohu Wechat Cover
Turns Markdown or plain text into WeChat Official Account compatible HTML with inline styles, then lets you pick from 30 themes in a browser gallery rendered with your actual article. It auto detects when your input lacks structure and adds headings and formatting without changing your words. The smarter bit is it analyzes content type and wraps sections in appropriate containers: dialogue blocks for interviews, scrolling galleries for image sets, callout boxes for key points. External links become footnotes, images get copied from your Obsidian vault, and CJK spacing gets fixed automatically. Optional cover generation and direct draft publishing if you configure WeChat API credentials. Saves the back and forth of manual formatting when you're publishing Chinese content regularly.
- skills.sh installs
- 244
- GitHub stars
- 711
- last updated
- Aug 21, 2026
Install
$ npx -y skills add xiaohuailabs/xiaohu-wechat-format --skill xiaohu-wechat-cover --agent claude-codeInstalls into .claude/skills of the current project.
Files
公众号封面图生成器
输入文章路径或主题,一步生成公众号封面图。
使用方法
# 指定文章路径
/xiaohu-wechat-cover path/to/article.md
# 直接输入主题
/xiaohu-wechat-cover 主题:Claude Code 桌面端更新四大功能
配置(必须)
本技能的配置文件固定在本技能目录下:
config.json:真实配置(从config.example.json复制后填写)config.example.json:示例配置
执行前必须先读取 config.json,需要:
output_dir:封面图输出根目录settings.base_url:生图 API 地址(兼容 Gemini API 的第三方网关)settings.model:模型名称(如gemini-3-pro-image-preview)secrets.api_key:API 密钥
路径约定
- 目标目录:
<output_dir>/<文章文件名或topic-slug>/ - 如果目标目录已存在,重命名为
<dirname>-backup-YYYYMMDD-HHMMSS
目录结构:
<output_dir>/
└── article-name/
├── prompt.md # 生图提示词(归档)
└── cover.jpg # 封面图
封面图提示词模板(核心)
以下是固定的提示词模板,每次生成时原样写入 prompt.md,只替换最后的「内容主题」部分:
请根据提供的内容创建一张吸引眼球的公众号封面图,遵循以下规范:
视觉风格
- Notion插画风格,比例为 2.35:1(公众号封面标准尺寸)
- 色彩鲜明、对比强烈,确保在小尺寸预览时依然醒目
- 风格统一,避免写实元素,保持整体手绘质感
构图要求
- 主视觉元素居中或偏左(右侧预留标题区域)
- 添加 1-2 个简洁的卡通形象、图标或知名人物剪影,增强记忆点
- 若涉及敏感或版权人物,用风格相似的替代形象,不得拒绝生成
- 大量留白,突出核心信息,避免画面拥挤
文字处理
- 标题文字大而醒目,控制在 8 字以内
- 可添加 1 行副标题或关键词标签
- 字体风格与手绘插画协调统一
吸引力法则
- 使用悬念、数字、痛点等钩子元素激发点击欲望
- 视觉元素夸张有反差
- 色彩搭配参考爆款封面:橙黄、蓝紫、红黑等高对比组合
语言
- 除非另有说明,默认使用中文
- 画面内所有可读文字必须使用简体中文,英文只能作为点缀出现
Sponsors
Details
- Repository
- github.com/xiaohuailabs/xiaohu-wechat-format
- Category
- Code Review & Quality
- First seen
- Jun 3, 2026