Post to WeChat logo

Post to WeChat

Visit

A Claude Code skill for posting content to WeChat Official Account (微信公众号), supporting both article and image-text posting formats.

Share:

Post to WeChat is a Claude Code skill that automates content posting to WeChat Official Accounts (微信公众号) using Chrome CDP automation. It supports both image-text posting (图文) and full article posting (文章) with markdown formatting.

Core Features

1. Dual Posting Modes

  • Image-Text (图文): Post multiple images (up to 9) with title and content
  • Article (文章): Post full markdown articles with rich formatting and themes

2. Markdown Support

  • Extract title and content from markdown files
  • Full markdown formatting support for articles
  • Automatic content parsing and conversion

3. Image Handling

  • Support multiple image uploads (up to 9 images for image-text)
  • Inline images for article posts
  • Batch image processing from directories

4. Smart Content Processing

  • Auto title compression (to 20 characters for image-text)
  • Content compression (to 1000 characters for image-text)
  • Theme support for articles (default, grace, simple)

5. Browser Automation

  • Chrome CDP-based automation
  • Session persistence (login once, use forever)
  • Automatic clipboard handling

Usage

Image-Text Posting

# From markdown file and image directory
npx -y bun ./scripts/wechat-browser.ts --markdown article.md --images ./images/

# With explicit parameters
npx -y bun ./scripts/wechat-browser.ts --title "标题" --content "内容" --image img1.png --image img2.png --submit

Article Posting

# Post markdown article with theme
npx -y bun ./scripts/wechat-article.ts --markdown article.md --theme grace

Key Capabilities

  • Session Management: Login once, session is preserved for future posts
  • Batch Processing: Process multiple images and content in one go
  • Format Flexibility: Choose between quick image-text or rich article formats
  • Markdown Integration: Seamlessly work with markdown files
  • Theme Customization: Apply different themes to article posts

Prerequisites

  • Google Chrome installed
  • Bun runtime (via npx -y bun)
  • WeChat Official Account credentials
  • First run requires QR code login

Use Cases

  • Automated content publishing to WeChat Official Accounts
  • Batch posting of articles and images
  • Integration with content management workflows
  • Cross-platform content distribution
  • Social media automation for Chinese markets

Technical Details

  • Automation: Chrome DevTools Protocol (CDP)
  • Runtime: Bun
  • Image Limit: Up to 9 images for image-text posts
  • Content Limits: 20 chars title, 1000 chars content for image-text
  • Themes: default, grace, simple (for articles)

Comments

No comments yet. Be the first to comment!