Xpersona
微

微信公众号文章排版

CLAWHUB · Unverified

将 Markdown 文章转换为微信公众号兼容的精美内联样式 HTML,支持30主题、AI内容增强、代码高亮及一键复制推送。 Skill: 微信公众号文章排版 Owner: love254443233 Summary: 将 Markdown 文章转换为微信公众号兼容的精美内联样式 HTML,支持30主题、AI内容增强、代码高亮及一键复制推送。 Tags: latest:1.0.0 Version history: v1.0.0 | 2026-04-03T15:08:25.098Z | user wechat-typeset-pro 1.0.0 初始发布: - 将 Markdown 文章一键转为适配微信公众号的精美内联样式 HTML,支持 30 套主题和可视化画廊选择 - 支持 AI 内容增强,如结构化预处理、要点提炼、自动容器标记等 - 支持多种风格主题,并智能推荐适合内容的主题,支持实时预览和选择 - 内置 CJK 间距修复、代码高亮、图说识别、对话气泡、多样 callout、时间线、画廊、流程等丰富排版增强 - 支持一键复制排版结果到公众号,或直接

62
Rank
84
Safety
976
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 976 downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s177sxksm3hqwz1yk4s38rm5h1845f0g:wechat-typeset-pro
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-love254443233-wechat-typeset-pro/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

78,820 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

# wechat-typeset-pro

微信公众号专业排版技能。把 Markdown 文章转为微信公众号兼容的精美内联样式 HTML,30 套主题 + 可视化画廊选择 + AI 内容增强 + 一键复制到公众号。可选推送到草稿箱。

## Skill Description

微信公众号专业排版引擎:Markdown → 精美微信兼容 HTML。当用户说"排版""微信排版""公众号排版""format""美化文章"时使用。支持 30 套精美主题、可视化画廊预览、AI 内容结构增强、深色模式、代码高亮。

## When to Use

- 用户需要将 Markdown 文章排版为微信公众号格式
- 用户说"排版""微信排版""美化""格式化为公众号格式""公众号排版"
- `wechat-content-studio` 技能的排版流程调用本技能
- 需要预览多种主题风格并选择最佳方案

## 脚本目录

`{baseDir}` = 本 SKILL.md 所在目录。

| 脚本 | 用途 |
|------|------|
| `scripts/format.py` | 排版引擎:Markdown → 微信兼容 HTML |
| `scripts/publish.py` | 推送:HTML → 公众号草稿箱 |

## 配置

配置文件:`{baseDir}/config.json`

微信凭证优先从环境变量读取(`~/.openclaw/.env`),无需在 config.json 中配置敏感信息。

### 环境变量(自动从 ~/.openclaw/.env 加载)

| 变量 | 用途 |
|------|------|
| `WECHAT_APP_ID` | 微信公众号 AppID |
| `WECHAT_APP_SECRET` | 微信公众号 AppSecret |

## Instructions

### 完整工作流

#### 第 1 步:确认文章

1. 如果用户给了文件路径,直接读取
2. 如果没给路径,问用户要文章路径
3. 读取文章内容,确认标题和字数

#### 第 1.5 步:结构化预处理(仅在需要时)

读取文章后,检测 Markdown 结构完整度。

**判断规则**:
- 有 `##` 标题且格式标记分布合理 → 跳过,直接进入第 2 步
- 缺少 `##` 标题或几乎没有格式标记 → 执行结构化

**结构化规则(只加标记,不改内容)**:
1. 识别逻辑段落插入 `##` 标题(从内容提炼,不编造)
2. 确保段落之间有空行分隔
3. 识别并列内容加列表标记
4. 识别关键词加 `**加粗**`
5. 清理格式(多余空行、缩进、标点)
6. **不改措辞**:不调语序、不增删内容

保存为 `~/WorkBuddy/wechat-typeset-pro/xxx-structured.md`(与 `config.json` 的 `output_dir`,即 `path.join(HOME, 'WorkBuddy', 'wechat-typeset-pro')` 一致),告知用户。

#### 第 2 步:AI 内容分析 + 自动套格式

分析内容结构,在 Markdown 层面自动套用排版容器:

1. **对话/访谈** → `:::dialogue[标题]`
2. **连续多图(3+)** → `:::gallery[标题]`
3. **核心观点/金句** → `> [!important] 标题`(一篇 1-3 处)
4. **小技巧** → `> [!tip] 标题`
5. **注意事项** → `> [!warning] 标题`
6. **分隔符** → 章节转换处确保有 `---`
7. **图说** → 图片后斜体:`*图片说明*`

保存增强后 Markdown 为 `~/WorkBuddy/wechat-typeset-pro/xxx-enhanced.md`。

#### 第 2.5 步:推荐主题

根据内容分析推荐 3 个最适合的主题:

| 内容类型 | 推荐主题 |
|----------|----------|
| 深度长文/分析 | newspaper, magazine, ink |
| 科技产品/AI工具 | bytedance, github, sspai |
| 访谈/对话体 | terracotta, coffee-house, mint-fresh |
| 教程/操作指南 | github, sspai, bytedance |
| 文艺/随笔/观点 | terracotta, sunset-amber, lavender-dream |
| 活力/动态/速报 | sports, bauhaus, chinese |

#### 第 3 步:打开主题画廊(默认)

```bash
python3 {baseDir}/scripts/format.py \
  --input "文章路径.md" \
  --gallery \
  --recommend newspaper magazine ink
```

用**真实文章**渲染 20 个主题,浏览器中选择。

#### 第 3 步(备选):直接指定主题

```bash
python3 {baseDir}/scripts/format.py \
  --input "文章路径.md" \
  --theme terracotta
```

#### 第 4 步:确认结果

- Gallery 模式:浏览器中切换主题,选中后点按钮复制,粘贴到公众号后台
- 直接模式:浏览器中检查预览,点「复制到微信」

### 推送到草稿箱(可选)

用户说"推送""发公众号"时执行:

```bash
python3 {baseDir}/scripts/publish.py \
  --dir "排版输出目录" \
  --cover "封面图路径(可选)"
```

从 Markdown 直接推送:

```bash
python3 {baseDir}/scripts/publish.py \
  --input "文章.md" \
  --theme terracotta
```

### 参数说明

**format.py**:
- `--input` / `-i`:Markdown 文件路径(必须)
- `--gallery`:打开主题画廊(推荐)
- `--theme` / `-t`:直接指定主题名
- `--output` / `-o`:输出目录(默认 `~/WorkBuddy/wechat-typeset-pro`,即 `path.join(HOME, 'WorkBuddy', 'wechat-typeset-pro')`)
- `--recommend`:推荐主题 ID 列表
- `--no-open`:不自动打开浏览器
- `--format`:输出格式 wechat/html/plain

**publish.py**:
- `--dir`:排版输出目

_meta.json

{
  "ownerId": "kn7ddbwnnq70gnhsrrm20ma1qs82zx6f",
  "slug": "wechat-typeset-pro",
  "version": "1.0.0",
  "publishedAt": 1775228905098
}

skill-card.md

## Description:

Converts Markdown articles into WeChat Official Account-compatible inline-styled HTML with theme previews, content-structure enhancements, code highlighting, copy-to-WeChat output, and optional draft publishing.

This skill is ready for commercial/non-commercial use.

## Publisher:

[love254443233](https://clawhub.ai/user/love254443233)

### License/Terms of Use:

MIT-0

## Use Case:

Developers, content operators, and publishing assistants use this skill to format Markdown drafts for WeChat Official Account publishing, compare theme previews, generate WeChat-compatible HTML, and optionally push finished content to a WeChat draft box.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Broad local file discovery can expose more local files than intended when resolving article images.

Mitigation: Narrow vault_root to a specific attachment folder and use only trusted local articles.

Risk: Auto-opened preview files may display unsanitized local article content in a browser.

Mitigation: Review generated previews before use and consider --no-open when processing unfamiliar content.

Risk: Publishing can fetch arbitrary external image URLs and sends article content, images, and WeChat credential-backed requests to WeChat.

Mitigation: Avoid untrusted external image URLs, keep WeChat credentials in environment-managed secrets, and publish only content approved for WeChat.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/love254443233/skills/wechat-typeset-pro)
- [Publisher profile](https://clawhub.ai/user/love254443233)

## Skill Output:

**Output Type(s):** [Markdown, Code, Files, Shell commands, Configuration, Guidance]

**Output Format:** [Markdown guidance with shell commands and generated HTML files]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Produces formatted article HTML, browser preview or gallery files, optional enhanced Markdown, and optional WeChat draft publishing actions.]

## Skill Version(s):

1.0.0 (source: release evidence)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

config.json

{
  "output_dir": "~/WorkBuddy/wechat-typeset-pro",
  "vault_root": "/Users/yaohua.liu",
  "image_search_paths": [],
  "settings": {
    "default_theme": "newspaper",
    "auto_open_browser": true
  },
  "wechat": {
    "app_id": "",
    "app_secret": "",
    "author": ""
  },
  "cover": {
    "output_dir": "~/WorkBuddy/wechat-typeset-pro/covers",
    "image_generation_script": ""
  }
}

themes/bauhaus.json

{
  "name": "包豪斯",
  "description": "红蓝黄三原色 #E30613/#004D9F/#F5A623,粗黑边框,几何构成主义风格,适合设计师、创意类内容",
  "colors": {
    "primary": "#1a1a1a",
    "accent": "#E30613",
    "background": "#ffffff",
    "blockquote_bg": "#fff4d6",
    "code_bg": "#f0f0f0",
    "hr_color": "#E30613",
    "footnote_bg": "#ffffff"
  },
  "styles": {
    "wrapper": {
      "background_color": "#ffffff",
      "padding": "16px"
    },
    "h1": {
      "font_size": "31px",
      "font_weight": "900",
      "color": "#ffffff",
      "text_transform": "uppercase",
      "line_height": "1.16",
      "letter_spacing": "-0.02em",
      "padding": "10px 14px 9px",
      "background": "linear-gradient(90deg, #E30613 0%, #E30613 64%, #004D9F 64%, #004D9F 86%, #F5A623 86%, #F5A623 100%)",
      "border": "3px solid #1a1a1a",
      "box_shadow": "6px 6px 0 #1a1a1a",
      "margin_top": "36px",
      "margin_bottom": "18px"
    },
    "h2": {
      "font_size": "22px",
      "font_weight": "800",
      "color": "#1a1a1a",
      "text_transform": "uppercase",
      "line_height": "1.35",
      "letter_spacing": "0.08em",
      "padding": "8px 16px",
      "background": "linear-gradient(90deg, #F5A623 0%, #F5A623 68%, #ffffff 68%, #ffffff 100%)",
      "border_left": "10px solid #004D9F",
      "border_top": "3px solid #1a1a1a",
      "border_bottom": "3px solid #1a1a1a",
      "margin_top": "34px",
      "margin_bottom": "18px"
    },
    "h3": {
      "font_size": "20px",
      "font_weight": "700",
      "color": "#1a1a1a",
      "text_transform": "uppercase",
      "line_height": "1.45",
      "letter_spacing": "0.05em",
      "padding": "6px 12px",
      "background": "#ffffff",
      "border_left": "3px solid #E30613",
      "margin_top": "28px",
      "margin_bottom": "14px"
    },
    "p": {
      "font_size": "15px",
      "color": "#1a1a1a",
      "line_height": "1.65",
      "margin_top": "0",
      "margin_bottom": "18px",
      "letter_spacing": "0.5px",
      "text_align": "left"
    },
    "blockquote": {
      "border_left": "6px solid #F5A623",
      "border_right": "2px solid #004D9F",
      "border_top": "2px solid #1a1a1a",
      "background": "linear-gradient(135deg, #fff4d6 0%, #fff8ea 100%)",
      "padding": "16px 20px",
      "margin_top": "24px",
      "margin_bottom": "24px",
      "border_radius": "0",
      "font_size": "16px",
      "color": "#333333",
      "line_height": "1.65"
    },
    "blockquote_p": {
      "font_size": "16px",
      "color": "#1a1a1a",
      "line_height": "1.65",
      "margin_bottom": "0",
      "background": "transparent"
    },
    "strong": {
      "font_weight": "900",
      "color": "#ffffff",
      "background": "#E30613",
      "padding": "0 6px",
      "display": "inline"
    },
    "em": {
      "font_style": "italic",
      "color": "#555555"
    },
    "a": {
      "color": "#004D9F",
      "text_decoration": "none"
    },
    "img": {
      "max_width": "100%",
      "border_radius": "0",
      "display": "block",
      "

Sponsored

Ads related to 微信公众号文章排版 and adjacent AI workflows.