排版 公众号一键排版 —— Markdown 转微信后台可粘贴 HTML,多主题、多字号、所见即所得。 套件说明 · 本 skill 属 一条龙套件(共 9 个 slug,入口 )。跨 skill 的相对引用依赖同一 目录,建议一并 全套。源码:<https://github.com/aiworkskills/wechat-article-skills 能力披露(Capabilities) 本 skill 为 纯本地 Markdown → HTML 转换,零网络、零凭证。 - 凭证 :无 - 网络 :无 - 文件读(仓库内) : 、本篇 、 、可选 、 - 文件读(仓库外) : 还会检查用户家目录 (跨项目共享的自定义排版主题; 只读预设文件,不读凭证 )。不需要这个能力可清空 / 不创建该目录 - 文件写 :本篇 - shell :仅 配套 skill(informational) 本 skill 是 一条龙公众号套件的 排版环节 (入口 )。 - 单独安装可直接使用 :本 skill 的脚本 零依赖、纯本地,无跨 skill 脚本调用。 - 工作流文档中会链接到 (首次引导等)。套件未装齐时,链接跳转会断,但排版功能本身可用。 完整 9 slug 清单见 源码仓库。 路由 一键发文且未明确只要排版 → aws-wechat-article-main。 将 Markdown 文…

, stripped)\n if heading_match:\n flush_paragraph()\n close_list()\n close_blockquote()\n level = len(heading_match.group(1))\n # 跳过第一个 h1(文章标题),公众号后台单独填写标题,正文不再重复\n if level == 1 and not first_h1_skipped:\n first_h1_skipped = True\n continue\n text = _inline_format(heading_match.group(2), styles)\n tag = f\"h{level}\"\n style = styles.get(tag, \"\")\n html_parts.append(f'\u003c{tag} style=\"{style}\">{text}\u003c/{tag}>')\n continue\n\n if re.match(r'^---+

排版 公众号一键排版 —— Markdown 转微信后台可粘贴 HTML,多主题、多字号、所见即所得。 套件说明 · 本 skill 属 一条龙套件(共 9 个 slug,入口 )。跨 skill 的相对引用依赖同一 目录,建议一并 全套。源码:<https://github.com/aiworkskills/wechat-article-skills 能力披露(Capabilities) 本 skill 为 纯本地 Markdown → HTML 转换,零网络、零凭证。 - 凭证 :无 - 网络 :无 - 文件读(仓库内) : 、本篇 、 、可选 、 - 文件读(仓库外) : 还会检查用户家目录 (跨项目共享的自定义排版主题; 只读预设文件,不读凭证 )。不需要这个能力可清空 / 不创建该目录 - 文件写 :本篇 - shell :仅 配套 skill(informational) 本 skill 是 一条龙公众号套件的 排版环节 (入口 )。 - 单独安装可直接使用 :本 skill 的脚本 零依赖、纯本地,无跨 skill 脚本调用。 - 工作流文档中会链接到 (首次引导等)。套件未装齐时,链接跳转会断,但排版功能本身可用。 完整 9 slug 清单见 源码仓库。 路由 一键发文且未明确只要排版 → aws-wechat-article-main。 将 Markdown 文…

, stripped):\n flush_paragraph()\n close_list()\n close_blockquote()\n html_parts.append(f'\u003chr style=\"{styles.get(\"hr\", \"\")}\" />')\n continue\n\n # Markdown 表格\n if re.match(r'^\\|.+\\|

排版 公众号一键排版 —— Markdown 转微信后台可粘贴 HTML,多主题、多字号、所见即所得。 套件说明 · 本 skill 属 一条龙套件(共 9 个 slug,入口 )。跨 skill 的相对引用依赖同一 目录,建议一并 全套。源码:<https://github.com/aiworkskills/wechat-article-skills 能力披露(Capabilities) 本 skill 为 纯本地 Markdown → HTML 转换,零网络、零凭证。 - 凭证 :无 - 网络 :无 - 文件读(仓库内) : 、本篇 、 、可选 、 - 文件读(仓库外) : 还会检查用户家目录 (跨项目共享的自定义排版主题; 只读预设文件,不读凭证 )。不需要这个能力可清空 / 不创建该目录 - 文件写 :本篇 - shell :仅 配套 skill(informational) 本 skill 是 一条龙公众号套件的 排版环节 (入口 )。 - 单独安装可直接使用 :本 skill 的脚本 零依赖、纯本地,无跨 skill 脚本调用。 - 工作流文档中会链接到 (首次引导等)。套件未装齐时,链接跳转会断,但排版功能本身可用。 完整 9 slug 清单见 源码仓库。 路由 一键发文且未明确只要排版 → aws-wechat-article-main。 将 Markdown 文…

, stripped):\n flush_paragraph()\n close_list()\n close_blockquote()\n # 收集连续的表格行\n table_lines = [stripped]\n # 向前看后续行(通过索引)\n cur_idx = lines.index(line)\n lookahead = cur_idx + 1\n while lookahead \u003c len(lines):\n next_s = lines[lookahead].strip()\n if re.match(r'^\\|.+\\|

排版 公众号一键排版 —— Markdown 转微信后台可粘贴 HTML,多主题、多字号、所见即所得。 套件说明 · 本 skill 属 一条龙套件(共 9 个 slug,入口 )。跨 skill 的相对引用依赖同一 目录,建议一并 全套。源码:<https://github.com/aiworkskills/wechat-article-skills 能力披露(Capabilities) 本 skill 为 纯本地 Markdown → HTML 转换,零网络、零凭证。 - 凭证 :无 - 网络 :无 - 文件读(仓库内) : 、本篇 、 、可选 、 - 文件读(仓库外) : 还会检查用户家目录 (跨项目共享的自定义排版主题; 只读预设文件,不读凭证 )。不需要这个能力可清空 / 不创建该目录 - 文件写 :本篇 - shell :仅 配套 skill(informational) 本 skill 是 一条龙公众号套件的 排版环节 (入口 )。 - 单独安装可直接使用 :本 skill 的脚本 零依赖、纯本地,无跨 skill 脚本调用。 - 工作流文档中会链接到 (首次引导等)。套件未装齐时,链接跳转会断,但排版功能本身可用。 完整 9 slug 清单见 源码仓库。 路由 一键发文且未明确只要排版 → aws-wechat-article-main。 将 Markdown 文…

, next_s):\n table_lines.append(next_s)\n lookahead += 1\n else:\n break\n # 跳过已消费的行(通过替换为空行,后续循环会跳过)\n for skip_i in range(cur_idx + 1, lookahead):\n lines[skip_i] = \"\"\n # 解析表格\n tbl_style = styles.get(\"table\", \"\") or \"width:100%; border-collapse:collapse; margin:1em 0; font-size:14px;\"\n th_style = styles.get(\"th\", \"\") or \"background:#f5f5f5; padding:8px 14px; text-align:center; font-weight:bold;\"\n td_style = styles.get(\"td\", \"\") or \"padding:8px 14px; border:1px solid #EEE; text-align:center;\"\n rows = []\n for tl in table_lines:\n cells = [c.strip() for c in tl.strip(\"|\").split(\"|\")]\n rows.append(cells)\n # 过滤分隔行(|---|---|)\n data_rows = [r for r in rows if not all(re.match(r'^-+

排版 公众号一键排版 —— Markdown 转微信后台可粘贴 HTML,多主题、多字号、所见即所得。 套件说明 · 本 skill 属 一条龙套件(共 9 个 slug,入口 )。跨 skill 的相对引用依赖同一 目录,建议一并 全套。源码:<https://github.com/aiworkskills/wechat-article-skills 能力披露(Capabilities) 本 skill 为 纯本地 Markdown → HTML 转换,零网络、零凭证。 - 凭证 :无 - 网络 :无 - 文件读(仓库内) : 、本篇 、 、可选 、 - 文件读(仓库外) : 还会检查用户家目录 (跨项目共享的自定义排版主题; 只读预设文件,不读凭证 )。不需要这个能力可清空 / 不创建该目录 - 文件写 :本篇 - shell :仅 配套 skill(informational) 本 skill 是 一条龙公众号套件的 排版环节 (入口 )。 - 单独安装可直接使用 :本 skill 的脚本 零依赖、纯本地,无跨 skill 脚本调用。 - 工作流文档中会链接到 (首次引导等)。套件未装齐时,链接跳转会断,但排版功能本身可用。 完整 9 slug 清单见 源码仓库。 路由 一键发文且未明确只要排版 → aws-wechat-article-main。 将 Markdown 文…

, c.strip()) for c in r)]\n if data_rows:\n table_html = f'\u003ctable style=\"{tbl_style}\">'\n for ri, row in enumerate(data_rows):\n table_html += \"\u003ctr>\"\n for cell in row:\n tag = \"th\" if ri == 0 else \"td\"\n st = th_style if ri == 0 else td_style\n cell_text = _inline_format(cell, styles)\n table_html += f'\u003c{tag} style=\"{st}\">{cell_text}\u003c/{tag}>'\n table_html += \"\u003c/tr>\"\n table_html += \"\u003c/table>\"\n html_parts.append(table_html)\n continue\n\n img_match = re.match(r'^!\\[(.*?)\\]\\((.+?)\\)

排版 公众号一键排版 —— Markdown 转微信后台可粘贴 HTML,多主题、多字号、所见即所得。 套件说明 · 本 skill 属 一条龙套件(共 9 个 slug,入口 )。跨 skill 的相对引用依赖同一 目录,建议一并 全套。源码:<https://github.com/aiworkskills/wechat-article-skills 能力披露(Capabilities) 本 skill 为 纯本地 Markdown → HTML 转换,零网络、零凭证。 - 凭证 :无 - 网络 :无 - 文件读(仓库内) : 、本篇 、 、可选 、 - 文件读(仓库外) : 还会检查用户家目录 (跨项目共享的自定义排版主题; 只读预设文件,不读凭证 )。不需要这个能力可清空 / 不创建该目录 - 文件写 :本篇 - shell :仅 配套 skill(informational) 本 skill 是 一条龙公众号套件的 排版环节 (入口 )。 - 单独安装可直接使用 :本 skill 的脚本 零依赖、纯本地,无跨 skill 脚本调用。 - 工作流文档中会链接到 (首次引导等)。套件未装齐时,链接跳转会断,但排版功能本身可用。 完整 9 slug 清单见 源码仓库。 路由 一键发文且未明确只要排版 → aws-wechat-article-main。 将 Markdown 文…

, stripped)\n if img_match:\n flush_paragraph()\n alt = img_match.group(1)\n src = img_match.group(2)\n\n # 封面图不进正文 HTML(通过 API 单独上传)\n if (\"封面\" in alt) or alt.startswith(\"cover\"):\n continue\n\n alt_escaped = html_mod.escape(alt)\n img_style = styles.get(\"img\", \"\") or \"max-width:100%; border-radius:4px;\"\n html_parts.append(\n f'\u003cp style=\"text-align:center; margin:1.5em 0;\">'\n f'\u003cimg src=\"{src}\" alt=\"{alt_escaped}\" style=\"{img_style}\" />'\n f'\u003c/p>'\n )\n if \":\" in alt:\n caption = alt.split(\":\", 1)[1]\n fc_style = styles.get(\"figcaption\", \"\") or (\n f'text-align:center; font-size:14px; '\n f'color:{styles[\"text-muted\"]}; margin-top:-0.8em; margin-bottom:1.5em;'\n )\n html_parts.append(\n f'\u003cp style=\"{fc_style}\">'\n f'{html_mod.escape(caption)}\u003c/p>'\n )\n continue\n\n if stripped.startswith(\"> \"):\n flush_paragraph()\n close_list()\n if not in_blockquote:\n html_parts.append(f'\u003cblockquote style=\"{styles.get(\"blockquote\", \"\")}\">')\n in_blockquote = True\n text = _inline_format(stripped[2:], styles)\n html_parts.append(\n f'\u003cp style=\"margin:0.3em 0; font-size:{styles[\"font-size\"]}; '\n f'line-height:{styles[\"line-height\"]};\">{text}\u003c/p>'\n )\n continue\n elif in_blockquote:\n close_blockquote()\n\n # 列表项检测(支持嵌套:通过缩进层级判断)\n ul_match = re.match(r'^( *)[-*]\\s+', line)\n ol_match = re.match(r'^( *)\\d+\\.\\s+', line)\n if ul_match or ol_match:\n flush_paragraph()\n close_blockquote()\n indent = len((ul_match or ol_match).group(1))\n # 缩进层级:每 2 个空格(或 1 个 tab)为一级\n level = indent // 2\n list_type = \"ul\" if ul_match else \"ol\"\n\n ul_style = styles.get(\"ul\", \"\") or f'margin:0.8em 0; padding-left:1.5em; color:{styles[\"text-color\"]};'\n ol_style = styles.get(\"ol\", \"\") or f'margin:0.8em 0; padding-left:1.5em; color:{styles[\"text-color\"]};'\n li_style = styles.get(\"li\", \"\") or (\n f'margin:0.4em 0; font-size:{styles[\"font-size\"]}; '\n f'line-height:{styles[\"line-height\"]};'\n )\n\n # 需要更深的嵌套\n while level > list_depth:\n tag = list_type\n st = ul_style if tag == \"ul\" else ol_style\n # 子列表不需要外边距\n if list_depth >= 0:\n st = re.sub(r'margin:[^;]+;?', '', st).strip()\n if not st:\n st = f'padding-left:1.5em; color:{styles[\"text-color\"]};'\n html_parts.append(f'\u003c{tag} style=\"{st}\">')\n list_stack.append(tag)\n list_depth += 1\n\n # 需要回退到更浅的层级\n while level \u003c list_depth:\n if list_stack:\n html_parts.append(f'\u003c/{list_stack.pop()}>')\n list_depth -= 1\n\n # 同层级但列表类型变了\n if list_stack and list_stack[-1] != list_type:\n html_parts.append(f'\u003c/{list_stack.pop()}>')\n st = ul_style if list_type == \"ul\" else ol_style\n html_parts.append(f'\u003c{list_type} style=\"{st}\">')\n list_stack.append(list_type)\n\n # 第一层还没开始\n if not list_stack:\n st = ul_style if list_type == \"ul\" else ol_style\n html_parts.append(f'\u003c{list_type} style=\"{st}\">')\n list_stack.append(list_type)\n list_depth = 0\n\n if ul_match:\n raw_text = re.sub(r'^[-*]\\s+', '', stripped).strip()\n else:\n raw_text = re.sub(r'^\\d+\\.\\s+', '', stripped).strip()\n if not raw_text:\n continue\n text = _inline_format(raw_text, styles)\n html_parts.append(f'\u003cli style=\"{li_style}\">{text}\u003c/li>')\n in_list = list_type\n continue\n\n close_list()\n close_blockquote()\n paragraph_lines.append(stripped)\n\n flush_paragraph()\n close_list()\n close_blockquote()\n\n return \"\".join(html_parts)\n\n\ndef _inline_format(text: str, styles: dict) -> str:\n \"\"\"行内格式:加粗、斜体、行内代码、链接。\"\"\"\n # strong\n strong_style = styles.get(\"strong\", \"\")\n if not strong_style:\n strong_color = styles.get(\"strong-color\", styles.get(\"primary-color\", \"#333\"))\n strong_style = f\"color:{strong_color}; font-weight:bold;\"\n text = re.sub(\n r'\\*\\*(.+?)\\*\\*',\n rf'\u003cstrong style=\"{strong_style}\">\\1\u003c/strong>',\n text,\n )\n # em\n em_style = styles.get(\"em\", \"\")\n if em_style:\n text = re.sub(r'\\*(.+?)\\*', rf'\u003cem style=\"{em_style}\">\\1\u003c/em>', text)\n else:\n text = re.sub(r'\\*(.+?)\\*', r'\u003cem>\\1\u003c/em>', text)\n # strikethrough ~~text~~\n del_style = styles.get(\"del\", \"\") or \"text-decoration:line-through; color:#999;\"\n text = re.sub(r'~~(.+?)~~', rf'\u003cdel style=\"{del_style}\">\\1\u003c/del>', text)\n # inline code\n code_style = styles.get(\"code\", \"\")\n if not code_style:\n code_style = (\n f'background:{styles.get(\"bg-light\", \"#F7F7F7\")}; padding:2px 6px; '\n f'border-radius:3px; font-size:0.9em; color:{styles.get(\"primary-color\", \"#333\")};'\n )\n text = re.sub(\n r'`(.+?)`',\n rf'\u003ccode style=\"{code_style}\">\\1\u003c/code>',\n text,\n )\n # link\n a_style = styles.get(\"a\", \"\")\n if not a_style:\n a_style = f'color:{styles.get(\"link-color\", \"#576B95\")}; text-decoration:none;'\n text = re.sub(\n r'\\[(.+?)\\]\\((.+?)\\)',\n rf'\u003ca style=\"{a_style}\" href=\"\\2\">\\1\u003c/a>',\n text,\n )\n return text\n\n\ndef _wrap_document(body_html: str, styles: dict) -> str:\n \"\"\"包装为 HTML section。\"\"\"\n return (\n f'\u003csection style=\"'\n f'font-family:{styles.get(\"font-family\", \"sans-serif\")}; '\n f'font-size:{styles[\"font-size\"]}; '\n f'line-height:{styles[\"line-height\"]}; '\n f'color:{styles[\"text-color\"]}; '\n f'padding:16px; text-align:left;'\n f'\">\\n{body_html}\\n\u003c/section>'\n )\n\n\n# ── CLI ──────────────────────────────────────────────────────\n\ndef main():\n parser = argparse.ArgumentParser(\n description=\"公众号文章排版工具\",\n formatter_class=argparse.RawDescriptionHelpFormatter,\n epilog=__doc__,\n )\n parser.add_argument(\"input\", nargs=\"?\", help=\"Markdown 文件路径\")\n parser.add_argument(\n \"--theme\",\n default=None,\n help=\"主题名;省略则仅读取本篇 article.yaml 的 default_format_preset,再无则 default\",\n )\n parser.add_argument(\"--color\", help=\"覆盖主色(如 #0F4C81)\")\n parser.add_argument(\"--font-size\", help=\"覆盖字号(如 16px)\")\n parser.add_argument(\"-o\", \"--output\", help=\"输出路径(默认同名 .html)\")\n parser.add_argument(\"--no-preformat\", action=\"store_true\", help=\"跳过 Markdown 预格式化\")\n parser.add_argument(\"--list-themes\", action=\"store_true\", help=\"列出可用主题\")\n\n args = parser.parse_args()\n\n if args.list_themes:\n print(\"可用主题:\")\n for t in _list_themes():\n label = f\" ({t['label']})\" if t[\"label\"] else \"\"\n desc = f\" - {t['description']}\" if t[\"description\"] else \"\"\n print(f\" {t['name']}{label} [{t['source']}]{desc}\")\n return\n\n if not args.input:\n parser.print_help()\n sys.exit(0)\n\n input_path = Path(args.input).resolve()\n if not input_path.exists():\n _err(f\"文件不存在: {input_path}\")\n\n draft_dir = input_path.parent\n fmt_ctx = _merge_format_context(draft_dir)\n article_ctx = _load_article_context(draft_dir)\n\n if args.theme is None:\n preset = _coerce_single_preset(\"default_format_preset\", article_ctx.get(\"default_format_preset\"))\n theme_name = preset if preset else \"default\"\n if preset:\n _info(f\"主题来自本篇 article.yaml 的 default_format_preset: {theme_name}\")\n else:\n theme_name = args.theme\n\n md_text = input_path.read_text(encoding=\"utf-8\")\n\n if not args.no_preformat:\n md_text = _preformat_markdown(md_text)\n _info(\"Markdown 预格式化完成(中英文间距、引号、空行)\")\n\n theme = _load_theme(theme_name)\n\n overrides = {}\n if args.color:\n overrides[\"primary-color\"] = args.color\n if args.font_size:\n overrides[\"font-size\"] = args.font_size\n\n _info(f\"主题: {theme_name}\")\n styles = _build_styles(theme, overrides)\n body_html = _md_to_html(md_text, styles)\n\n embeds = _resolve_embeds_config(draft_dir)\n if embeds:\n body_html = _resolve_embeds(body_html, embeds)\n _info(\"嵌入元素已替换(名片/小程序/小程序卡片/链接)\")\n\n # 每篇专属文末:若同目录存在 closing.md,则将其转换为 HTML 并追加到文末\n closing_md_path = input_path.parent / \"closing.md\"\n if closing_md_path.exists():\n closing_md = closing_md_path.read_text(encoding=\"utf-8\")\n # 不对 closing.md 进行预格式化,避免意外更改作者自定义的链接与排版\n closing_html = _md_to_html(closing_md, styles)\n # 以段落分隔以避免直接黏连\n body_html = f\"{body_html}\\n\\n\u003cdiv style=\\\"margin-top:1.5em\\\">\u003c/div>\\n{closing_html}\"\n _info(f\"已追加文末区块: {closing_md_path}\")\n\n full_html = _wrap_document(body_html, styles)\n\n output_path = Path(args.output) if args.output else input_path.with_suffix(\".html\")\n output_path.parent.mkdir(parents=True, exist_ok=True)\n output_path.write_text(full_html, encoding=\"utf-8\")\n _ok(f\"已保存: {output_path}\")\n\n\nif __name__ == \"__main__\":\n main()\n","content_type":"text/x-python; charset=utf-8","language":"python","size":38032,"content_sha256":"680d480c2c6ab2aa1cd369e44ca1eaaa646c17f79c2f69e69330ede864f03a58"},{"filename":"skill.json","content":"{\n \"name\": \"aws-wechat-article-formatting\",\n \"version\": \"0.3.0\",\n \"author\": \"aiworkskills\",\n \"description\": \"给公众号文章排版,转换为可直接粘贴到微信后台的格式,支持多套主题。\",\n \"license\": \"MIT\",\n \"homepage\": \"https://github.com/aiworkskills/wechat-article-skills\",\n \"tags\": [\"wechat\", \"公众号\", \"formatting\", \"html\"],\n \"permissions\": [\"filesystem\", \"shell\"],\n \"entryPoint\": {\n \"type\": \"natural\",\n \"path\": \"SKILL.md\"\n }\n}\n","content_type":"application/json; charset=utf-8","language":"json","size":475,"content_sha256":"07d5f73671131e22dd081efaeed675a3c87db787ef31d388333cef403f9bb895"}],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"排版","type":"text"}]},{"type":"paragraph","content":[{"text":"公众号一键排版","type":"text","marks":[{"type":"strong"}]},{"text":" —— Markdown 转微信后台可粘贴 HTML,多主题、多字号、所见即所得。","type":"text"}]},{"type":"blockquote","content":[{"type":"paragraph","content":[{"text":"套件说明","type":"text","marks":[{"type":"strong"}]},{"text":" · 本 skill 属 ","type":"text"},{"text":"aws-wechat-article-*","type":"text","marks":[{"type":"code_inline"}]},{"text":" 一条龙套件(共 9 个 slug,入口 ","type":"text"},{"text":"aws-wechat-article-main","type":"text","marks":[{"type":"code_inline"}]},{"text":")。跨 skill 的相对引用依赖同一 ","type":"text"},{"text":"skills/","type":"text","marks":[{"type":"code_inline"}]},{"text":" 目录,建议一并 ","type":"text"},{"text":"clawhub install","type":"text","marks":[{"type":"code_inline"}]},{"text":" 全套。源码:","type":"text"},{"text":"https://github.com/aiworkskills/wechat-article-skills","type":"text","marks":[{"type":"link","attrs":{"href":"https://github.com/aiworkskills/wechat-article-skills","title":null}}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"能力披露(Capabilities)","type":"text"}]},{"type":"paragraph","content":[{"text":"本 skill 为","type":"text"},{"text":"纯本地","type":"text","marks":[{"type":"strong"}]},{"text":" Markdown → HTML 转换,零网络、零凭证。","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"凭证","type":"text","marks":[{"type":"strong"}]},{"text":":无","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"网络","type":"text","marks":[{"type":"strong"}]},{"text":":无","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"文件读(仓库内)","type":"text","marks":[{"type":"strong"}]},{"text":":","type":"text"},{"text":".aws-article/config.yaml","type":"text","marks":[{"type":"code_inline"}]},{"text":"、本篇 ","type":"text"},{"text":"article.yaml","type":"text","marks":[{"type":"code_inline"}]},{"text":"、","type":"text"},{"text":"article.md","type":"text","marks":[{"type":"code_inline"}]},{"text":"、可选 ","type":"text"},{"text":"closing.md","type":"text","marks":[{"type":"code_inline"}]},{"text":"、","type":"text"},{"text":".aws-article/presets/formatting/\u003c名>.yaml","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"文件读(仓库外)","type":"text","marks":[{"type":"strong"}]},{"text":":","type":"text"},{"text":"format.py","type":"text","marks":[{"type":"code_inline"}]},{"text":" 还会检查用户家目录 ","type":"text"},{"text":"~/.aws-article/presets/formatting/","type":"text","marks":[{"type":"code_inline"}]},{"text":"(跨项目共享的自定义排版主题;","type":"text"},{"text":"只读预设文件,不读凭证","type":"text","marks":[{"type":"strong"}]},{"text":")。不需要这个能力可清空 / 不创建该目录","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"文件写","type":"text","marks":[{"type":"strong"}]},{"text":":本篇 ","type":"text"},{"text":"article.html","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"shell","type":"text","marks":[{"type":"strong"}]},{"text":":仅 ","type":"text"},{"text":"python3 {baseDir}/scripts/format.py","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"配套 skill(informational)","type":"text"}]},{"type":"paragraph","content":[{"text":"本 skill 是 ","type":"text"},{"text":"aws-wechat-article-*","type":"text","marks":[{"type":"code_inline"}]},{"text":" 一条龙公众号套件的","type":"text"},{"text":"排版环节","type":"text","marks":[{"type":"strong"}]},{"text":"(入口 ","type":"text"},{"text":"aws-wechat-article-main","type":"text","marks":[{"type":"code_inline"}]},{"text":")。","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"单独安装可直接使用","type":"text","marks":[{"type":"strong"}]},{"text":":本 skill 的脚本 ","type":"text"},{"text":"format.py","type":"text","marks":[{"type":"code_inline"}]},{"text":" 零依赖、纯本地,无跨 skill 脚本调用。","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"工作流文档中会链接到 ","type":"text"},{"text":"../aws-wechat-article-main/references/*.md","type":"text","marks":[{"type":"code_inline"}]},{"text":"(首次引导等)。套件未装齐时,链接跳转会断,但排版功能本身可用。","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"完整 9 slug 清单见 ","type":"text"},{"text":"源码仓库","type":"text","marks":[{"type":"link","attrs":{"href":"https://github.com/aiworkskills/wechat-article-skills","title":null}}]},{"text":"。","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"路由","type":"text"}]},{"type":"paragraph","content":[{"text":"一键发文且未明确只要排版 → ","type":"text"},{"text":"aws-wechat-article-main","type":"text","marks":[{"type":"link","attrs":{"href":"../aws-wechat-article-main/SKILL.md","title":null}}]},{"text":"。","type":"text"}]},{"type":"paragraph","content":[{"text":"将 Markdown 文章转换为微信公众号兼容的 HTML,所有样式 inline。","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"脚本目录","type":"text"}]},{"type":"paragraph","content":[{"text":"Agent 执行","type":"text","marks":[{"type":"strong"}]},{"text":":确定本 SKILL.md 所在目录为 ","type":"text"},{"text":"{baseDir}","type":"text","marks":[{"type":"code_inline"}]},{"text":"。","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"脚本","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"用途","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"scripts/format.py","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Markdown → 微信兼容 HTML","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"配置检查 ⛔","type":"text"}]},{"type":"paragraph","content":[{"text":"任何操作执行前,","type":"text"},{"text":"必须","type":"text","marks":[{"type":"strong"}]},{"text":"按 ","type":"text"},{"text":"首次引导","type":"text","marks":[{"type":"link","attrs":{"href":"../aws-wechat-article-main/references/first-time-setup.md","title":null}},{"type":"strong"}]},{"text":" 执行其中的 ","type":"text"},{"text":"「检测顺序」","type":"text","marks":[{"type":"strong"}]},{"text":"。","type":"text"},{"text":"单独启用本 skill","type":"text","marks":[{"type":"strong"}]},{"text":" 时同上。检测通过后才能进行以下操作(或用户明确书面确认「本次不检查」):","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"内置主题","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"主题","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"风格","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"适用场景","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"default","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"经典蓝 — 沉稳大气,色块小标题","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"科技、商业、通用","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"grace","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"优雅紫 — 柔和圆润,左边框小标题","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"文化、美学","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"modern","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"暖橙 — 活力大胆,色块小标题","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"自媒体、创业","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"simple","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"极简黑 — 极度克制,大量留白","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"思想深度、学术","type":"text"}]}]}]}]},{"type":"paragraph","content":[{"text":"每个主题包含:标题样式(h1-h4)、段落、引用块、列表、分割线、图片、代码块、链接、强调色等完整规则。","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"工作流","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"排版进度:\n- [ ] 第0步:配置检查(见本节「配置检查」)⛔\n- [ ] 第1步:确定主题(与合并配置 / 用户指定)\n- [ ] 第2步:转换\n- [ ] 第3步:输出 HTML","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"第1步:确定主题","type":"text"}]},{"type":"paragraph","content":[{"text":"主题解析顺序(","type":"text"},{"text":"format.py","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" 行为","type":"text","marks":[{"type":"strong"}]},{"text":"与智能体择一):","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"命令行","type":"text","marks":[{"type":"strong"}]},{"text":" ","type":"text"},{"text":"--theme \u003c名称>","type":"text","marks":[{"type":"code_inline"}]},{"text":":显式指定时","type":"text"},{"text":"始终优先","type":"text","marks":[{"type":"strong"}]},{"text":"。","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"未传 ","type":"text","marks":[{"type":"strong"}]},{"text":"--theme","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":":","type":"text"},{"text":"format.py","type":"text","marks":[{"type":"code_inline"}]},{"text":" 仅读取 ","type":"text"},{"text":"与 ","type":"text","marks":[{"type":"strong"}]},{"text":"article.md","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" 同目录的 ","type":"text","marks":[{"type":"strong"}]},{"text":"article.yaml","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" 中 ","type":"text"},{"text":"default_format_preset","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":"(","type":"text"},{"text":"须为 YAML 列表","type":"text","marks":[{"type":"strong"}]},{"text":":","type":"text"},{"text":"[]","type":"text","marks":[{"type":"code_inline"}]},{"text":" 或单元素 ","type":"text"},{"text":"[主题名]","type":"text","marks":[{"type":"code_inline"}]},{"text":");为空则用内置主题名 ","type":"text"},{"text":"default","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":"。","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"智能体在对话中帮用户选主题时,按:用户口述 → 本篇 ","type":"text"},{"text":"article.yaml.default_format_preset","type":"text","marks":[{"type":"code_inline"}]},{"text":" → ","type":"text"},{"text":".aws-article/presets/formatting/","type":"text","marks":[{"type":"code_inline"}]},{"text":" 自定义 → 内置 ","type":"text"},{"text":"default","type":"text","marks":[{"type":"code_inline"}]},{"text":"。","type":"text"},{"text":"custom_* / default_*","type":"text","marks":[{"type":"code_inline"}]},{"text":" 候选池解析由 main 在“本篇准备”阶段完成并写回 ","type":"text"},{"text":"article.yaml","type":"text","marks":[{"type":"code_inline"}]},{"text":"。","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"主题名须对应 ","type":"text"},{"text":"内置主题","type":"text","marks":[{"type":"strong"}]},{"text":" 或 ","type":"text"},{"text":".aws-article/presets/formatting/\u003c名>.yaml","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":"。字段说明见 ","type":"text"},{"text":"articlescreening-schema.md","type":"text","marks":[{"type":"link","attrs":{"href":"../aws-wechat-article-main/references/articlescreening-schema.md","title":null}}]},{"text":"(与仓库 ","type":"text"},{"text":"config.yaml","type":"text","marks":[{"type":"code_inline"}]},{"text":" 顶层字段对齐)。","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"第2步:转换","type":"text"}]},{"type":"paragraph","content":[{"text":"在","type":"text"},{"text":"仓库根","type":"text","marks":[{"type":"strong"}]},{"text":"执行(路径按实际本篇目录调整):","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# 不传 --theme:使用合并配置中的 default_format_preset,否则 default\npython {baseDir}/scripts/format.py drafts/YYYYMMDD-slug/article.md -o drafts/YYYYMMDD-slug/article.html\n\n# 显式指定主题(覆盖配置)\npython {baseDir}/scripts/format.py drafts/YYYYMMDD-slug/article.md --theme grace -o drafts/YYYYMMDD-slug/article.html\n\n# 自定义主色 / 字号\npython {baseDir}/scripts/format.py article.md --theme modern --color \"#A93226\"\npython {baseDir}/scripts/format.py article.md --font-size 15px\n\n# 列出可用主题\npython {baseDir}/scripts/format.py --list-themes","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"嵌入元素 ","type":"text"},{"text":"{embed:...}","type":"text","marks":[{"type":"code_inline"}]}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"format.py","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":":","type":"text"},{"text":"名片 / 小程序","type":"text","marks":[{"type":"strong"}]},{"text":" 的 ","type":"text"},{"text":"embeds","type":"text","marks":[{"type":"code_inline"}]},{"text":" 以 ","type":"text"},{"text":".aws-article/config.yaml","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" 为准;","type":"text"},{"text":"仅「往期链接」","type":"text","marks":[{"type":"strong"}]},{"text":":本篇 ","type":"text"},{"text":"article.yaml","type":"text","marks":[{"type":"code_inline"}]},{"text":" 可写 ","type":"text"},{"text":"embeds.related_articles","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":",与全局 ","type":"text"},{"text":"related_articles","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" 深度合并","type":"text","marks":[{"type":"strong"}]},{"text":"(用于每篇不同推荐)。合并结果中非空 ","type":"text"},{"text":"embeds","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" 时解析 ","type":"text"},{"text":"{embed:profile|miniprogram|miniprogram_card|link:名称}","type":"text","marks":[{"type":"code_inline"}]},{"text":";否则不对嵌入占位符做替换(视为无配置)。","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"与 ","type":"text"},{"text":"writing 结构模板","type":"text","marks":[{"type":"link","attrs":{"href":"../aws-wechat-article-writing/references/structure-template.md","title":null}}]},{"text":" 中的占位说明一致。","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"第3步:输出 HTML","type":"text"}]},{"type":"paragraph","content":[{"text":"输出的 HTML 特性:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"所有样式 inline(微信编辑器兼容)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"正文不含文章标题","type":"text","marks":[{"type":"strong"}]},{"text":":Markdown 中第一个 ","type":"text"},{"text":"#","type":"text","marks":[{"type":"code_inline"}]},{"text":"(h1)在转换时被跳过,标题在公众号后台单独填写,正文不重复","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"配图标记 ","type":"text"},{"text":"![类型:描述](placeholder)","type":"text","marks":[{"type":"code_inline"}]},{"text":" 保留为 ","type":"text"},{"text":"\u003cimg>","type":"text","marks":[{"type":"code_inline"}]},{"text":" 标签,待 images skill 替换","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"图注自动从标记描述中提取","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"同目录存在 ","type":"text"},{"text":"closing.md","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" 时,","type":"text"},{"text":"format.py","type":"text","marks":[{"type":"code_inline"}]},{"text":" 会追加到文末(脚本既有行为)","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"选项","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"选项","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"说明","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"默认值","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"--theme \u003c名称>","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"主题;","type":"text"},{"text":"省略则按合并配置 → default","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"见上文","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"--color \u003chex>","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"自定义主色","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"主题默认","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"--font-size \u003cpx>","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"字号","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"16px","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"-o \u003c路径>","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"输出路径","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"同名 .html","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"--list-themes","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"列出可用主题","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"自定义主题","type":"text"}]},{"type":"paragraph","content":[{"text":"在 ","type":"text"},{"text":".aws-article/presets/formatting/","type":"text","marks":[{"type":"code_inline"}]},{"text":" 下新建主题文件即可。","type":"text"}]},{"type":"paragraph","content":[{"text":"主题文件格式和扩展方式详见:","type":"text"},{"text":"references/presets/README.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/presets/README.md","title":null}}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"过程文件","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"读取","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"产出","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"article.md","type":"text","marks":[{"type":"code_inline"}]},{"text":"、","type":"text"},{"text":".aws-article/config.yaml","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" + 同目录 ","type":"text","marks":[{"type":"strong"}]},{"text":"article.yaml","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":"(默认主题与 ","type":"text"},{"text":"embeds","type":"text","marks":[{"type":"code_inline"}]},{"text":")、","type":"text"},{"text":"closing.md","type":"text","marks":[{"type":"code_inline"}]},{"text":"(可选)","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"article.html","type":"text","marks":[{"type":"code_inline"}]}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}}]},"metadata":{"url":"https://github.com/aiworkskills/wechat-article-skills","date":"2026-06-05","name":"aws-wechat-article-formatting","author":"@skillopedia","source":{"stars":53,"repo_name":"wechat-article-skills","origin_url":"https://github.com/aiworkskills/wechat-article-skills/blob/HEAD/skills/aws-wechat-article-formatting/SKILL.md","repo_owner":"aiworkskills","body_sha256":"6140f2e8afaa06fc33d7d4f89ff8777d59717aa80e2cb3acf3dabb6b6be21259","cluster_key":"6e79abee4375dbdb3534cdff10f0280e694fa291cfd6d18f7099a7737f722a57","clean_bundle":{"format":"clean-skill-bundle-v1","source":"aiworkskills/wechat-article-skills/skills/aws-wechat-article-formatting/SKILL.md","attachments":[{"id":"1405b2a8-1a9e-5bb7-8b0e-1745b7a3dade","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/1405b2a8-1a9e-5bb7-8b0e-1745b7a3dade/attachment.md","path":"references/presets/README.md","size":4440,"sha256":"a0386ed4999298e61ffe9938385d9a86626093824f6024345c4bb84cfa271a86","contentType":"text/markdown; charset=utf-8"},{"id":"a944fe55-8e55-5b2d-a110-ea6a814e422a","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/a944fe55-8e55-5b2d-a110-ea6a814e422a/attachment.yaml","path":"references/presets/themes/default.yaml","size":1979,"sha256":"7fb59a980095686beee53e9c5dd389307a59a91cd56f948dec999a4fc776063c","contentType":"application/yaml; charset=utf-8"},{"id":"a1a6bb23-cd73-5944-b1dd-4c2abd7d3172","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/a1a6bb23-cd73-5944-b1dd-4c2abd7d3172/attachment.yaml","path":"references/presets/themes/grace.yaml","size":1813,"sha256":"e947688a1e2e74b260baa51dc5689301d4d78728771803a50d550fe4a47d07a8","contentType":"application/yaml; charset=utf-8"},{"id":"374b9cba-710b-527a-87ff-2cf91052a3b3","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/374b9cba-710b-527a-87ff-2cf91052a3b3/attachment.yaml","path":"references/presets/themes/modern.yaml","size":1861,"sha256":"fa42c14a1ce95fb8560b1a0c77a9ac73378a98624045beea035b3a4d49e998e8","contentType":"application/yaml; charset=utf-8"},{"id":"45f3a556-981f-5a00-9c71-81e494d36591","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/45f3a556-981f-5a00-9c71-81e494d36591/attachment.yaml","path":"references/presets/themes/simple.yaml","size":1567,"sha256":"9a4198348d8eb176e235e4f2f07fa7e903c0b1dd91687fa7a90188fc28557b10","contentType":"application/yaml; charset=utf-8"},{"id":"e24e3d5f-761d-56f0-a317-8968968f9286","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/e24e3d5f-761d-56f0-a317-8968968f9286/attachment.py","path":"scripts/format.py","size":38032,"sha256":"680d480c2c6ab2aa1cd369e44ca1eaaa646c17f79c2f69e69330ede864f03a58","contentType":"text/x-python; charset=utf-8"},{"id":"1b99bf61-f662-5e36-85f6-6052f3e70296","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/1b99bf61-f662-5e36-85f6-6052f3e70296/attachment.json","path":"skill.json","size":475,"sha256":"07d5f73671131e22dd081efaeed675a3c87db787ef31d388333cef403f9bb895","contentType":"application/json; charset=utf-8"}],"bundle_sha256":"0e5642627c51ce04dd30905985dbff4d005293ef9ae912421d301e429ad60408","attachment_count":7,"text_attachments":7,"attachment_storage":"skillopedia-attachments-v1","binary_attachments":0,"excluded_attachments":[]},"cluster_size":1,"skill_md_path":"skills/aws-wechat-article-formatting/SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"devops-infrastructure","category_label":"DevOps"},"exact_dupes_collapsed_into_this":0},"version":"v1","category":"devops-infrastructure","homepage":"https://aiworkskills.cn","metadata":{"openclaw":{"requires":{"env":[],"bins":["python3"]}}},"import_tag":"clean-skills-v1","description":"公众号排版|Markdown 转 HTML|排版主题|段落样式 — 公众号一键排版工具,Markdown 文稿转微信后台可粘贴 HTML,多主题、多字号、段落样式切换,所见即所得。面向公众号编辑、独立作者、排版岗。触发词:「排版」「版式」「美化」「格式化」「字号」「段落样式」「换个排版主题」「换个版式」「转 HTML」「弄好看点」「调整格式」。换预设包/品牌包/整套主题配色请走 aws-wechat-article-assets;需要多环节串联(写+审+排+配图+发)请走 aws-wechat-article-main。"}},"renderedAt":1782980707903}

排版 公众号一键排版 —— Markdown 转微信后台可粘贴 HTML,多主题、多字号、所见即所得。 套件说明 · 本 skill 属 一条龙套件(共 9 个 slug,入口 )。跨 skill 的相对引用依赖同一 目录,建议一并 全套。源码:<https://github.com/aiworkskills/wechat-article-skills 能力披露(Capabilities) 本 skill 为 纯本地 Markdown → HTML 转换,零网络、零凭证。 - 凭证 :无 - 网络 :无 - 文件读(仓库内) : 、本篇 、 、可选 、 - 文件读(仓库外) : 还会检查用户家目录 (跨项目共享的自定义排版主题; 只读预设文件,不读凭证 )。不需要这个能力可清空 / 不创建该目录 - 文件写 :本篇 - shell :仅 配套 skill(informational) 本 skill 是 一条龙公众号套件的 排版环节 (入口 )。 - 单独安装可直接使用 :本 skill 的脚本 零依赖、纯本地,无跨 skill 脚本调用。 - 工作流文档中会链接到 (首次引导等)。套件未装齐时,链接跳转会断,但排版功能本身可用。 完整 9 slug 清单见 源码仓库。 路由 一键发文且未明确只要排版 → aws-wechat-article-main。 将 Markdown 文…