mcpField
B
baoyu-post-to-wechat

baoyu-post-to-wechat

github.com/jst-well-danMarketing & growth1075 installsUpdated 31w ago
Repository

About baoyu-post-to-wechat

baoyu-post-to-wechat is a skill for publishing image-text posts and articles to WeChat Official Account. It provides separate scripts for each format, Markdown conversion, and configurable preferences.

Key features

  1. 01Publish image-text posts
  2. 02Publish articles
  3. 03Convert Markdown to WeChat HTML
  4. 04Support multiple images and themes
  5. 05Set preferences through EXTEND.md

Use cases

  1. 01Publish image-based posts
  2. 02Format Markdown as themed articles
  3. 03Configure default themes and Chrome profiles

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/jst-well-dan/skill-box --skill baoyu-post-to-wechat

After installing, type/baoyu-post-to-wechatin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
article-posting.md
image-text-posting.md
scripts/
cdp.ts
copy-to-clipboard.ts
md-to-wechat.ts
paste-from-clipboard.ts
wechat-agent-browser.ts
wechat-article.ts
wechat-browser.ts
scripts/md/
LICENSE
render.ts
scripts/md/extensions/
alert.ts
footnotes.ts
index.ts
infographic.ts
katex.ts
markup.ts
plantuml.ts
ruby.ts
slider.ts
toc.ts
scripts/md/themes/
base.css
default.css
grace.css
simple.css
scripts/md/utils/
languages.ts

Details

From the project README

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 (文章)
npx -y bun ${SKILL_DIR}/scripts/wechat-article.ts --markdown article.md --theme grace

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.

Comments

Markdown supported