Publish and download WeChat Public Platform content and Baijiahao articles via a local CLI.

MITAuto-check passedProductivity & Automation

Install Wechat Public CLI

skills CLI
$ npx skills add ai-chen2050/obsidian-wechat-public-platform --skill wechat-public-cli -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ai-chen2050/obsidian-wechat-public-platform wechat-public-cli --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ai-chen2050/obsidian-wechat-public-platform.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skill .claude/skills/wechat-public-cli && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
wechat-public-cli
GitHub stars
149
Token cost
~1.6k tokens
SKILL.md length
346 words
Files
4
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Publish and download WeChat Public Platform content and Baijiahao articles via a local CLI.

  • Works in 3 steps: 使用默认样式 → 为不同类型文章使用不同样式 → 在配置文件中指定默认样式
  • Tasks that involve Messaging and chat bots
  • SKILL.md covers Goal, Requirements, Article Template and Install, plus 5 more sections
  • Calls npm, git and npx; needs WECHAT_SECRET and WECHAT_ACCESS_TOKEN

What it does

Wechat Public CLI is an agent skill from ai-chen2050/obsidian-wechat-public-platform. Publish and download WeChat Public Platform content and Baijiahao articles via a local CLI.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `test.md` and `wechat-public.config.json`).

It sits in Productivity & Automation, covering Messaging and chat bots. It works with WeChat. The repository describes itself as: Obsidian Wechat public Plugin (微信公众平台) is a plugin to release article from your Obsidian Vault to WeChat, Baidu baiJiahao or other platforms. The licence is MIT.

When your agent uses it

  • Tasks that involve Messaging and chat bots

Example prompts

  • “/wechat-public-cli”

Requirements

  • Node.js
  • A credential in YOUR_APP_SECRET
  • A credential in YOUR_BJH_TOKEN

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. 使用默认样式
  2. 为不同类型文章使用不同样式
  3. 在配置文件中指定默认样式

What it can do on your machine

Read from SKILL.md and the folder at commit 6036e42. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm
    • git
    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • image.png

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • WECHAT_SECRET
    • WECHAT_ACCESS_TOKEN
    • BJH_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Wechat Public CLI loads about 1.6k tokens when it runs. Until then it costs about 27 tokens; SKILL.md has 346 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~27
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ai-chen2050/obsidian-wechat-public-platform at commit 6036e42, republished under its MIT licence (© ai-chen2050). 346 words, ~1,623 tokens.

Download SKILL.mdSave it as .claude/skills/wechat-public-cli/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
wechat-public-cli
description
Publish and download WeChat Public Platform content and Baijiahao articles via a local CLI.
homepage
https://github.com/ai-chen2050/obsidian-wechat-public-platform

Wechat Public CLI Skill

Goal

Publish an Obsidian markdown article to WeChat Public Platform or Baidu Baijiahao using a local CLI.

Requirements

  • Node.js 16+
  • Config file or environment variables for credentials
  • Markdown file with frontmatter (author, digest, banner or banner_path, thumb_media_id optional)

Article Template


title: "Test" author: Blake digest: Short summary banner: "https://image.png"


Install

bash
git clone https://github.com/ai-chen2050/obsidian-wechat-public-platform.git
cd obsidian-wechat-public-platform
npm install

Or by clawdhub
claw install wechat-public-cli

Or install globally via npm:

bash
npm install -g wechat-public-cli

If this CLI is published to npm, you can run it via npx without cloning:

bash
npx wechat-public-cli wechat:draft --file /path/to/article.md

Config

Create a JSON file in the repo root named wechat-public.config.json:

json
{
	"wechat": {
		"appid": "YOUR_APP_ID",
		"secret": "YOUR_APP_SECRET",
		"accessToken": ""
	},
	"baidu": {
		"cookie": "YOUR_BJH_COOKIE",
		"token": "YOUR_BJH_TOKEN",
		"appId": "YOUR_BJH_APP_ID"
	},
	"paths": {
		"customCss": "./custom.css",
		"downloadDir": "./wechat-downloads"
	}
}

Env override:

  • WECHAT_APPID, WECHAT_SECRET, WECHAT_ACCESS_TOKEN
  • BJH_COOKIE, BJH_TOKEN, BJH_APP_ID
  • WECHAT_CUSTOM_CSS, WECHAT_PUBLIC_CONFIG
  • WECHAT_DOWNLOAD_DIR

Build

bash
npm run build:cli

Commands

  • Create WeChat draft:
    bash
    wechat-public-cli wechat:draft --file /path/to/article.md
    # 使用自定义 CSS
    wechat-public-cli wechat:draft --file /path/to/article.md --css /path/to/tech.css
  • Publish WeChat (from file):
    bash
    wechat-public-cli wechat:publish --file /path/to/article.md
    # 使用自定义 CSS
    wechat-public-cli wechat:publish --file /path/to/article.md --css /path/to/business.css
  • Publish WeChat (from media_id):
    bash
    wechat-public-cli wechat:publish --media-id YOUR_MEDIA_ID
  • Send to all WeChat followers:
    bash
    wechat-public-cli wechat:sendall --file /path/to/article.md
  • Publish Baijiahao:
    bash
    wechat-public-cli bjh:publish --file /path/to/article.md
    # 使用自定义 CSS
    wechat-public-cli bjh:publish --file /path/to/article.md --css /path/to/custom.css
  • Convert markdown to HTML:
    bash
    wechat-public-cli convert --file /path/to/article.md --platform wechat
    # 使用自定义 CSS
    wechat-public-cli convert --file /path/to/article.md --platform wechat --css /path/to/style.css
  • Download recent N WeChat articles:
    bash
    wechat-public-cli wechat:download --count 10 --out-dir ./wechat-downloads
  • Get cumulative user statistics:
    bash
    # 查询最近7天(默认)
    wechat-public-cli wechat:stats:cumulate
    # 指定日期范围(最多30天)
    wechat-public-cli wechat:stats:cumulate --begin-date 2025-11-01 --end-date 2025-11-07
  • Get published content overview statistics:
    bash
    # 查询最近7天(默认)
    wechat-public-cli wechat:stats:bizsummary
    # 指定日期范围(最多30天)
    wechat-public-cli wechat:stats:bizsummary --begin-date 2025-11-01 --end-date 2025-11-07
使用自定义 CSS 样式

所有发布命令都支持通过 --css 参数指定自定义样式文件:

bash
# 使用技术类文章样式
wechat-public-cli wechat:draft --file tech-article.md --css ./styles/tech.css

# 使用营销类文章样式
wechat-public-cli wechat:publish --file marketing.md --css ./styles/marketing.css

# 使用教程类文章样式
wechat-public-cli bjh:publish --file tutorial.md --css ./styles/tutorial.css

自定义公众号格式

你可以通过定义和修改 CSS 文件,来调整发布到微信公众号的文章样式。支持为不同类型的文章使用不同的样式文件。

CSS 文件加载优先级
  1. 命令行参数 --css (最高优先级)
  2. 配置文件 wechat-public.config.json 中的 paths.customCss
  3. 默认文件 当前目录下的 custom.css
  4. 空样式 如果以上都不存在,则不应用自定义样式
使用场景示例
1. 使用默认样式

在项目根目录创建 custom.css,不传任何参数时自动使用:

bash
wechat-public-cli wechat:publish --file article.md
2. 为不同类型文章使用不同样式

创建多个 CSS 文件,通过 --css 参数指定:

bash
# 技术类文章使用 tech.css
wechat-public-cli wechat:publish --file tech-article.md --css ./styles/tech.css

# 商业类文章使用 business.css
wechat-public-cli wechat:publish --file business-article.md --css ./styles/business.css

# 教程类文章使用 tutorial.css
wechat-public-cli wechat:publish --file tutorial.md --css ./styles/tutorial.css
3. 在配置文件中指定默认样式

在 wechat-public.config.json 的 paths.customCss 字段指定默认样式文件路径:

json
{
	"paths": {
		"customCss": "./styles/default.css"
	}
}

这样不传 --css 参数时,会使用配置文件中指定的样式。

CSS 示例
css
/* tech.css - 技术文章样式 */
.wechat-title {
	font-size: 2em;
	color: #2c3e50;
	font-family: "Monaco", "Consolas", monospace;
}
.wechat-banner {
	border-radius: 8px;
}
code {
	background-color: #f4f4f4;
	padding: 2px 4px;
}

/* business.css - 商业文章样式 */
.wechat-title {
	font-size: 2.2em;
	color: #c7254e;
	font-family: "Arial", "Helvetica", sans-serif;
}

AI 也可通过自动生成或修改 CSS 文件,实现对公众号内容格式的智能优化。

Notes

  • WeChat draft requires thumb_media_id or banner/banner_path in frontmatter.
  • Baijiahao publish requires banner or banner_path in frontmatter.
  • The CLI uploads inline images to the target platform automatically.
  • wechat:download saves recent articles in update_time order and writes all news_item entries.
  • wechat:stats:cumulate / wechat:stats:bizsummary must be called server-side; the date range can be at most 30 days. Results are printed as JSON to stdout.

© ai-chen2050, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files in skill of ai-chen2050/obsidian-wechat-public-platform.

  • SKILL.md
  • custom.css
  • test.md
  • wechat-public.config.json

Open the folder on GitHubat commit 6036e42

Compare with similar skills

Wechat Public CLI next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Wechat Public CLI compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Wechat Public CLI this skillai-chen2050/obsidian-wechat-public-platform149—~1.6kAutomated safety check: PassMIT
She Love Me863401402/she-love-me9191 repos~1.3kAutomated safety check: PassMIT
Wechat Article Extractorfreestylefly/wechat-article-extractor-skill1361 repos~1kAutomated safety check: PassNone
Wechat Miniprogram Builderchenjin-cmd/wechat-miniprogram-builder355—~634Automated safety check: PassMIT
Skill Wechat PublisherZJU-REAL/Easel3.2k—~1.8kAutomated safety check: PassApache-2.0
Wechat Mp Writerth3ee9ine/wechat-claw-skill206—~1.4kAutomated safety check: PassMIT

Similar skills

  • She Love Me

    863401402/she-love-me

    Acquire, import, and analyze WeChat or QQ chat histories, including installing supported exporters, guiding required login or contact selection, converting exports, assessing relationship dynamics…

    919 GitHub starsUsed in 1 repo~1.3k tokens
    Productivity & AutomationAuto-check passed
  • Wechat Article Extractor

    freestylefly/wechat-article-extractor-skill

    Extract metadata and content from WeChat Official Account articles.

    136 GitHub starsUsed in 1 repo~1k tokens
    Productivity & AutomationAuto-check passed
  • Wechat Miniprogram Builder

    chenjin-cmd/wechat-miniprogram-builder

    This skill should be used when the user wants to build, launch, monetize, or promote a WeChat mini-program with AI (vibe coding) — including topic selection, account registration & ICP filing…

    355 GitHub stars~634 tokensUpdated 2 mo ago
    Productivity & AutomationAuto-check passed
  • 微信公众号文章自动创作与发布工具。给定参考文章、文字或文档,自动搜索整理全网相关信息、生成图文并茂的公众号文章,并发布到微信公众号草稿箱。特别强调反 AI 检测写作。

    3.2k GitHub stars~1.8k tokensUpdated yesterday
    Productivity & AutomationAuto-check passed
  • Wechat Mp Writer

    th3ee9ine/wechat-claw-skill

    微信公众号文章全自动写作与发布。从信息搜集、AI配图规划、报刊级 HTML 排版、到草稿创建和发布的完整流程。适用于 AI 日报、财经周报、深度分析、新闻资讯类文章。内置多种模板,并提供本地渲染、校验、图片规划和发布流水线脚本。

    206 GitHub stars~1.4k tokensUpdated 6 mo ago
    Productivity & AutomationAuto-check passed
  • Qiaomu Wx Video

    joeseesun/qiaomu-wx-video

    Qiaomu skill and workflow for downloading a WeChat Channels / 视频号 video or generated live replay when the user provides a weixin.qq.com/sph share link.

    134 GitHub stars~751 tokensUpdated 2 mo ago
    Productivity & AutomationAuto-check passed

Works with

Questions about Wechat Public CLI

What does Wechat Public CLI do?

Publish and download WeChat Public Platform content and Baijiahao articles via a local CLI. Wechat Public CLI is an agent skill from ai-chen2050/obsidian-wechat-public-platform. Publish and download WeChat Public Platform content and Baijiahao articles via a local CLI.

When should I use Wechat Public CLI?

Wechat Public CLI fits situations like: tasks that involve Messaging and chat bots.

How do I install Wechat Public CLI in Claude Code?

Run `npx skills add ai-chen2050/obsidian-wechat-public-platform --skill wechat-public-cli -a claude-code`. Or copy the skill folder (skill in ai-chen2050/obsidian-wechat-public-platform) into .claude/skills/wechat-public-cli in your project. Claude Code loads it when a task matches its description.

How do I install Wechat Public CLI in Codex?

Run `npx skills add ai-chen2050/obsidian-wechat-public-platform --skill wechat-public-cli -a codex`. Or copy the skill folder (skill in ai-chen2050/obsidian-wechat-public-platform) into .agents/skills/wechat-public-cli in your project. Codex loads it when a task matches its description.

Can I use Wechat Public CLI in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ai-chen2050/obsidian-wechat-public-platform --skill wechat-public-cli -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/wechat-public-cli, .gemini/skills/wechat-public-cli, .github/skills/wechat-public-cli and .opencode/skills/wechat-public-cli in your project.

What does Wechat Public CLI need to run?

Going by SKILL.md and its folder, Wechat Public CLI needs the command-line tools its instructions call (npm, git and npx) and credentials named WECHAT_SECRET, WECHAT_ACCESS_TOKEN and BJH_TOKEN. Our summary lists: Node.js; A credential in YOUR_APP_SECRET; A credential in YOUR_BJH_TOKEN.

Does Wechat Public CLI access the network?

SKILL.md names 1 domain. As links in the text: image.png. This is read from the text; nothing was executed.

Is Wechat Public CLI safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Wechat Public CLI use?

Wechat Public CLI is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Wechat Public CLI use?

About 1.6k tokens (SKILL.md is roughly 6.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Wechat Public CLI?

Skills that share tags, products or a category with Wechat Public CLI: She Love Me (863401402/she-love-me, 919 stars), Wechat Article Extractor (freestylefly/wechat-article-extractor-skill, 136 stars), Wechat Miniprogram Builder (chenjin-cmd/wechat-miniprogram-builder, 355 stars) and Skill Wechat Publisher (ZJU-REAL/Easel, 3.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Wechat Public CLI?

ai-chen2050 (a GitHub user) maintains it in ai-chen2050/obsidian-wechat-public-platform, which has 149 GitHub stars. The repository was last updated on April 28, 2026.

Source: ai-chen2050/obsidian-wechat-public-platform on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.