| name | publish-all | ||||||
|---|---|---|---|---|---|---|---|
| description | One markdown file → publish to blog + generate WeChat Word, Zhihu Markdown, Xiaohongshu text, and more. Content distribution for Chinese social media platforms. | ||||||
| argument-hint | <file.md> [--slug my-slug] [--lang zh,en] [--skip-blog] | ||||||
| metadata |
|
Distribute a single Markdown blog post across multiple platforms in one command.
| Output | Format | Platform |
|---|---|---|
| Blog publish | SQL/API upsert | Your blog (configurable) |
| WeChat Word | .docx with embedded QR codes | WeChat Subscription Account (微信订阅号) |
| Zhihu Markdown | Clean .md without QR images | Zhihu (知乎) |
| Xiaohongshu text | Short text with emojis + hashtags | Xiaohongshu (小红书) |
| Original copy | .md | Archive |
- After writing a blog post and wanting to distribute it to Chinese social media
- When you need platform-specific formatting from a single source
- When you want to maintain consistent messaging across platforms
- Invoke with
/publish-all <file.md>
- Python 3.10+ (auto-creates venv on first run)
sshpass(for blog publishing via SSH, optional)- Blog server with PostgreSQL (optional, for auto-publish)
Copy to your Claude Code skills directory:
cp -r publish-all ~/.claude/skills/Or symlink:
ln -s /path/to/publish-all ~/.claude/skills/publish-allCreate ~/.publish-all.env:
# Blog server (PostgreSQL via SSH)
BLOG_SSH_HOST=user@your-server.com
BLOG_SSH_PASS=your-password # or use SSH keys
BLOG_DB_USER=dbuser
BLOG_DB_NAME=dbname
BLOG_AUTHOR_ID=uuid-of-author # or "auto" to use first admin
# Or use Blog API instead of SSH
BLOG_API_URL=https://yourblog.com/api/blog/publish
BLOG_API_KEY=your-api-keyIf no config is found, blog publishing is skipped and only format generation runs.
/publish-all ~/Desktop/my-article.md
/publish-all ~/Desktop/my-article.md --slug custom-slug --lang zh,en
/publish-all ~/Desktop/my-article.md --skip-blog
bash scripts/publish-all.sh <file.md> [slug] [lang]All files are generated in ~/Desktop/publish-{slug}/:
publish-my-article/
├── 微信订阅号-my-article.docx # Import to WeChat editor
├── 知乎-my-article.md # Paste into Zhihu editor
├── 小红书-my-article.txt # Copy-paste to Xiaohongshu
└── 原文-my-article.md # Archive copy
Your input markdown should follow this structure:
# Article Title
> Optional lead paragraph or blockquote
Body content with standard markdown...
## Section headings
Regular paragraphs, **bold**, *italic*, lists, etc.

[Link text](https://your-url.com)QR codes using api.qrserver.com are automatically:
- WeChat Word: Downloaded and embedded as images
- Zhihu: Removed (replaced by text links)
- Xiaohongshu: Omitted (plain text only)
Edit scripts/gen-formats.py and add a new generator function:
def generate_weibo(md: str) -> str:
"""Convert blog to Weibo-friendly format."""
# Your conversion logic here
return weibo_textThen register it in the main() function.
The script checks for ~/.publish-all.env. Add new platform API keys there and extend publish-all.sh to call them.
input.md
│
├──→ SSH/SQL ──→ Blog database (upsert by slug+lang)
│
└──→ gen-formats.py
├──→ WechatDocBuilder ──→ .docx (python-docx + QR images)
├──→ generate_zhihu() ──→ .md (clean markdown)
└──→ generate_xiaohongshu() ──→ .txt (short + emojis)
Built by PulseAgent — AI-powered go-to-market platform for exporters.
Inspired by 爱贝壳内容同步助手 (browser-based approach) — we took the CLI + API-first route instead.