MCPInstall

wechat-draft-publisher

自动将HTML文章发布到微信公众号草稿箱(小龙虾适配版)。首次使用自动引导配置IP白名单。当用户说"推送到微信"、"发布到公众号"、"上传草稿"时使用。

Installs
77
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/bnd-1/wechat_article_mini --skill wechat-draft-publisher
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads wechat-draft-publisher automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

微信公众号草稿发布器(小龙虾极速版)

核心理念:首次引导配置,之后一键发布


前置:安装依赖

每次使用前,先确保依赖已安装(幂等操作,可重复执行):

pip3 install -r skills/wechat-draft-publisher/requirements.txt

首次使用:引导配置

第1步:查询IP并告知用户

每次首次使用或遇到IP白名单错误时,先帮用户查询IP:

python publisher.py --query-ip

这会自动查询公网IP并显示:

>>> 你的公网IP是: x.x.x.x

请将此IP添加到微信公众号后台:
1. 登录 https://developers.weixin.qq.com/platform
2. 设置与开发 → 基本配置 → IP白名单
3. 添加IP: x.x.x.x

告诉用户:

首次使用需要配置两件事:

1. IP白名单:我已查到你的服务器IP是 x.x.x.x
   请登录微信公众号后台,在 设置与开发→基本配置→IP白名单 中添加这个IP

2. AppID和AppSecret:
   在同一页面(基本配置)中复制AppID和AppSecret
   运行发布工具时会自动引导你填写

配置好了告诉我,我就帮你发布!

第2步:运行发布器(自动引导输入凭证)

python publisher.py --title "文章标题" --content article.html

首次运行会自动提示输入 AppID 和 AppSecret。


正常发布流程(配置完成后)

一键发布

python publisher.py \
  --title "文章标题" \
  --content xxx_formatted.html \
  --cover cover.png \
  --author "小龙虾"

自动执行步骤

  1. 找 HTML 文件:优先 *_formatted.html,回退最新 .html
  2. 提取标题:从 HTML 注释或文件名
  3. 找封面图:cover.png
  4. 调用发布:上传封面 → 上传内容图片 → 创建草稿
  5. 返回结果:显示 media_id,提示去后台查看

发布成功后提示

✅ 文章已推送到草稿箱!

接下来:
1. 登录 https://developers.weixin.qq.com/platform
2. 进入"草稿箱"
3. 预览效果,确认后发布

⚠️ 草稿不会自动发布,你可以在后台编辑后再发

常见错误速查

错误原因解决
invalid ip not in whitelistIP不在白名单运行 python publisher.py --query-ip 查IP并添加
AppSecret error凭证错误检查 ~/.wechat-publisher/config.json
title size out of limit标题太长工具会自动截断,无需处理
api功能未授权公众号类型不支持需要认证的服务号

配置文件位置

~/.wechat-publisher/config.json

{
  "appid": "xxx",
  "appsecret": "xxx"
}

完整工作流联动

写文章(tech-writer/pm-writer) → 美化格式(formatter) → 推送到微信(本skill)

用户只需要说三句话:

  1. "写一篇关于XXX的文章"
  2. "美化文章"
  3. "推送到微信"

FAQ

What does the wechat-draft-publisher skill do?

自动将HTML文章发布到微信公众号草稿箱(小龙虾适配版)。首次使用自动引导配置IP白名单。当用户说"推送到微信"、"发布到公众号"、"上传草稿"时使用。

How do I install wechat-draft-publisher?

Run npx skills add https://github.com/bnd-1/wechat_article_mini --skill wechat-draft-publisher in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/wechat-draft-publisher/ (personal) or .claude/skills/wechat-draft-publisher/ (project).

Which AI agents can use wechat-draft-publisher?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is wechat-draft-publisher safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains wechat-draft-publisher?

It is published by bnd-1 in bnd-1/wechat_article_mini. It has 77 recorded installs.

Popular frontend & design skills

View category →

setup-matt-pocock-skills

mattpocock/skills

Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

Frontend & Design1.1M installs

frontend-design

anthropics/skills

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

OfficialFrontend & Design1M installs

hyperframes-animation

heygen-com/hyperframes

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

prototype

mattpocock/skills

Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

Frontend & Design999.2K installs

hyperframes-core

heygen-com/hyperframes

The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Frontend & Design930.5K installs

vercel-react-best-practices

vercel-labs/agent-skills

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

OfficialFrontend & Design843.1K installs