zhy-wechat-publish

zhy-wechat-publish is a skill for Claude Code from zhylq/yuan-skills. It costs 47 tokens per session (1,416 once invoked), scanned A, original, MIT.

A tool for sending HTML articles to the draft area of a WeChat Official Account, China's account-based publishing platform. It can prepare article images, cover images, styling, author details, and comment settings for the draft.

In plain words
What is it for?
Use it to upload an article and cover, generate a cover when configured, rewrite image links, and set author or comment options before publishing.
Why use it?
It handles WeChat-specific preparation that ordinary HTML does not provide, such as uploading body images and adapting CSS variables and lists.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions Claude Code; mentions OpenCode.

Good fit Use it to upload an article and cover, generate a cover when configured, rewrite image links, and set author or comment options before publishing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zhylq/yuan-skills/zhy-wechat-publish
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 zhylq/yuan-skills --skill zhy-wechat-publish
Clone the repo
git clone --depth 1 https://github.com/zhylq/yuan-skills

Made for: Claude Code.

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 zhy-wechat-publish

README.md
[![agentmods](https://agentmods.dev/badge/skills/zhylq/yuan-skills/zhy-wechat-publish/github.svg)](https://agentmods.dev/skills/zhylq/yuan-skills/zhy-wechat-publish)
Your own site
<a href="https://agentmods.dev/skills/zhylq/yuan-skills/zhy-wechat-publish"><img src="https://agentmods.dev/badge/skills/zhylq/yuan-skills/zhy-wechat-publish/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 zhy-wechat-publish

Your own site · 80×15
<a href="https://agentmods.dev/skills/zhylq/yuan-skills/zhy-wechat-publish"><img src="https://agentmods.dev/badge/skills/zhylq/yuan-skills/zhy-wechat-publish.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,416 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.00047 $0.01416
Opus 5 $0.00023 $0.00708
Sonnet 5 $0.00009 $0.00283
Haiku 4.5 $0.00005 $0.00142

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

Security

Grade A, and why

zhy-wechat-publish 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 12d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/publish_with_cover.js, scripts/upload_image.js, scripts/wechat_draft.js), 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/zhy-wechat-publish/SKILL.md · 135 lines

How it starts

The opening of the file, as written. The whole thing — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.

微信公众号草稿箱发布技能

本技能用于将文章发布到微信公众号草稿箱。脚本仅依赖 Node.js 内置模块;自动封面生成步骤会复用现有 bun 生图脚本。

前置条件

  1. Node.js >= 16
  2. 若要自动生成封面,还需本机可用 bun
  3. 技能目录下 .env 至少包含:
WECHAT_APP_ID=你的公众号AppID
WECHAT_APP_SECRET=你的公众号AppSecret
WECHAT_DEFAULT_THUMB_MEDIA_ID=默认封面图media_id(可选)
WECHAT_DEFAULT_AUTHOR=AI源来如此(可选)
  1. 运行机器公网 IP 已加入公众号后台 IP 白名单
  2. 自动生成封面时,需保证 zhy-article-illustrator 的生图环境可用

安装说明

本 skill 适合与 npx skills add ... --skill zhy-wechat-publish 一起安装到 OpenCode、Claude Code 等支持 SKILL.md 的 agent 工具中。

安装后请在本地 skill 目录手动创建 .env,不要将真实凭据提交回仓库。

脚本清单

脚本位于 scripts/

脚本 用途
wechat_draft.js 上传正文到公众号草稿箱
upload_image.js 上传本地封面图到永久素材库,获取 media_id
publish_with_cover.js 读取文章、生成封面、上传封面并推送草稿

核心能力

  • 自动处理正文 CSS 变量兼容
  • 自动将正文图片上传到微信正文图片接口并替换 URL
  • 自动将 ul/ol 降级为微信公众号编辑态更稳定的段落列表
  • 支持默认作者、评论开关、仅粉丝评论设置
  • 支持从文章内容生成单张公众号封面,并自动上传为 thumb_media_id

工作流

方式一:已准备好 HTML 与封面 media_id

node scripts/wechat_draft.js --title "文章标题" --file "post.html" --author "AI源来如此" --thumb "MEDIA_ID" --need-open-comment "1" --only-fans-can-comment "1"

参数说明:

参数 必填 说明
--title 文章标题
--file HTML 正文文件路径
--author 作者,不传时默认 WECHAT_DEFAULT_AUTHORAI源来如此
--digest 摘要
--thumb 封面 media_id,不传时读取 .env 默认值
--source-url 原文链接
--need-open-comment 是否开启评论,默认 1
--only-fans-can-comment 是否仅粉丝可评论,默认 1

方式二:自动生成封面并发布

当你已有文章源文件,以及最终用于上传的 HTML 文件时,可直接运行:

node scripts/publish_with_cover.js --article "article.md" --html "post.html" --author "AI源来如此" --source-url "https://example.com"

该脚本会自动完成:

  1. 读取文章内容并提取标题/摘要
  2. 调用 zhy-article-illustrator/scripts/image-gen.ts 生成单张 16:9 封面图
  3. 调用 upload_image.js --json 上传封面,获得 thumb_media_id
  4. 调用 wechat_draft.js 推送草稿,并自动带上:
    • author
    • thumb_media_id
    • need_open_comment=1
    • only_fans_can_comment=1

可选参数:

参数 说明
--article 原始文章文件,推荐 Markdown,也可 HTML
--html 最终上传到公众号的 HTML 文件
--title 显式覆盖标题
--author 显式覆盖作者
--cover-output 自定义封面输出路径
--cover-ar 封面宽高比,默认 16:9
--source-url 原文链接
--need-open-comment 是否开启评论,默认 1
--only-fans-can-comment 是否仅粉丝可评论,默认 1

Read the full file on GitHub · 135 lines

Files

What ships with it

5 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. 12d ago First seen · 135 lines · 47 tokens per session scan A a4a3de2bc4b9

Subscribe to this mod's changes

zhy-wechat-publish is a skill published in the GitHub repository zhylq/yuan-skills (36 stars, last pushed 6mo ago), licensed MIT. It adds 47 tokens to every session and 1,416 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

tong-jincheng-perspective

A Chinese-language framework for thinking about relationships, attraction, social situations, and personal growth from the perspective of a livestream relationship creator.

863401402/she-love-me · 160 tokens

design-taste-frontend

Anti-slop frontend skill for landing pages, portfolios, and redesigns. The agent reads the brief, infers the right design direction, and ships interfaces that do not look templated. Real design systems when applicable, audit-first on redesigns, strict pre-flight check.

Leonxlnx/taste-skill · 61 tokens

stitch-design-taste

Semantic Design System Skill for Google Stitch. Generates agent-friendly DESIGN.md files that enforce premium, anti-generic UI standards — strict typography, calibrated color, asymmetric layouts, perpetual micro-motion, and hardware-accelerated performance.

Leonxlnx/taste-skill · 50 tokens

image-to-code

Elite website image-to-code skill for Codex. For visually important web tasks, it must first generate the design image(s) itself, deeply analyze them, then implement the website to match them as closely as possible. In Codex, it must prefer large, readable, section-specific images instead of tiny compressed boards…

Leonxlnx/taste-skill · 116 tokens

imagegen-frontend-mobile

Elite mobile app image-generation skill for creating premium, app-native screen concepts and flows. Designed for iOS, Android, and cross-platform mobile products. Prioritizes clean hierarchy, comfortably readable text, strong multi-screen consistency, controlled color palettes, non-generic creative direction, textured…

Leonxlnx/taste-skill · 126 tokens

imagegen-frontend-web

Elite frontend image-direction skill for generating premium, conversion-aware website design references. CRITICAL OUTPUT RULE — generate ONE separate horizontal image FOR EVERY section. A landing page with 8 sections produces 8 images. Never compress multiple sections into one image. Enforces composition variety (not…

Leonxlnx/taste-skill · 126 tokens