| 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 | {"author":"PulseAgent","version":"1.0.0","homepage":"https://github.com/iPythoning/publish-all"} |
Publish All โ One Markdown, Every Platform
Distribute a single Markdown blog post across multiple platforms in one command.
What It Does
| 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 |
When to Use
- 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>
Prerequisites
- Python 3.10+ (auto-creates venv on first run)
sshpass (for blog publishing via SSH, optional)
- Blog server with PostgreSQL (optional, for auto-publish)
Setup
1. Install the skill
Copy to your Claude Code skills directory:
cp -r publish-all ~/.claude/skills/
Or symlink:
ln -s /path/to/publish-all ~/.claude/skills/publish-all
2. Configure blog publishing (optional)
Create ~/.publish-all.env:
BLOG_SSH_HOST=user@your-server.com
BLOG_SSH_PASS=your-password
BLOG_DB_USER=dbuser
BLOG_DB_NAME=dbname
BLOG_AUTHOR_ID=uuid-of-author
BLOG_API_URL=https://yourblog.com/api/blog/publish
BLOG_API_KEY=your-api-key
If no config is found, blog publishing is skipped and only format generation runs.
Usage
Via Claude Code
/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
Via command line
bash scripts/publish-all.sh <file.md> [slug] [lang]
Output
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
Markdown Input Format
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
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)
Extending
Add a new platform
Edit scripts/gen-formats.py and add a new generator function:
def generate_weibo(md: str) -> str:
"""Convert blog to Weibo-friendly format."""
return weibo_text
Then register it in the main() function.
API-based publishing
The script checks for ~/.publish-all.env. Add new platform API keys there and extend publish-all.sh to call them.
How It Works
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)
Credits
Built by PulseAgent โ AI-powered go-to-market platform for exporters.
Inspired by ็ฑ่ดๅฃณๅ
ๅฎนๅๆญฅๅฉๆ (browser-based approach) โ we took the CLI + API-first route instead.