/iasiv5-skills:wechat-draftfrom iasiv5-skills
把【现成】Markdown 文章排版成微信兼容 HTML、选主题预览、确认后推送到公众号草稿箱。触发词:公众号排版、Markdown 转微信、选主题、推草稿;英文:format Markdown for WeChat、preview themes、publish to draft。明确不做:写/创作公众号文章(本 skill 只排版现成稿,创作内容请先用其他写作工具完成);转幻灯片、做封面/小红书图、润色/rewrite、配图上传、草稿箱管理 也不在范围。
Ships in iasiv5-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
把现成 Markdown 文章转换为微信兼容 HTML,确认预览后推送到公众号草稿箱。
现成 = 输入是一篇已成稿、可直接排版的文章。本 skill 只排版,不改写字面、不创作内容;结构过弱时只补最小标记(标题/段落/列表/加粗)。
读取文章路径、标题、用户意图(只排版 or 排版+推送)。
| 如果 | 则 |
|---|---|
| 文件不存在 / 非 .md | 确认路径拼写或提示仅支持 Markdown |
| 文件为空 | 提醒内容过少,继续排版但标注 |
✅ 完成:路径、标题、意图三项已知。
检查文章是否有基本 Markdown 结构。"缺少结构"的判断标准:
# / ##)→ 补 # {首行文本}\n\n输入是现成稿件——结构混乱需要大改时,告知用户先整理后再来,不替用户改写。
可选增强:需要更强版式表达时,可补 format.py 支持的容器语法(:::dialogue / :::gallery / :::timeline / :::steps 等,不改字面),完整列表见 references/usage.md。
| 如果 | 则 |
|---|---|
| 文件已是标准 Markdown(有标题/段落/列表) | 跳过预处理,直接进步骤 3 |
| 文件几乎无结构(纯文本无标记) | 补标题+段落分隔,告知用户"已补最小结构" |
✅ 完成:最小结构在位,或已告知用户需先整理。
format.py --input <path> --theme <name>format.py --input <path> --gallery --recommend newspaper magazine ink如果 format.py 报错:ModuleNotFoundError → pip install -r requirements.txt;其他错误 → 检查文件编码(UTF-8),仍失败则将报错原文发给用户。
如果 gallery 结果不满意:按内容类型推荐备选主题,或让用户 --theme 手动指定。
✅ 完成:HTML 已生成(单主题)或画廊已展出(gallery)。
告知预览路径让用户浏览器打开。🔴 CHECKPOINT · 🛑 STOP:用户未确认"预览满意"前,禁止执行 publish。
✅ 完成:用户已明确说"预览满意/可以推"。
推送前必须检查:config.json 存在且凭据已填、IP 在公众号白名单内、认证服务号(有草稿权限)。
| 如果报错 | 修复 |
|---|---|
| config.json 不存在 | cp config.example.json config.json 并提示填凭据 |
| 40001/40125 凭据无效 | 检查 app_id/app_secret,仍失败到公众号后台重置 |
| 40164 IP 白名单 | 公众号后台 → 设置 → IP 白名单添加当前 IP |
| 48001 API 未授权 | 需认证服务号,建议确认公众号类型 |
| 排版/推送其他错误 | 按优先级排查:依赖→编码→Markdown格式→频控(每日2000次) |
完整错误码见 references/error-codes.md。
推送成功后返回:预览目录、标题、字数、media_id、公众号后台 https://mp.weixin.qq.com。
scripts/format.py --input <path> --theme <name> [--gallery] [--recommend t1 t2 ...] [--output <dir>] [--no-open] [--format wechat|html|plain]scripts/publish.py --dir <排版输出目录> | --input <path> --theme <name> [--dry-run]cp config.example.json config.json| ❌ 禁止 | ✅ 正确做法 |
|---|---|
| 改写文章内容(非现成稿件) | 建议用户先完成内容再来排版 |
| 回显 APPSECRET | 不显示,或只显示 app_id 前 4 位 |
| 手写 HTML/CSS 替代 format.py,或跳过 format 直接 publish | 必须先经 format.py 生成 HTML |
| 未确认预览就 publish | 🔴 等用户确认"预览满意" |
| 处理封面图/配图/图片上传、管理现有草稿 | 封面配图与草稿管理在公众号后台操作 |
| 跳过前置检查直接 publish | 推送前必须检查 config + IP 白名单 |
agents/interface.yaml (opens in a new tab)assets/cover.jpg (opens in a new tab)config.example.json (opens in a new tab)evals/evals.json (opens in a new tab)evals/semantic_config.json (opens in a new tab)evals/trigger_cases.json (opens in a new tab)references/error-codes.md (opens in a new tab)references/themes.md (opens in a new tab)references/usage.md (opens in a new tab)references/wechat-mp-api.md (opens in a new tab)requirements.txt (opens in a new tab)scripts/format.py (opens in a new tab)scripts/publish.py (opens in a new tab)templates/gallery.html (opens in a new tab)templates/preview.html (opens in a new tab)themes/bauhaus.json (opens in a new tab)themes/bold-blue.json (opens in a new tab)themes/bold-green.json (opens in a new tab)themes/bold-navy.json (opens in a new tab)themes/bytedance.json (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
34 skills in this plugin
/answer-me-with-htmlTurns an answer into a one-page visual HTML explainer: the model writes a short Markdown draft and the bundled CLI builds one page. Use it proactively and liberally in replies to the user, without being asked, whenever a page would help the reader more than plain text, even if plain text would also work: any explanation of how something works or how parts relate (flow, request path, architecture, code or folder structure, state machine, lifecycle, history); any comparison, trade-off or decision with pros and cons; any diagnosis, review or investigation, especially with several causes or findings to rank; any answer with a table, a numbered or ranked list, steps, branches or several sections; or when the user says "I don't get it / draw it / explain visually / 讲讲原理 / 没看懂 / 画个图". When in doubt, use it: a page is quick and cheap to make. Also for explainer videos ("make a video", "做个视频") and for changing its settings. Skip only for small talk, a trivial one-line answer, or when the user asks for plain text./architecture-diagramCreate polished dark-themed architecture diagrams as self-contained HTML+SVG files. Use when the user asks for system, infrastructure, cloud, security, or network topology diagrams.Other plugins' skills for the same job
npx claudepluginhub iasiv5/skills --plugin iasiv5-skills