Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

wechat-public-cli

v1.0.4

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

2· 995·8 current·9 all-time
Security Scan
VirusTotalVirusTotal
Suspicious
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The name/description (publish/download WeChat and Baijiahao content) align with the required binary (wechat-public-cli), the documented config fields (WeChat appid/secret/accessToken and Baijiahao cookie/token/appId), and the documented CLI commands. There are no unrelated credentials, binaries, or paths requested.
Instruction Scope
SKILL.md instructs cloning the GitHub repo, running npm install, and using the wechat-public-cli to read markdown files, CSS, and a local JSON config containing credentials. It does not direct the agent to read unrelated system files or to transmit data to unexpected endpoints. Note: SKILL.md documents environment variable overrides for credentials (WECHAT_*, BJH_*) even though the registry metadata lists no required env vars — this is plausible (credentials are optional until you publish) but worth awareness.
Install Mechanism
Install instructions point to standard mechanisms: npm install -g wechat-public-cli and git clone from GitHub followed by npm install. These are common and expected for a Node-based CLI; they are traceable to npm and GitHub rather than arbitrary download URLs. Installing npm packages (especially global) carries normal package-supply risk, but the mechanism itself is appropriate for the stated purpose.
Credentials
The configuration/env vars requested (WeChat appid/secret/access token; Baijiahao cookie/token/appId; optional paths and CSS) are proportional to publishing/downloading content. No unrelated secrets are requested. However, the skill will require sensitive tokens/cookies to interact with remote platforms, so treat those credentials as sensitive.
Persistence & Privilege
The skill is not marked always:true and is user-invocable; autonomous invocation is allowed but is the platform default. The skill does not request system-wide configuration or other skills' credentials. No elevated persistence is requested.
Assessment
This skill appears to do what it says, but take normal precautions before installing/running third-party CLIs: 1) Review the GitHub repo and the package.json (look for postinstall scripts) before installing globally; prefer npx or local install if you want to avoid a global binary. 2) Do not paste credentials into public places; use environment variables or a config file with restrictive filesystem permissions. 3) Treat WECHAT_APPID/WECHAT_SECRET and BJH_COOKIE/BJH_TOKEN as sensitive — use least-privilege credentials where possible. 4) Run the tool in an isolated environment (container or dedicated machine) if you are unsure about the package provenance. 5) If you need higher assurance, inspect the repository code (especially network calls, cookie handling, and any telemetry) to confirm there is no unexpected data exfiltration.

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

Runtime requirements

📰 Clawdis
Binswechat-public-cli
latestvk9755pax938z9wfmakkrnjv5xh82sfs5
995downloads
2stars
5versions
Updated 8h ago
v1.0.4
MIT-0

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

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:

npm install -g wechat-public-cli

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

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:

{
	"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

npm run build:cli

Commands

  • Create WeChat draft:
    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):
    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):
    wechat-public-cli wechat:publish --media-id YOUR_MEDIA_ID
    
  • Send to all WeChat followers:
    wechat-public-cli wechat:sendall --file /path/to/article.md
    
  • Publish Baijiahao:
    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:
    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:
    wechat-public-cli wechat:download --count 10 --out-dir ./wechat-downloads
    
  • Get cumulative user statistics:
    # 查询最近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:
    # 查询最近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 参数指定自定义样式文件:

# 使用技术类文章样式
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,不传任何参数时自动使用:

wechat-public-cli wechat:publish --file article.md

2. 为不同类型文章使用不同样式

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

# 技术类文章使用 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.jsonpaths.customCss 字段指定默认样式文件路径:

{
	"paths": {
		"customCss": "./styles/default.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.

Comments

Loading comments...