baoyu-post-to-wechat

Posts content to WeChat Official Account (微信公众号) via Chrome CDP automation. Supports article posting (文章) with full markdown formatting and image-text posting (图文) with multiple images. Use when user mentions "发布公众号", "post to wechat", "微信公众号", or "图文/文章".

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "baoyu-post-to-wechat" with this command: npx skills add siatwangmin/baoyu-skills/siatwangmin-baoyu-skills-baoyu-post-to-wechat

Post to WeChat Official Account

Script Directory

Agent Execution: Determine this SKILL.md directory as SKILL_DIR, then use ${SKILL_DIR}/scripts/<name>.ts.

ScriptPurpose
scripts/wechat-browser.tsImage-text posts (图文)
scripts/wechat-article.tsArticle posting (文章)
scripts/md-to-wechat.tsMarkdown → WeChat HTML

Preferences (EXTEND.md)

Use Bash to check EXTEND.md existence (priority order):

# Check project-level first
test -f .baoyu-skills/baoyu-post-to-wechat/EXTEND.md && echo "project"

# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL)
test -f "$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md" && echo "user"

┌────────────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├────────────────────────────────────────────────────────┼───────────────────┤ │ .baoyu-skills/baoyu-post-to-wechat/EXTEND.md │ Project directory │ ├────────────────────────────────────────────────────────┼───────────────────┤ │ $HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md │ User home │ └────────────────────────────────────────────────────────┴───────────────────┘

┌───────────┬───────────────────────────────────────────────────────────────────────────┐ │ Result │ Action │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ Found │ Read, parse, apply settings │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ Not found │ Use defaults │ └───────────┴───────────────────────────────────────────────────────────────────────────┘

EXTEND.md Supports: Default theme | Auto-submit preference | Chrome profile path

Usage

Image-Text (图文)

npx -y bun ${SKILL_DIR}/scripts/wechat-browser.ts --markdown article.md --images ./images/
npx -y bun ${SKILL_DIR}/scripts/wechat-browser.ts --title "标题" --content "内容" --image img.png --submit

Article (文章)

Before posting, ask user to choose a theme using AskUserQuestion:

ThemeDescription
default经典主题 - 传统排版,标题居中带底边,二级标题白字彩底
grace优雅主题 - 文字阴影,圆角卡片,精致引用块 (by @brzhang)
simple简洁主题 - 现代极简风,不对称圆角,清爽留白 (by @okooo5km)

Default: default. If user has already specified a theme, skip the question.

Workflow:

  1. Generate HTML preview and print the full htmlPath from JSON output so user can click to preview:
npx -y bun ${SKILL_DIR}/scripts/md-to-wechat.ts article.md --theme <chosen-theme>
  1. Post to WeChat:
npx -y bun ${SKILL_DIR}/scripts/wechat-article.ts --markdown article.md --theme <chosen-theme>

Detailed References

TopicReference
Image-text parameters, auto-compressionreferences/image-text-posting.md
Article themes, image handlingreferences/article-posting.md

Feature Comparison

FeatureImage-TextArticle
Multiple images✓ (up to 9)✓ (inline)
Markdown supportTitle/content extractionFull formatting
Auto compression✓ (title: 20, content: 1000 chars)
Themes✓ (default, grace, simple)

Prerequisites

  • Google Chrome
  • First run: log in to WeChat Official Account (session preserved)

Troubleshooting

IssueSolution
Not logged inFirst run opens browser - scan QR to log in
Chrome not foundSet WECHAT_BROWSER_CHROME_PATH env var
Paste failsCheck system clipboard permissions

Extension Support

Custom configurations via EXTEND.md. See Preferences section for paths and supported options.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

baoyu-image-gen

No summary provided by upstream source.

Repository SourceNeeds Review
General

baoyu-xhs-images

No summary provided by upstream source.

Repository SourceNeeds Review
General

baoyu-infographic

No summary provided by upstream source.

Repository SourceNeeds Review
General

baoyu-danger-gemini-web

No summary provided by upstream source.

Repository SourceNeeds Review