Token导航 LogoToken导航

Agent Skill · 研究检索

wechat-article-formatter(微信文章格式化器)

wechat-article-formatter 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

wechat-article-formatter 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 44,750。

总安装 894周安装 38GitHub Stars 62下载 313核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:wechat-article-formatter(微信文章格式化器)
来源仓库:https://github.com/iamzifei/wechat-article-formatter-skill
仓库路径:skills/wechat-article-formatter
安装命令:
npx skills add https://github.com/iamzifei/wechat-article-formatter-skill --skill wechat-article-formatter
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/iamzifei/wechat-article-formatter-skill --skill wechat-article-formatter

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

微信文章格式化器技能用于查找、检索和筛选相关信息。适合根据关键词、任务场景或来源线索快速定位候选结果。通过 npx skills add 命令从指定 GitHub 仓库安装,支持 Codex、Claude、Cursor 等宿主环境。使用前需确认权限范围和维护状态,注意可能触发联网、命令执行或文件读写操作。

wechat-article-formatter 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/wechat-article-formatter

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/iamzifei/wechat-article-formatter-skill --skil…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

wechat-article-formatter 怎么安装?

在终端执行 npx skills add https://github.com/iamzifei/wechat-article-formatter-skill --skill wechat-a…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

wechat-article-formatter 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

wechat-article-formatter 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

wechat-article-formatter 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

wechat-article-formatter 用的人多吗?

公开数据是累计安装 894 次,近一周安装 38 次,下载 313 次,GitHub 62 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

wechat-article-formatter 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
wechat-article-formatter

微信文章格式化器 · 本页

89462接触敏感数据未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

WeChat Article Formatter & Publisher

Format markdown articles with bm.md styling and publish directly to WeChat Official Account drafts via the official API.

Overview

  1. Read markdown file (typically wechat.md from article directory)
  2. Upload local images to WeChat CDN via media/uploadimg API
  3. Replace local image paths with WeChat CDN URLs in markdown
  4. Render markdown to styled HTML via bm.md API with custom CSS
  5. Publish to WeChat draft via official draft/add API

CRITICAL: Do NOT use third-party publishing APIs (e.g. 微绿 wechat-publish). They strip inline CSS styles. Always use WeChat's official draft/add API directly.

Credentials

Read from ~/.env:

VariablePurpose
WECHAT_APP_IDWeChat Official Account AppID
WECHAT_APP_SECRETWeChat Official Account AppSecret

If not found, prompt the user to provide them and save to ~/.env.

Workflow

Step 1: Identify Input

The user provides a markdown file path (e.g. wechat.md in an article directory).

Detect the article directory to find:

  • promotion.md → extract digest/summary
  • _attachments/ → local images
  • Brand config from the conversation context → author name

Step 2: Get WeChat Access Token

params = urlencode({
    'grant_type': 'client_credential',
    'appid': WECHAT_APP_ID,
    'secret': WECHAT_APP_SECRET
})
# GET https://api.weixin.qq.com/cgi-bin/token?{params}

If error 40164 (IP not in whitelist), instruct user to add the IP at: mp.weixin.qq.com → 设置与开发 → 基本配置 → IP白名单.

Step 3: Upload Images to WeChat CDN

CRITICAL: Upload ALL images in the SAME session. WeChat CDN URLs from previous sessions may expire.

Use media/uploadimg API for inline content images:

# POST https://api.weixin.qq.com/cgi-bin/media/uploadimg?access_token={token}
# Content-Type: multipart/form-data
# Body: media=@image_file
# Response: {"url": "http://mmbiz.qpic.cn/..."}

Use material/add_material API for cover/thumb image:

# POST https://api.weixin.qq.com/cgi-bin/material/add_material?access_token={token}&type=image
# Content-Type: multipart/form-data
# Body: media=@cover_image
# Response: {"media_id": "...", "url": "..."}

For remote images (e.g. https://i.ibb.co/...), download first, then upload to WeChat CDN.

After uploading, replace all local/remote image paths in the markdown with WeChat CDN URLs before rendering.

Step 4: Render with bm.md

Read custom CSS from {{SKILL_DIR}}/styles/custom.css.

IMPORTANT: Write the JSON payload to a temp file and use curl -d @file to avoid shell escaping issues.

payload = json.dumps({
    "markdown": md_content,
    "markdownStyle": "green-simple",
    "codeTheme": "kimbie-light",
    "customCss": css_content,
    "enableFootnoteLinks": True,
    "openLinksInNewWindow": True,
    "platform": "wechat"
}, ensure_ascii=False)

# Write to /tmp/bm-payload.json, then:
# curl -s -X POST https://bm.md/api/markdown/render \
#   -H "Content-Type: application/json" \
#   -d @/tmp/bm-payload.json

The ensure_ascii=False is critical — without it, Chinese characters become \uXXXX escape sequences.

Step 5: Publish to WeChat Draft

draft_payload = json.dumps({
    "articles": [{
        "title": title,
        "author": author,                    # e.g. "在悉尼和稀泥"
        "thumb_media_id": thumb_media_id,     # from Step 3 material upload
        "content": html,                      # from Step 4 bm.md render
        "digest": digest,                     # from promotion.md, max ~60 Chinese chars
        "need_open_comment": 1,               # enable comments
        "only_fans_can_comment": 0,           # allow all users to comment
        "original_article_type": 1,           # declare as original content
        "reward_wording": "喜欢这篇文章,请我喝杯咖啡",  # enable tipping
        "creation_source_type": 1             # 个人观点,仅供参考
    }]
}, ensure_ascii=False).encode('utf-8')

# POST https://api.weixin.qq.com/cgi-bin/draft/add?access_token={token}

Default publish settings:

FieldValueDescription
need_open_comment1Enable comments
only_fans_can_comment0All users can comment
original_article_type1Declare as original
reward_wording"喜欢这篇文章,请我喝杯咖啡"Enable tipping
creation_source_type1个人观点,仅供参考

Digest extraction from promotion.md:

Look for ## 文章摘要 section, extract text, truncate to ~60 Chinese characters (WeChat limit is 120 bytes).

Author resolution (first match wins):

  1. User explicitly specified
  2. Brand config author field
  3. Brand config 品牌名称 field

Step 6: Report Result

WeChat Publishing Complete!

Title: {title}
Author: {author}
Digest: {digest}
Original: ✓ declared
Tipping: ✓ enabled
Comments: ✓ open to all
Images: {N} uploaded to WeChat CDN
media_id: {media_id}

→ Preview at: https://mp.weixin.qq.com (内容管理 → 草稿箱)

Markdown Content Order for WeChat

When building the WeChat markdown, elements should appear in this order:

1. 关注引导文字 (e.g. 👆 「关注」加「星标」...)
2. 封面图 (cover image)
3. --- 分隔线
4. 正文内容 (article body with inline images)
5. --- 分隔线
6. 作者介绍 (about author section)
7. --- 分隔线
8. 推广区块 (promo blockquote with image)
9. --- 分隔线
10. 互动引导 (engagement CTA)

The H1 title should be REMOVED from markdown — WeChat displays its own title from the title field.

Common Pitfalls

PitfallSolution
Chinese shows as \uXXXXUse ensure_ascii=False in ALL json.dumps() calls
Images not displayingUpload in same session; don't reuse old CDN URLs
Styles stripped (plain text)Use WeChat official draft/add API, NOT third-party APIs
40164 IP whitelist errorAdd current IP at mp.weixin.qq.com → 基本配置 → IP白名单
45004 digest too longKeep digest under 60 Chinese characters
40007 invalid media_idUpload cover via material/add_material first to get thumb_media_id
> [!NOTE] renders wrongConvert GitHub alerts to regular > blockquotes for WeChat

bm.md API Reference

Render: POST https://bm.md/api/markdown/render

ParameterTypeDefaultDescription
markdownstringrequiredMarkdown content
markdownStylestringayu-lightStyle ID (use green-simple)
codeThemestringkimbie-lightCode highlight theme
customCssstring""Custom CSS scoped to #bm-md
enableFootnoteLinksbooleantrueConvert links to footnotes
openLinksInNewWindowbooleantrueLinks open in new window
platformstringhtmlTarget: html, wechat, zhihu, juejin

Available styles: ayu-light, bauhaus, blueprint, botanical, green-simple, maximalism, neo-brutalism, newsprint, organic, playful-geometric, professional, retro, sketch, terminal

Styling Features

The custom CSS (styles/custom.css) provides:

  • Optima/Microsoft YaHei fonts
  • Green accent color (rgb(53, 179, 120))
  • H2 headings: white text on black background
  • Bold text: green color
  • Blockquotes: green left border
  • Responsive tables with alternating row colors
  • Code blocks with dark background

Dependencies

  • WeChat Official Account API credentials (~/.env)
  • bm.md rendering service (no auth required)
  • Custom CSS at {{SKILL_DIR}}/styles/custom.css

平台分布

Codex

34.04%
按下载量换算107

Claude

31.01%
按下载量换算97

Cursor

18.91%
按下载量换算59

Gemini CLI

8.75%
按下载量换算27

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills