Media Writer
shareAI-lab/lab-skills
Create platform-native content that resonates with each community's culture.
把文章排版成微信公众号合规 HTML、自动上传图片、可选自动生成封面图,并通过官方 API 一键写入公众号草稿箱,用户只需在后台预览后发布。优先用组件化手写 HTML 做精排版,也支持 Markdown 快速排版。当用户提到「发布公众号」「推送到草稿箱」「公众号排版」「post to wechat」「微信公众号文章」时使用。
$ npx skills add sakuraoxo-clio/wechat-publisher --skill wechat-publisher -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install sakuraoxo-clio/wechat-publisher wechat-publisher --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
Claude Code skills documentation · loads skills from .claude/skills/
Install the "wechat-publisher" agent skill from https://github.com/sakuraoxo-clio/wechat-publisher/tree/main into .claude/skills/wechat-publisher/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "wechat-publisher", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add sakuraoxo-clio/wechat-publisher --skill wechat-publisher -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install sakuraoxo-clio/wechat-publisher wechat-publisher --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "wechat-publisher" agent skill from https://github.com/sakuraoxo-clio/wechat-publisher/tree/main into .agents/skills/wechat-publisher/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "wechat-publisher", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add sakuraoxo-clio/wechat-publisher --skill wechat-publisher -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install sakuraoxo-clio/wechat-publisher wechat-publisher --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "wechat-publisher" agent skill from https://github.com/sakuraoxo-clio/wechat-publisher/tree/main into .cursor/skills/wechat-publisher/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "wechat-publisher", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add sakuraoxo-clio/wechat-publisher --skill wechat-publisher -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install sakuraoxo-clio/wechat-publisher wechat-publisher --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "wechat-publisher" agent skill from https://github.com/sakuraoxo-clio/wechat-publisher/tree/main into .gemini/skills/wechat-publisher/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "wechat-publisher", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install sakuraoxo-clio/wechat-publisher wechat-publisherInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add sakuraoxo-clio/wechat-publisher --skill wechat-publisher -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "wechat-publisher" agent skill from https://github.com/sakuraoxo-clio/wechat-publisher/tree/main into .github/skills/wechat-publisher/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "wechat-publisher", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add sakuraoxo-clio/wechat-publisher --skill wechat-publisher -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install sakuraoxo-clio/wechat-publisher wechat-publisher --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "wechat-publisher" agent skill from https://github.com/sakuraoxo-clio/wechat-publisher/tree/main into .opencode/skills/wechat-publisher/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "wechat-publisher", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
wechat-publisher把文章排版成微信公众号合规 HTML、自动上传图片、可选自动生成封面图,并通过官方 API 一键写入公众号草稿箱,用户只需在后台预览后发布。优先用组件化手写 HTML 做精排版,也支持 Markdown 快速排版。当用户提到「发布公众号」「推送到草稿箱」「公众号排版」「post to wechat」「微信公众号文章」时使用。
Wechat Publisher is an agent skill from sakuraoxo-clio/wechat-publisher. 把文章排版成微信公众号合规 HTML、自动上传图片、可选自动生成封面图,并通过官方 API 一键写入公众号草稿箱,用户只需在后台预览后发布。优先用组件化手写 HTML 做精排版,也支持 Markdown 快速排版。当用户提到「发布公众号」「推送到草稿箱」「公众号排版」「post to wechat」「微信公众号文章」时使用。
Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 21 other files, including scripts and reference files (for example `README.md`, `prompts/wechat-format-prompt.md` and `references/components.md`).
It sits in Productivity & Automation, covering Messaging and chat bots and Social publishing and cross-posting. It works with WeChat. The repository describes itself as: 微信公众号一键排版+发布到草稿箱的 Claude+Coex skill. The licence is MIT.
3 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 87d907a. It shows what the files ask for, not the result of running them.
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.
Ships 6 files in scripts/ (TypeScript, from the files we listed), which the agent can run.
Shell commands in SKILL.md call:
npxcurlnpmFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
api.ipify.orgmp.weixin.qq.comAlso links to:
sakuraoxo.feishu.cnFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
OPENAI_API_KEYWECHAT_APP_SECRETFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Wechat Publisher loads about 1.4k tokens when it runs, and up to ~9k if it reads all its reference files. Until then it costs about 45 tokens; SKILL.md has 377 words of instructions outside code blocks.
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.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
白最快):用户把 AppID / AppSecret 发来,你写进项目根目录的 `.env`(`WECHAT_APP_ID` / `WECHAT_APP_SECRET`)。**写完不要在对话里把 AppSecret 明文复述出来**;`.e- DIY:用户也可自己把 `.env.example` 复制成 `.env` 填好,脚本会自动读取。`.env` 缺失或报 `40164`/`48001` 时,按上面引导用户,**不要编造或猜测凭证**。| `Missing WECHAT_APP_ID` | 配置 `.env` |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.
The full file from sakuraoxo-clio/wechat-publisher at commit 87d907a, republished under its MIT licence (© sakuraoxo-clio). 377 words, ~1,442 tokens.
.claude/skills/wechat-publisher/SKILL.md (or your agent's skills folder). This skill also uses 17 other files; get the full folder from GitHub.把文章变成公众号草稿:排版 → 上传图片 →(可选)生成封面 → 写入草稿箱。用户在 mp.weixin.qq.com 后台预览满意后发布。
排版分两种模式,默认用模式 A:
| 模式 | 用法 | 适用 |
|---|---|---|
| A 组件化手写 HTML(默认) | Claude 照组件库手写带卡片/SVG 信息图的 HTML | 正式文章、要质感的内容 |
| B Markdown 快速排版(兜底) | 喂 .md,脚本套固定主题渲染 | 草稿、临时、对排版无要求 |
固定主题(render.ts)天花板有限——千篇一律、像文档。正式文章一律走模式 A。
排好版后,有两条路把文章送进公众号。默认先给「复制预览」,再主动问要不要一键入库:
draft/add 接口直接写入,省掉复制粘贴和重新传图。需要凭证 + IP 白名单(见下)。排版完成后,先交付预览,再问用户:「要不要我直接一键发到你的草稿箱?需要的话我带你配一次凭证(一次性,3 步)。」用户不需要就到此为止。
前提:公众号为已认证服务号 / 订阅号(有 draft/add 权限)。带用户走三步:
.env(WECHAT_APP_ID / WECHAT_APP_SECRET)。写完不要在对话里把 AppSecret 明文复述出来;.env 已被 .gitignore 忽略,只留在本机。.env.example 复制成 .env 填好,脚本会自动读取。curl -s https://api.ipify.org 取本机公网 IP,直接把这串 IP 告诉用户,让他加进后台「IP 白名单」。(家庭宽带 IP 是动态的,变了要回去重填。)cd scripts && npm install;用自动生成封面再填 OPENAI_API_KEY。不会操作的用户,指给详细图文教程 👉 https://sakuraoxo.feishu.cn/wiki/TuA7wvDjiiQZQVkGNp1cK6uynae
.env 缺失或报 40164/48001 时,按上面引导用户,不要编造或猜测凭证。
- [ ] Step 1: 读 references/components.md(组件库)和 references/article-template.html(骨架)
- [ ] Step 2: 复制 article-template.html 到文章目录,按内容设计、填充组件
- [ ] Step 3: 配图 —— 内联 SVG 信息图 / HTML 截图 / 网图抓取转 base64 / gpt-image-2 生图
- [ ] Step 4: 本地预览(在浏览器打开 HTML,看手机框内效果)
- [ ] Step 5: 交付预览给用户复制;再主动问要不要一键进草稿箱
- [ ] Step 6: 用户要 → 确认/配好凭证后运行 publish.ts;不要 → 到此为止
- [ ] Step 7: 报告结果references/components.md,用里面的组件:封面卡、编号小标题、callout 框、金句框、步骤卡、文末总结块、标签 chips。references/styles/ 下对应文件作为视觉覆盖层;例如技术教程、AI 工具、SaaS 文档、产品更新、安装指南优先读 references/styles/tech-card-green.md;AI 新闻、模型发布、真假信号拆解、行业快讯解读优先读 references/styles/ai-news-signal-green.md。article-template.html 的 <!-- ARTICLE HTML START --> / <!-- ARTICLE HTML END --> 之间。每个核心论点尽量配一张图,四种来源按优先级:
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --headless --disable-gpu \
--hide-scrollbars --force-device-scale-factor=2 --default-background-color=ffffffff \
--screenshot="out.png" --window-size=<宽>,<高> "file://<绝对路径>"evaluate 取元素 offsetHeight),多余留白用 sips 裁掉。cd scripts && npx tsx img2base64.ts "<图片直链>" --max-kb 980data:image/...;base64,...。把这串直接填进 <img src="...">。复制预览交付时,base64 图会随「复制渲染内容」自动进公众号。imagegen.ts 已封装,默认模型 gpt-image-2。正文图单张 ≤1MB(微信 media/uploadimg 限制),超了用 sips 压缩转 jpg;img2base64.ts 已内置这步。
npx tsx publish.ts <文章.html> --title "标题" --author "作者" \
[--digest "摘要"] [--cover <封面图> | --gen-cover].html 输入:脚本提取 ARTICLE HTML 标记之间的内容,不做 markdown 渲染,原样作为正文。--title 时取文章里第一个 <h1>。news 文章必需:--cover <路径> 或 --gen-cover(需 OPENAI_API_KEY)。<img>(本地路径 / 远程 URL / base64)会自动上传微信并替换 src;内联 <svg> 原样保留。npx tsx publish.ts <文章.md> [--title ..] [--author ..] [--cover <路径> | --gen-cover].md 走 render.ts 固定主题(正文 15px / 行高 1.8 / 微信绿)。支持 frontmatter:title / author / description / cover。仅用于不在意排版质感的场景。
输出草稿 media_id,提示用户:登录 https://mp.weixin.qq.com → 内容管理 → 草稿箱 → 预览 → 发布。
| 路径 | 作用 |
|---|---|
references/components.md | 组件库 + 设计 token + SVG 信息图模板(写 HTML 前必读) |
references/styles/tech-card-green.md | 绿色技术卡片风预设,适合技术教程、AI 工具、SaaS 文档、产品更新 |
references/styles/ai-news-signal-green.md | AI 新闻信号卡风预设,适合模型发布、真假消息拆解、行业快讯解读 |
references/article-template.html | 带手机预览框的文章骨架,复制它开工 |
references/wechat-html-spec.md | 微信 HTML/CSS 支持与过滤规范 |
scripts/publish.ts | 发布入口,支持 .html 和 .md |
scripts/render.ts | Markdown 固定主题渲染(仅模式 B) |
scripts/imagegen.ts | gpt-image-2 生图 |
draft/add 会被过滤,见 references/wechat-html-spec.md。| 报错 | 处理 |
|---|---|
Missing WECHAT_APP_ID | 配置 .env |
errcode=40164 / IP 限制 | 把运行机器公网 IP 加入公众号后台 IP 白名单 |
errcode=48001 接口未授权 | 公众号未认证或无 draft/add 权限 |
HTML file looks like a full document | 给文章内容加上 ARTICLE HTML START/END 标记 |
Body image too large | 正文图超 1MB,sips 压缩后重试 |
No title found | 传 --title 或在 HTML 里放一个 <h1> |
作者 / Author:sakuraoxo(喂鱼) · 公众号:喂鱼 · MIT License 原始仓库 / Original repo:https://github.com/sakuraoxo-clio/wechat-publisher 二创/再分发须保留本署名与原始仓库链接,不得暗示修改版为原作者官方发布。 Derivatives must retain this attribution and the original repo link, and must not imply they are official releases by the original author.
© sakuraoxo-clio, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 17 other files (scripts, references) in the repository root of sakuraoxo-clio/wechat-publisher.
Open the folder on GitHubat commit 87d907a
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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Wechat Publisher this skillsakuraoxo-clio/wechat-publisher | 115 | — | ~1.4k | Automated safety check: Notes | MIT | |
| Media WritershareAI-lab/lab-skills | 315 | — | ~870 | Automated safety check: Pass | Apache-2.0 | |
| WeChat Article Publisheriamzifei/wechat-article-publisher-skill | 157 | — | ~2.6k | Automated safety check: Notes | MIT | |
| WeChat Official Account Publisheraiworkskills/wechat-article-skills | 672 | — | ~1.5k | Automated safety check: Pass | Apache-2.0 | |
| She Love Me863401402/she-love-me | 931 | 1 repos | ~1.3k | Automated safety check: Pass | MIT | |
| Wechat Article Extractorfreestylefly/wechat-article-extractor-skill | 136 | 1 repos | ~1k | Automated safety check: Pass | None |
shareAI-lab/lab-skills
Create platform-native content that resonates with each community's culture.
iamzifei/wechat-article-publisher-skill
Publishes Markdown or HTML articles as drafts to a WeChat Official Account through an API client, with a first-time user walkthrough.
aiworkskills/wechat-article-skills
Publishes a finished article and its images directly to a WeChat official account through its official API, as a draft or a live broadcast.
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…
freestylefly/wechat-article-extractor-skill
Extract metadata and content from WeChat Official Account articles.
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…
Works with
Categories
把文章排版成微信公众号合规 HTML、自动上传图片、可选自动生成封面图,并通过官方 API 一键写入公众号草稿箱,用户只需在后台预览后发布。优先用组件化手写 HTML 做精排版,也支持 Markdown 快速排版。当用户提到「发布公众号」「推送到草稿箱」「公众号排版」「post to wechat」「微信公众号文章」时使用。. Wechat Publisher is an agent skill from sakuraoxo-clio/wechat-publisher.
Wechat Publisher fits situations like: tasks that involve Messaging and chat bots; tasks that involve Social publishing and cross-posting.
Run `npx skills add sakuraoxo-clio/wechat-publisher --skill wechat-publisher -a claude-code`. Or copy the skill folder (the sakuraoxo-clio/wechat-publisher repository) into .claude/skills/wechat-publisher in your project. Claude Code loads it when a task matches its description.
Run `npx skills add sakuraoxo-clio/wechat-publisher --skill wechat-publisher -a codex`. Or copy the skill folder (the sakuraoxo-clio/wechat-publisher repository) into .agents/skills/wechat-publisher in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sakuraoxo-clio/wechat-publisher --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.
Going by SKILL.md and its folder, Wechat Publisher needs TypeScript for the scripts in its folder, the command-line tools its instructions call (npx, curl and npm) and credentials named OPENAI_API_KEY and WECHAT_APP_SECRET. Our summary lists: Node.js; A credential in WECHAT_APP_SECRET; A credential in OPENAI_API_KEY.
SKILL.md names 3 domains. In commands or code: api.ipify.org and mp.weixin.qq.com; the agent is likely to contact these when it follows the instructions. As links in the text: sakuraoxo.feishu.cn. This is read from the text; nothing was executed.
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.
Wechat Publisher is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.4k tokens (SKILL.md is roughly 5.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 7.6k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Wechat Publisher: Media Writer (shareAI-lab/lab-skills, 315 stars), WeChat Article Publisher (iamzifei/wechat-article-publisher-skill, 157 stars), WeChat Official Account Publisher (aiworkskills/wechat-article-skills, 672 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.
sakuraoxo-clio (a GitHub user) maintains it in sakuraoxo-clio/wechat-publisher, which has 115 GitHub stars. The repository was last updated on July 10, 2026.
Source: sakuraoxo-clio/wechat-publisher on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.