公众号排版(Markdown → 微信 HTML)

v1.0.22

公众号排版|Markdown 转 HTML|排版主题|段落样式 — 公众号一键排版工具,Markdown 文稿转微信后台可粘贴 HTML,多主题、多字号、段落样式切换,所见即所得。面向公众号编辑、独立作者、排版岗。触发词:「排版」「版式」「美化」「格式化」「字号」「段落样式」「换个排版主题」「换个版式」「转 HT...

1· 219·1 current·1 all-time
bymarsatwechat@aiworkskills

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for aiworkskills/aws-wechat-article-formatting.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "公众号排版(Markdown → 微信 HTML)" (aiworkskills/aws-wechat-article-formatting) from ClawHub.
Skill page: https://clawhub.ai/aiworkskills/aws-wechat-article-formatting
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required binaries: python3
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install aws-wechat-article-formatting

ClawHub CLI

Package manager switcher

npx clawhub@latest install aws-wechat-article-formatting
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the included script and templates: the skill is a local Markdown→WeChat-compatible-HTML formatter and ships theme YAMLs and scripts for that purpose. Minor potential for confusion: the slug/namespace includes 'aws' but the skill does not request AWS credentials or cloud access (the SKILL.md explicitly says 'zero network, zero credentials'). This mismatch is not dangerous but may mislead users about required cloud access.
Instruction Scope
SKILL.md instructs the agent to run the included scripts/commands only (python3 scripts/format.py) and lists the specific files read (article.md, article.yaml, .aws-article/config.yaml, optional closing.md and theme files) and the output (article.html). It explicitly states no network access and no credential reads. The script also checks the user's home dir for optional theme files (~/.aws-article/...), but only for read-only theme YAMLs.
Install Mechanism
No install spec; this is an instruction+script skill. There are no downloads or archive extraction steps. The only runtime requirement is python3, which is declared. The included code files are static and stored in the skill bundle.
Credentials
The skill requires no environment variables or external credentials. It reads local config/theme YAML files (repo-local and optional home-dir presets); these are proportional to a theming/formatting tool but users should be aware it will read ~/.aws-article/presets/formatting if present.
Persistence & Privilege
The skill is not always-enabled and does not request elevated persistence. skill.json declares filesystem and shell permissions which align with running a local Python formatter. The skill does write only the output article.html in the working directory; it does not modify other skills or system-wide settings.
Assessment
This skill appears to do what it claims: locally convert Markdown to WeChat-compatible HTML using the bundled Python script and theme YAMLs. Before installing or running: (1) confirm python3 is available and that you run the script in the intended project directory (it reads article.md, article.yaml and .aws-article/config.yaml); (2) if you have a ~/.aws-article/presets/formatting/ directory, review its YAMLs if you do not want those themes applied; (3) no network calls or credentials are required by the skill, but as with any script you should review scripts/format.py (included) if you wish to validate there are no unexpected behaviors; (4) note the 'aws' prefix in the slug does not imply AWS credentials are needed. If you plan to run this on sensitive repos, verify article.yaml and .aws-article/config.yaml do not contain secrets you don't want processed or stored as outputs.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

Binspython3
latestvk97639hd23v75vvxxxjs0zeyhx85awv1
219downloads
1stars
10versions
Updated 5d ago
v1.0.22
MIT-0

排版

公众号一键排版 —— Markdown 转微信后台可粘贴 HTML,多主题、多字号、所见即所得。

套件说明 · 本 skill 属 aws-wechat-article-* 一条龙套件(共 9 个 slug,入口 aws-wechat-article-main)。跨 skill 的相对引用依赖同一 skills/ 目录,建议一并 clawhub install 全套。源码:https://github.com/aiworkskills/wechat-article-skills

能力披露(Capabilities)

本 skill 为纯本地 Markdown → HTML 转换,零网络、零凭证。

  • 凭证:无
  • 网络:无
  • 文件读(仓库内).aws-article/config.yaml、本篇 article.yamlarticle.md、可选 closing.md.aws-article/presets/formatting/<名>.yaml
  • 文件读(仓库外)format.py 还会检查用户家目录 ~/.aws-article/presets/formatting/(跨项目共享的自定义排版主题;只读预设文件,不读凭证)。不需要这个能力可清空 / 不创建该目录
  • 文件写:本篇 article.html
  • shell:仅 python3 {baseDir}/scripts/format.py

配套 skill(informational)

本 skill 是 aws-wechat-article-* 一条龙公众号套件的排版环节(入口 aws-wechat-article-main)。

  • 单独安装可直接使用:本 skill 的脚本 format.py 零依赖、纯本地,无跨 skill 脚本调用。
  • 工作流文档中会链接到 ../aws-wechat-article-main/references/*.md(首次引导等)。套件未装齐时,链接跳转会断,但排版功能本身可用。

完整 9 slug 清单见 源码仓库

路由

一键发文且未明确只要排版 → aws-wechat-article-main

将 Markdown 文章转换为微信公众号兼容的 HTML,所有样式 inline。

脚本目录

Agent 执行:确定本 SKILL.md 所在目录为 {baseDir}

脚本用途
scripts/format.pyMarkdown → 微信兼容 HTML

配置检查 ⛔

任何操作执行前,必须首次引导 执行其中的 「检测顺序」单独启用本 skill 时同上。检测通过后才能进行以下操作(或用户明确书面确认「本次不检查」):

内置主题

主题风格适用场景
default经典蓝 — 沉稳大气,色块小标题科技、商业、通用
grace优雅紫 — 柔和圆润,左边框小标题文化、美学
modern暖橙 — 活力大胆,色块小标题自媒体、创业
simple极简黑 — 极度克制,大量留白思想深度、学术

每个主题包含:标题样式(h1-h4)、段落、引用块、列表、分割线、图片、代码块、链接、强调色等完整规则。

工作流

排版进度:
- [ ] 第0步:配置检查(见本节「配置检查」)⛔
- [ ] 第1步:确定主题(与合并配置 / 用户指定)
- [ ] 第2步:转换
- [ ] 第3步:输出 HTML

第1步:确定主题

主题解析顺序(format.py 行为与智能体择一):

  1. 命令行 --theme <名称>:显式指定时始终优先
  2. 未传 --themeformat.py 仅读取 article.md 同目录的 article.yamldefault_format_preset须为 YAML 列表[] 或单元素 [主题名]);为空则用内置主题名 default
  3. 智能体在对话中帮用户选主题时,按:用户口述 → 本篇 article.yaml.default_format_preset.aws-article/presets/formatting/ 自定义 → 内置 defaultcustom_* / default_* 候选池解析由 main 在“本篇准备”阶段完成并写回 article.yaml

主题名须对应 内置主题.aws-article/presets/formatting/<名>.yaml。字段说明见 articlescreening-schema.md(与仓库 config.yaml 顶层字段对齐)。

第2步:转换

仓库根执行(路径按实际本篇目录调整):

# 不传 --theme:使用合并配置中的 default_format_preset,否则 default
python {baseDir}/scripts/format.py drafts/YYYYMMDD-slug/article.md -o drafts/YYYYMMDD-slug/article.html

# 显式指定主题(覆盖配置)
python {baseDir}/scripts/format.py drafts/YYYYMMDD-slug/article.md --theme grace -o drafts/YYYYMMDD-slug/article.html

# 自定义主色 / 字号
python {baseDir}/scripts/format.py article.md --theme modern --color "#A93226"
python {baseDir}/scripts/format.py article.md --font-size 15px

# 列出可用主题
python {baseDir}/scripts/format.py --list-themes

嵌入元素 {embed:...}

  • format.py名片 / 小程序embeds.aws-article/config.yaml 为准;仅「往期链接」:本篇 article.yaml 可写 embeds.related_articles,与全局 related_articles 深度合并(用于每篇不同推荐)。合并结果中非空 embeds 时解析 {embed:profile|miniprogram|miniprogram_card|link:名称};否则不对嵌入占位符做替换(视为无配置)。
  • writing 结构模板 中的占位说明一致。

第3步:输出 HTML

输出的 HTML 特性:

  • 所有样式 inline(微信编辑器兼容)
  • 正文不含文章标题:Markdown 中第一个 #(h1)在转换时被跳过,标题在公众号后台单独填写,正文不重复
  • 配图标记 ![类型:描述](placeholder) 保留为 <img> 标签,待 images skill 替换
  • 图注自动从标记描述中提取
  • 同目录存在 closing.md 时,format.py 会追加到文末(脚本既有行为)

选项

选项说明默认值
--theme <名称>主题;省略则按合并配置 → default见上文
--color <hex>自定义主色主题默认
--font-size <px>字号16px
-o <路径>输出路径同名 .html
--list-themes列出可用主题

自定义主题

.aws-article/presets/formatting/ 下新建主题文件即可。

主题文件格式和扩展方式详见:references/presets/README.md

过程文件

读取产出
article.md.aws-article/config.yaml + 同目录 article.yaml(默认主题与 embeds)、closing.md(可选)article.html

Comments

Loading comments...