Agent skill

Wechat Publisher

by YiShu5 in YiShu5/claude-skills

微信公众号文章的发布管道——封面生成、本地图片上传素材库、创建草稿、发布草稿、以及从 mp.weixin URL 提取原文。触发场景:用户说 "发到公众号草稿箱" / "推送到公众号" / "做张公众号封面" / "上传图片到微信" / "把这篇文章提取成 markdown" / "改写这篇 mp.weixin 链接(的提取部分)" / 任何提到「发布 / 草稿 / 封面 / 推送 /…

MITAuto-check: notesProductivity & Automation

Install Wechat Publisher

skills CLI
$ npx skills add YiShu5/claude-skills --skill wechat-publisher -a claude-code

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

GitHub CLI
$ gh skill install YiShu5/claude-skills wechat-publisher --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/YiShu5/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/wechat-publisher .claude/skills/wechat-publisher && 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-publisher
GitHub stars
132
Token cost
~951 tokens
SKILL.md length
223 words
Files
14 (incl. scripts, references)
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

微信公众号文章的发布管道——封面生成、本地图片上传素材库、创建草稿、发布草稿、以及从 mp.weixin URL 提取原文。触发场景:用户说 "发到公众号草稿箱" / "推送到公众号" / "做张公众号封面" / "上传图片到微信" / "把这篇文章提取成 markdown" / "改写这篇 mp.weixin 链接(的提取部分)" / 任何提到「发布 / 草稿 / 封面 / 推送 /…

  • Works in 5 steps: 核心意象:文章前 200 字提取 2-4… → 情绪基调:从 7 选 1——温暖治愈 / 专业冷静 / 紧张焦虑 / 轻松愉悦… → 画面风格:按文章主题查 references/image-prompts.md… → …
  • Tasks that involve Messaging and chat bots
  • SKILL.md covers 常用工作流, 封面图 prompt 必须用五要素结构, 文中配图(发布模式才出,预览模式跳过) and 凭证管理, plus 3 more sections
  • Runs Python and JavaScript scripts from its folder; calls python3; reaches mp.weixin.qq.com; needs WECHAT_APP_SECRET and DASHSCOPE_API_KEY

What it does

Wechat Publisher is an agent skill from YiShu5/claude-skills. 微信公众号文章的发布管道——封面生成、本地图片上传素材库、创建草稿、发布草稿、以及从 mp.weixin URL 提取原文。触发场景:用户说 "发到公众号草稿箱" / "推送到公众号" / "做张公众号封面" / "上传图片到微信" / "把这篇文章提取成 markdown" / "改写这篇 mp.weixin 链接(的提取部分)" / 任何提到「发布 / 草稿 / 封面 / 推送 / 提取微信文章」的请求。本 skill 不写文章(交给 wechat-writer),不做 markdown → html 排版(交给 wechat-formatter)——它只处理图片生成、文件上传、微信 API 调用。

Its SKILL.md is about 950 tokens, which your agent loads only when the skill is triggered. The skill folder holds 16 other files, including scripts and reference files (for example `reader/extract_and_convert.js`, `reader/package-lock.json` and `reader/package.json`).

It sits in Productivity & Automation, covering Messaging and chat bots and Linting and formatting. It works with WeChat. The repository describes itself as: Battle-tested coding-agent skills for product, content, writing, presentations, and workflow automation. The licence is MIT.

When your agent uses it

  • Tasks that involve Messaging and chat bots
  • Tasks that involve Linting and formatting

Example prompts

  • “发到公众号草稿箱”
  • “推送到公众号”
  • “做张公众号封面”
  • “/wechat-publisher”

Requirements

  • Python 3
  • Node.js
  • A credential in WECHAT_APP_SECRET
  • A credential in DASHSCOPE_API_KEY

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. 核心意象:文章前 200 字提取 2-4 个具象名词(不要"效率""创新"这种抽象概念)
  2. 情绪基调:从 7 选 1——温暖治愈 / 专业冷静 / 紧张焦虑 / 轻松愉悦 / 怀旧沉思 / 励志昂扬 / 神秘高级
  3. 画面风格:按文章主题查 references/image-prompts.md 的 9 种风格映射表
  4. 构图与镜头(固定文本):2.35:1 横向构图,主体居中偏左,右上角嵌入小字「意疏的AI口袋」,中部区域小字「<标题关键词 3-5 字>」(避开底部 15% 遮挡区)
  5. 负面提示(固定文本):画面主体不要出现任何文字、字母、汉字,水印、logo、签名

What it can do on your machine

Read from SKILL.md and the folder at commit 38bd735. 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

    Ships 7 files in scripts/ (Python and JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • mp.weixin.qq.com

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

  • Credentials

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

    • WECHAT_APP_SECRET
    • DASHSCOPE_API_KEY
    • DOUBAO_API_KEY

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

Context cost

Wechat Publisher loads about 951 tokens when it runs, and up to ~5.2k if it reads all its reference files. Until then it costs about 84 tokens; SKILL.md has 223 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~84
When it runs · the whole SKILL.md, loaded when a task matches
~951
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.2k

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:18
    source <(grep -E '^WECHAT_' .env | sed 's/^/export /')
  • NoteMentions a .env fileSKILL.md:95
    凭证只写进 `.env`(已 gitignore)。
  • NoteMentions a .env fileSKILL.md:105
    ### 脚本对 `.env` 的支持
  • NoteMentions a .env fileSKILL.md:107
    | 脚本 | 支持 `.env` | 不支持 → CLI 必传 |
  • NoteMentions a .env fileSKILL.md:116
    t.py` 前,**先 `source <(grep -E '^WECHAT_' .env | sed 's/^/export /')`** 把凭证拼成环境变量,不要让用户重复输。

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); the scripts in this folder are not scanned.

SKILL.md

The full file from YiShu5/claude-skills at commit 38bd735, republished under its MIT licence (© YiShu5). 223 words, ~951 tokens.

Download SKILL.mdSave it as .claude/skills/wechat-publisher/SKILL.md (or your agent's skills folder). This skill also uses 13 other files; get the full folder from GitHub.
name
wechat-publisher
description
微信公众号文章的发布管道——封面生成、本地图片上传素材库、创建草稿、发布草稿、以及从 mp.weixin URL 提取原文。**触发场景**:用户说 "发到公众号草稿箱" / "推送到公众号" / "做张公众号封面" / "上传图片到微信" / "把这篇文章提取成 markdown" / "改写这篇 mp.weixin 链接(的提取部分)" / 任何提到「发布 / 草稿 / 封面 / 推送 / 提取微信文章」的请求。本 skill **不写文章**(交给 wechat-writer),**不做 markdown → html 排版**(交给 wechat-formatter)——它只处理图片生成、文件上传、微信 API 调用。

wechat-publisher · 微信公众号发布管道

只负责跟微信 API 打交道的部分:封面生成 / 图片上传 / 草稿创建 / 草稿发布 / 文章提取。

常用工作流

工作流 1:发已写好排版好的稿子(最常见)

前提:你已经用 wechat-writer 写好 markdown,用 wechat-formatter 转成了 html。

bash
# 0. 加载凭证
source <(grep -E '^WECHAT_' .env | sed 's/^/export /')

# 1. 生成封面图(五要素 prompt 见 references/image-prompts.md)
python3 scripts/generate_cover.py \
  --prompt "<五要素 prompt>" \
  --output cover.jpg

# 2. 上传封面到微信永久素材
python3 scripts/upload_material.py \
  --app_id "$WECHAT_APP_ID" --app_secret "$WECHAT_APP_SECRET" \
  --image_path cover.jpg
# 输出: thumb_media_id=THUMB_XXX

# 3. 创建草稿
python3 scripts/create_draft.py \
  --title "文章标题" \
  --content "$(cat drafts/article.html)" \
  --thumb_media_id "THUMB_XXX" \
  --author "意疏"

# 4. (可选)直接发布
python3 scripts/publish_draft.py \
  --app_id "$WECHAT_APP_ID" --app_secret "$WECHAT_APP_SECRET" \
  --media_id "MEDIA_XXX"

**默认到 step 3 就停——保留为草稿,让用户登录公众号后台预览再决定是否发布。**只有用户明确说"直接发"才执行 step 4。

工作流 2:从 mp.weixin URL 提取原文
bash
python3 scripts/extract_to_markdown.py \
  "https://mp.weixin.qq.com/s/xxx" \
  -o drafts/extracted.md

输出为 Markdown,交给 wechat-writer 改写——本 skill 不负责改写,只负责提取。

工作流 3:一键 orchestrator(已有 markdown,跑完整管道)
bash
python3 scripts/publish_article.py \
  --input article.md \
  --title "文章标题" \
  --author "意疏"

这个脚本会内部调用排版 + 封面 + 上传 + 草稿。适合用户明确说"一条命令直接给我发草稿箱"时用。

如果用户对中间产物(封面 / 配图 / 排版)有要求,不要走 orchestrator,改用工作流 1 分步执行。

封面图 prompt 必须用五要素结构

禁止写「科技风格插画」「为文章 XX 生成封面」这种空泛 prompt。详见 references/image-prompts.md。

五要素(中文逗号分隔,顺序固定):

  1. 核心意象:文章前 200 字提取 2-4 个具象名词(不要"效率""创新"这种抽象概念)
  2. 情绪基调:从 7 选 1——温暖治愈 / 专业冷静 / 紧张焦虑 / 轻松愉悦 / 怀旧沉思 / 励志昂扬 / 神秘高级
  3. 画面风格:按文章主题查 references/image-prompts.md 的 9 种风格映射表
  4. 构图与镜头(固定文本):2.35:1 横向构图,主体居中偏左,右上角嵌入小字「意疏的AI口袋」,中部区域小字「<标题关键词 3-5 字>」(避开底部 15% 遮挡区)
  5. 负面提示(固定文本):画面主体不要出现任何文字、字母、汉字,水印、logo、签名

文中配图(发布模式才出,预览模式跳过)

如果用户明确要"发布模式 + 配图",生成 3 张配图,按故事弧线:

序号定位元素
1痛点文章开头的困境/焦虑具象化
2转折解决方案出现的关键时刻/工具
3升华文章结尾的理想状态/成果

3 张 prompt 必须互不相同,禁止复用模板。

凭证管理

凭证只写进 .env(已 gitignore)。

变量必填来源
WECHAT_APP_ID✅mp.weixin.qq.com → 开发 → 基本配置
WECHAT_APP_SECRET✅同上
DASHSCOPE_API_KEY二选一千问(推荐),dashscope.console.aliyun.com
DOUBAO_API_KEY二选一豆包,console.volc.com/iam/keylist
IMAGE_PROVIDER可选qwen(默认) / doubao
脚本对 .env 的支持
脚本支持 .env不支持 → CLI 必传
generate_cover.py✅ 完全免参—
create_draft.py✅ 回退—
publish_article.py✅ 全部—
extract_to_markdown.py✅ 不需要凭证—
upload_material.py❌--app_id --app_secret
publish_draft.py❌--app_id --app_secret

Agent 实践:调 upload_material.py / publish_draft.py 前,先 source <(grep -E '^WECHAT_' .env | sed 's/^/export /') 把凭证拼成环境变量,不要让用户重复输。

配图本地路径处理(常见坑)

如果 Markdown 里有 ![](./images/foo.png) 这种本地图片路径:

  1. 微信 HTML 不能直接引用本地路径——需要先 upload_material.py 把图片上传到微信永久素材
  2. 拿到返回的 url,替换 Markdown 里的本地路径
  3. 再送给 wechat-formatter 转 HTML

否则 HTML 粘到微信编辑器图片会裂。

不做的事

  • 不写文章 → wechat-writer
  • 不做 Markdown → HTML 排版 → wechat-formatter
  • 不改稿 / 不审校 → wechat-writer

子文档导航

文档何时读
references/image-prompts.md写封面 / 配图 prompt 时
references/wechat-api.md微信 API 返回错误码,看不懂时
references/examples.md想看完整 bash 例子时

© YiShu5, 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 13 other files (scripts, references) in skills/wechat-publisher of YiShu5/claude-skills.

  • SKILL.md
  • reader/extract_and_convert.js
  • reader/package-lock.json
  • reader/package.json
  • references/examples.md
  • references/image-prompts.md
  • references/wechat-api.md
  • scripts/config.py
  • scripts/create_draft.py
  • scripts/extract_to_markdown.py
  • scripts/generate_cover.py
  • scripts/publish_article.py
  • scripts/publish_draft.py
  • scripts/upload_material.py

Open the folder on GitHubat commit 38bd735

Compare with similar skills

Wechat Publisher 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 Publisher compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Wechat Publisher this skillYiShu5/claude-skills132—~951Automated safety check: NotesMIT
Wechat Article FormatterBND-1/wechat_article_skills318—~1.5kAutomated safety check: NotesNone
Wechat FormatterJianing1117/jianing-skills329—~4.5kAutomated safety check: PassNone
Wechat Article Formatterhuangserva/servasyy_skills168—~688Automated safety check: NotesNone
She Love Me863401402/she-love-me9311 repos~1.3kAutomated safety check: PassMIT
Wechat Article Extractorfreestylefly/wechat-article-extractor-skill1361 repos~1kAutomated safety check: PassNone

Similar skills

  • Wechat Article Formatter

    BND-1/wechat_article_skills

    将Markdown文章转换为美化的HTML格式,适配微信公众号发布。应用专业CSS样式、代码高亮、优化排版。当用户说"美化这篇文章"、"转换为HTML"、"优化公众号格式"、"生成公众号HTML"时使用。

    318 GitHub stars~1.5k tokensUpdated 8 mo ago
    Productivity & AutomationAuto-check: notes
  • Wechat Formatter

    Jianing1117/jianing-skills

    把一篇 Markdown 格式的文章转成可直接粘贴到微信公众号编辑器的 HTML 推文 + 900x383px 封面图片,严格遵循「加宁慢慢来」品牌视觉规范 v7.0。当用户说"排版公众号""帮我生成推文""把这篇文章转成公众号格式""做微信封面""WeChat Article Formatter""WeChat…

    329 GitHub stars~4.5k tokensUpdated 3 days ago
    Productivity & AutomationAuto-check passed
  • Wechat Article Formatter

    huangserva/servasyy_skills

    将 Markdown 文章转换为微信公众号 HTML 格式,支持自动插入配图、微信样式优化. An agent skill from huangserva/servasyy_skills.

    168 GitHub stars~688 tokensUpdated 9 days ago
    Productivity & AutomationAuto-check: notes
  • 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…

    931 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…

    356 GitHub stars~634 tokensUpdated 2 mo ago
    Productivity & AutomationAuto-check passed

More from YiShu5/claude-skills

All 8 skills in this repo
  • Self Improving Agent

    YiShu5/claude-skills

    Low-noise self-improvement skill. An agent skill from YiShu5/claude-skills.

    132 GitHub stars~1.2k tokensUpdated 21 days ago
    Auto-check passed
  • Wechat Formatter

    YiShu5/claude-skills

    把 Markdown 文稿转换成微信公众号可用的内联样式 HTML。触发场景:用户说 "把 markdown 转成公众号能用的 HTML" / "排版一下这篇文章" / "套个主题" / "微信编辑器不识别我的样式" / 任何提到「公众号排版 / 微信 HTML / md 转 html / doocs 主题」的请求。微信编辑器不识别 <style 标签,必须把所有 CSS 内联到每个 HTML…

    132 GitHub stars~492 tokensUpdated 21 days ago
    Auto-check: notes
  • Clawd Animation

    YiShu5/claude-skills

    Clawd 像素风动画生成器。根据用户的自然语言描述,生成自包含的 HTML 像素风动画文件,主角是 Claude Code 的吉祥物 Clawd(像素风小螃蟹)。当用户提到 clawd、clawd 动画、像素动画、pixel animation、给 clawd 做一个小动画、让小螃蟹做某事、或任何涉及为 Clawd 角色创建动画场景的需求时,务必使用此…

    132 GitHub stars~889 tokensUpdated 21 days ago
    Auto-check passed
  • Vibe Writing

    YiShu5/claude-skills

    A skill your agent uses when drafting, rewriting, reviewing, or planning Chinese long-form content for public accounts, blogs, newsletters, professional analysis, product or technical writing…

    132 GitHub stars~985 tokensUpdated 21 days ago
    Auto-check passed
  • Wechat Coauthor

    YiShu5/claude-skills

    协助意疏写「意疏的AI口袋」公众号文章。Claude 是协作者不是写手——voice 必须从意疏嘴里出来,AI 负责结构化、扩写、降 AI 味。触发:写公众号文章 / 帮我整理口述 / 有素材但想不清 / 这段 AI 味太重 / 看看有没有意疏味道 / 帮我把骨架写成文章。输出 Markdown,排版找 wechat-formatter,发布找 wechat-publisher。

    132 GitHub stars~2.4k tokensUpdated 21 days ago
    Auto-check passed
  • Clawd Animation Lite

    YiShu5/claude-skills

    Clawd 像素风动画生成器(轻量版)。根据用户的自然语言描述,生成1-3秒的简短clawd动画,当用户的需求的互动场景较为具体和单一,请采用轻量版本生成token消耗少、生成速度快的HTML像素风动画文件。主角是 Claude Code 的吉祥物 Clawd(像素风小螃蟹)。当用户提到 clawd、clawd 动画、像素动画、pixel animation、给 clawd…

    132 GitHub stars~2.4k tokensUpdated 21 days ago
    Auto-check passed

Works with

Questions about Wechat Publisher

What does Wechat Publisher do?

微信公众号文章的发布管道——封面生成、本地图片上传素材库、创建草稿、发布草稿、以及从 mp.weixin URL 提取原文。触发场景:用户说 "发到公众号草稿箱" / "推送到公众号" / "做张公众号封面" / "上传图片到微信" / "把这篇文章提取成 markdown" / "改写这篇 mp.weixin 链接(的提取部分)" / 任何提到「发布 / 草稿 / 封面 / 推送 /…. Wechat Publisher is an agent skill from YiShu5/claude-skills.

When should I use Wechat Publisher?

Wechat Publisher fits situations like: tasks that involve Messaging and chat bots; tasks that involve Linting and formatting.

How do I install Wechat Publisher in Claude Code?

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

How do I install Wechat Publisher in Codex?

Run `npx skills add YiShu5/claude-skills --skill wechat-publisher -a codex`. Or copy the skill folder (skills/wechat-publisher in YiShu5/claude-skills) into .agents/skills/wechat-publisher in your project. Codex loads it when a task matches its description.

Can I use Wechat Publisher 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 YiShu5/claude-skills --skill wechat-publisher -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-publisher, .gemini/skills/wechat-publisher, .github/skills/wechat-publisher and .opencode/skills/wechat-publisher in your project.

What does Wechat Publisher need to run?

Going by SKILL.md and its folder, Wechat Publisher needs Python and JavaScript for the scripts in its folder, the command-line tools its instructions call (python3) and credentials named WECHAT_APP_SECRET, DASHSCOPE_API_KEY and DOUBAO_API_KEY. Our summary lists: Python 3; Node.js; A credential in WECHAT_APP_SECRET; A credential in DASHSCOPE_API_KEY.

Does Wechat Publisher access the network?

SKILL.md names 1 domain. In commands or code: mp.weixin.qq.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Wechat Publisher safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Wechat Publisher use?

Wechat Publisher 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 Publisher use?

About 951 tokens (SKILL.md is roughly 3.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.3k tokens, read only when the agent opens those files.

What are the alternatives to Wechat Publisher?

Skills that share tags, products or a category with Wechat Publisher: Wechat Article Formatter (BND-1/wechat_article_skills, 318 stars), Wechat Formatter (Jianing1117/jianing-skills, 329 stars), Wechat Article Formatter (huangserva/servasyy_skills, 168 stars) and She Love Me (863401402/she-love-me, 931 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Wechat Publisher?

YiShu5 (a GitHub user) maintains it in YiShu5/claude-skills, which has 132 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on September 20, 2026.

Source: YiShu5/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.