Claude-skill-registry baoyu-post-to-wechat
Post content to WeChat Official Account (微信公众号). Supports both article posting (文章) and image-text posting (图文).
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/baoyu-post-to-wechat" ~/.claude/skills/majiayu000-claude-skill-registry-baoyu-post-to-wechat && rm -rf "$T"
manifest:
skills/data/baoyu-post-to-wechat/SKILL.mdsource content
Post to WeChat Official Account (微信公众号)
Post content to WeChat Official Account using Chrome CDP automation.
Script Directory
Important: All scripts are located in the
scripts/ subdirectory of this skill.
Agent Execution Instructions:
- Determine this SKILL.md file's directory path as
SKILL_DIR - Script path =
${SKILL_DIR}/scripts/<script-name>.ts - Replace all
in this document with the actual path${SKILL_DIR}
Script Reference:
| Script | Purpose |
|---|---|
| Image-text posts (图文) |
| Full article posting (文章) |
| Markdown → WeChat HTML conversion |
| Copy content to clipboard |
| Send real paste keystroke |
Quick Usage
Image-Text (图文) - Multiple images with title/content
# From markdown file and image directory npx -y bun ${SKILL_DIR}/scripts/wechat-browser.ts --markdown article.md --images ./images/ # With explicit parameters npx -y bun ${SKILL_DIR}/scripts/wechat-browser.ts --title "标题" --content "内容" --image img1.png --image img2.png --submit
Article (文章) - Full markdown with formatting
# Post markdown article npx -y bun ${SKILL_DIR}/scripts/wechat-article.ts --markdown article.md --theme grace
Note:
represents this skill's installation directory. Agent replaces with actual path at runtime.${SKILL_DIR}
References
- Image-Text Posting: See
for detailed image-text posting guidereferences/image-text-posting.md - Article Posting: See
for detailed article posting guidereferences/article-posting.md
Prerequisites
- Google Chrome installed
runtime (viabun
)npx -y bun- First run: log in to WeChat Official Account in the opened browser window
Features
| Feature | Image-Text | Article |
|---|---|---|
| Multiple images | ✓ (up to 9) | ✓ (inline) |
| Markdown support | Title/content extraction | Full formatting |
| Auto title compression | ✓ (to 20 chars) | ✗ |
| Content compression | ✓ (to 1000 chars) | ✗ |
| Themes | ✗ | ✓ (default, grace, simple) |
Troubleshooting
- Not logged in: First run opens browser - scan QR code to log in, session is preserved
- Chrome not found: Set
environment variableWECHAT_BROWSER_CHROME_PATH - Paste fails: Check system clipboard permissions
Extension Support
Custom configurations via EXTEND.md.
Check paths (priority order):
(project).baoyu-skills/baoyu-post-to-wechat/EXTEND.md
(user)~/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md
If found, load before workflow. Extension content overrides defaults.