wechat-mp-publisher

wechat-mp-publisher is a skill for Claude Code, Codex from Morningstar202604/awesome-skillkit. It costs 84 tokens per session (888 once invoked), scanned A, original, Apache-2.0.

A command-line tool for publishing articles, videos, and drafts to Baijiahao, a Baidu content-publishing platform.

In plain words
What is it for?
Publish articles or videos with titles, descriptions, covers, and tags, or save an article as a draft through Baijiahao’s official API.
Why use it?
It puts these publishing actions into repeatable commands and defaults to a dry run so the planned request can be checked before sending.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Publish articles or videos with titles, descriptions, covers, and tags, or save an article as a draft through Baijiahao’s official API.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/morningstar202604/awesome-skillkit/wechat-mp-publisher
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Morningstar202604/awesome-skillkit --skill wechat-mp-publisher
Clone the repo
git clone --depth 1 https://github.com/Morningstar202604/awesome-skillkit

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wechat-mp-publisher

README.md
[![agentmods](https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/wechat-mp-publisher/github.svg)](https://agentmods.dev/skills/morningstar202604/awesome-skillkit/wechat-mp-publisher)
Your own site
<a href="https://agentmods.dev/skills/morningstar202604/awesome-skillkit/wechat-mp-publisher"><img src="https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/wechat-mp-publisher/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for wechat-mp-publisher

Your own site · 80×15
<a href="https://agentmods.dev/skills/morningstar202604/awesome-skillkit/wechat-mp-publisher"><img src="https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/wechat-mp-publisher.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 888 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00084 $0.00888
Opus 5 $0.00042 $0.00444
Sonnet 5 $0.00017 $0.00178
Haiku 4.5 $0.00008 $0.00089

Measured 11d ago against content hash 85efa0bbf8e2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

wechat-mp-publisher scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/wechat_mp_publish.py, tests/test_wechat_mp_publish.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/writing/wechat/wechat-mp-publisher/SKILL.md · 94 lines

What it actually says

微信公众号发布 Skill

compatibility

  • Python 3.8+(仅标准库,无第三方依赖)
  • 已认证的公众号(服务号/订阅号均可),在后台「设置与开发 → 基本配置」拿到 AppID/AppSecret
  • 草稿箱与 freepublish 接口要求公众号已获得发布接口权限(大部分认证号默认有)

凭据管理

凭据不随技能分发,两种方式提供:

export WECHAT_MP_APPID=wx你的appid
export WECHAT_MP_SECRET=你的secret

或命令行 --appid / --secretsecret 等同密码,禁止写入任何文件进仓库。 IP 白名单:需把执行机器的出口 IP 加入公众号后台的 IP 白名单,否则 token 返回 errcode 40164。

安全规则(必须遵守)

  1. 默认 dry-run:所有写操作不加 --execute 只打印请求计划,绝不联网发送
  2. AI 在 dry-run 输出展示给用户确认后,才能追加 --execute 执行
  3. 发布前先跑内容检查(markdown→HTML 转义、图片 URL 可访问)

工作流

1. 获取 access_token

python3 scripts/wechat_mp_publish.py --execute token

token 有效期 7200 秒,脚本每次操作自动获取,无需缓存。

2. 上传封面图(永久素材,返回 media_id)

封面必须是永久素材 media_id(uploadimg 的临时 url 不能当封面):

python3 scripts/wechat_mp_publish.py --execute add-thumb cover.jpg

3. 创建草稿

先把 Markdown 转 HTML(标题 h2 起、代码块转义),然后:

python3 scripts/wechat_mp_publish.py --execute add-draft \
  --title "文章标题" \
  --content-html article.html \
  --thumb-media-id <第2步返回的media_id> \
  --author "作者" \
  --digest "摘要"

返回 media_id 即草稿 ID。

4. 提交发布

python3 scripts/wechat_mp_publish.py --execute publish <草稿media_id>

发布是异步的:返回 ok 后用 freepublish/get 查询发布状态;发布后文章在公众号后台「发表记录」可见。

常见错误码

errcode 含义 处理
40001 appid/secret 错误 核对凭据
40164 IP 不在白名单 公众号后台加白
45009 频率限制 等待后重试
53401 封面 media_id 无效 用 add-thumb 重新上传
53404 文章被判定违规 人工修改内容

官方文档

接口字段以官方文档为准;若微信调整 API,以 DevTools/官方文档实测结果更新 scripts/wechat_mp_publish.py 顶部的端点常量。

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 94 lines · 84 tokens per session scan A 85efa0bbf8e2

Subscribe to this mod's changes

wechat-mp-publisher is a skill published in the GitHub repository Morningstar202604/awesome-skillkit (1 stars, last pushed 2d ago), licensed Apache-2.0. It adds 84 tokens to every session and 888 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

dingtalk_channel_connect

Use a headed browser to automatically complete DingTalk channel integration for QwenPaw. Applicable when the user mentions DingTalk, developer console, Client ID, Client Secret, bot, Stream mode, binding or configuring a channel. Supports pausing when a login page is detected and resuming after the user logs in.

agentscope-ai/QwenPaw · 69 tokens

browser_cdp

Use this skill when the user explicitly wants to connect to a running Chrome browser, scan local CDP ports, specify a cdpport, or share a single browser across multiple agents/tools. By default browser opens no debugging port; pass an explicit cdpport only when the user wants another local tool to attach.

agentscope-ai/QwenPaw · 70 tokens

browser_cdp

Browser connection controls for finding local debugging ports, attaching to an already running Chrome browser, or sharing one browser between tools.

agentscope-ai/QwenPaw · 85 tokens

browser_visible

Browser launch controls for choosing whether a Chromium-based browser window is visible, which browser program to run, and which startup options to pass.

agentscope-ai/QwenPaw · 108 tokens

browser_visible

Use this skill when the user needs to control the browser launch mode for browser. By default browser is managed by Playwright and opens no debugging port (pass an explicit cdpport to let another local tool attach); headed controls whether the window is visible, and privatemode is kept for backward compatibility and…

agentscope-ai/QwenPaw · 75 tokens

ego-browser

When you need a browser, read this Skill by default. Use it to open and operate websites, fill forms, click buttons, take screenshots, extract page data, sign in, and perform other browser automation tasks, as well as web app testing, dogfooding, QA, bug investigation, and app-quality review. ego-browser (ego-lite) is…

citrolabs/ego-lite · 125 tokens