prompt-lookup
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use…
公众号一键排版技能。把任意文本内容(Markdown、纯文本、格式粗糙的笔记)转成微信公众号兼容的排版 HTML,AI 自动理解内容结构并增强排版,可视化选择主题后一键复制粘贴到微信后台。
Claude Code
$ npx -y skills add xiaohuailabs/xiaohu-wechat-format --skill xiaohu-wechat-format --agent claude-code
Codex
$ npx skills add xiaohuailabs/xiaohu-wechat-format --skill xiaohu-wechat-format -a codex -y
Cursor
$ npx skills add xiaohuailabs/xiaohu-wechat-format --skill xiaohu-wechat-format -a cursor -y
Gemini CLI
$ npx skills add xiaohuailabs/xiaohu-wechat-format --skill xiaohu-wechat-format -a gemini-cli -y
GitHub Copilot
$ npx skills add xiaohuailabs/xiaohu-wechat-format --skill xiaohu-wechat-format -a github-copilot -y
OpenCode
$ npx skills add xiaohuailabs/xiaohu-wechat-format --skill xiaohu-wechat-format -a opencode -y
Windsurf
$ npx skills add xiaohuailabs/xiaohu-wechat-format --skill xiaohu-wechat-format -a windsurf -y
公众号一键排版技能。把任意文本内容(Markdown、纯文本、格式粗糙的笔记)转成微信公众号兼容的排版 HTML,AI 自动理解内容结构并增强排版,可视化选择主题后一键复制粘贴到微信后台。
把文章转为微信公众号兼容的内联样式 HTML。支持 Markdown 和纯文本输入,AI 自动补充结构和排版增强。当用户说"排版""微信排版""格式化文章""format"时使用。
用户说以下任何一种:
1. 如果用户给了文件路径,直接读取 2. 如果没给路径,问用户要文章路径 3. 读取文章内容,确认标题和字数
读取文章后、进入排版前,**必须**跑一次中文正文半角标点修复:
python3 ~/.claude/skills/xiaohu-wechat-format/scripts/zh_punctuation_fix.py "文章路径.md" --write
脚本自动把中文字符旁的半角 `, : ; ? ! . ( )` 换成全角 `,:;?!。()`,保护代码块/行内 code/URL/Markdown 链接段不误伤。
输出会打印「违规: N → 0」。N > 0 = 原文有违规,已写回修复后内容。N = 0 = 已干净,零改动。
**此步不能跳过**——半角英文标点挤在中文字之间是典型 AI 味,读者第一眼就看出代码注释感。2026-04-19 根治:Claude Design 解读稿里 233 个半角逗号/84 冒号/70 括号混在中文正文,用户当场识破。
---
读取文章后,先检测输入内容的 Markdown 结构完整度,决定是否需要 AI 结构化预处理。
**检测方法**:扫描全文,统计 `##` 标题、`**加粗**`、`- 列表`、`> 引用`、`` ` 代码 ` `` 等格式标记的数量。
**判断规则**:
**结构化规则(底线:只加标记,不改内容)**:
1. **加标题**:识别文章的逻辑段落和主题转换点,在转换处插入 `##` 标题。标题从内容中提炼,不编造。三段内容不硬拆五个标题——尊重原文信息密度 2. **分段落**:确保段落之间有空行分隔,长段落在语义转换处拆分 3. **加列表**:识别并列/枚举性质的内容,加 `- ` 或 `1. ` 标记 4. **加强调**:识别关键词、产品名、核心概念,加 `**加粗**` 5. **清理格式**:去除多余空行、修正缩进、统一标点 6. **不改措辞**:不调语序、不增删内容、不润色文字。用户写什么就是什么,只加结构标记
**保存与告知**:
---
读取文章(或上一步输出的 structured.md),Claude 分析内容结构,在 Markdown 层面自动套用合适的排版容器。这是我们比纯手动排版工具强的核心——AI 理解内容,自动匹配最佳呈现方式。
**分析维度**:文章类型(访谈/教程/产品介绍/深度分析)、内容元素(对话/图片/代码/数据)、节奏感(密集段 vs 留白段)。
**自动套用规则**(按优先级):
1. **对话/访谈** → `:::dialogue[标题]`
2. **连续多图** → `:::gallery[标题]`
3. **超长图片** → `:::longimage[标题]`
4. **核心观点/金句** → callout 格式
5. **分隔符** → 在章节转换处确保有 `---` 分隔
6. **图说标记** → 图片后紧跟的说明用斜体:`*这是图片说明*`
7. **外部链接** → 无需处理(脚本自动转脚注)
**处理完成后**,把增强后的 Markdown 保存为临时文件(`/tmp/wechat-format/xxx-enhanced.md`)。
根据内容分析结果,推荐 3 个最适合的主题:
| 内容类型 | 推荐主题 | |----------|----------| | 深度长文/分析 | newspaper, magazine, ink | | 科技产品/AI工具 | bytedance, github, sspai | | 访谈/对话体 | terracotta, coffee-house, mint-fresh | | 教程/操作指南 | github, sspai, bytedance | | 文艺/随笔/观点 | terracotta, sunset-amber, lavender-dream | | 活力/动态/速报 | sports, bauhaus, chinese |
推荐的主题 ID 通过 `--recommend` 参数传给脚本,在 gallery 中高亮显示。
python3 ~/.claude/skills/xiaohu-wechat-format/scripts/format.py \ --input "文章路径.md" \ --gallery \ --recommend newspaper magazine ink
这会用用户的**真实文章**渲染 34 个主题,在浏览器打开画廊页面。用户点按钮切换主题预览,选中后点「用这个风格排版」一键复制到剪贴板。
如果用户已经知道想用哪个主题,可以跳过画廊直接排版:
python3 ~/.claude/skills/xiaohu-wechat-format/scripts/format.py \ --input "文章路径.md" \ --theme terracotta
告诉用户:
| 主题 | 命令值 | 风格 | |------|--------|------| | 赤陶 | terracotta | 暖橙色,满底圆角标题,左边框渐变 | | 字节蓝 | bytedance | 蓝青渐变,科技现代 | | 中国风 | chinese | 朱砂红,古典雅致 | | 报纸 | newspaper | 纽约时报风,严肃深度 | | GitHub | github | 开发者风,浅色代码块 | | 少数派 | sspai | 中文科技媒体红 | | 包豪斯 | bauhaus | 红蓝黄三原色,先锋几何 | | 墨韵 | ink | 纯黑水墨,极简留白 | | 暗夜 | midnight | 深色底+霓虹色,赛博朋克 |
| 主题 | 命令值 | 风格 | |------|--------|------| | 运动 | sports | 渐变色带,活力动感 | | 薄荷 | mint-fresh | 薄荷绿,清爽健康 | | 日落 | sunset-amber | 琥珀暖调,温暖感性 | | 薰衣草 | lavender-dream | 紫色梦幻,浪漫诗意 | | 咖啡 | coffee-house | 棕色暖调,稳重温馨 | | 微信原生 | wechat-native | 微信绿,传统阅读 | | 杂志 | magazine | 超大留白,品质长文 |
四种布局(简约/聚焦/精致/醒目)× 多种配色(金/蓝/红/绿/藏青/灰)
脚本自动处理以下微信限制:
主题 JSON 里声明 `h2_inner` / `h2_prefix` / `h2_suffix`(h1-h6 同理)即触发三层渲染:
<h2 style="外层只管布局"><span style="prefix">01</span><span style="inner">标题文字</span></h2>
A Claude Code skill for the full WeChat Official Account (公众号) publishing pipeline: Format → Cover (optional) → Publish — with 85 themes, a visual gallery picker, AI content enhancement, and one-click publishing to drafts. 中文说明
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use…
AI-driven presentation workflow for generating editable PPTX decks and slides, reconstructing page visuals, creating reusable…
Use this skill when the user wants a .pptx with smooth cross-slide animation — PowerPoint Morph transitions, Keynote-style…
Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to…