multi-platform-publisher
Skill10 starsChanged 52 days agoMITView on GitHub
Publish content to 13 platforms — X/Twitter, LinkedIn, WeChat, Xiaohongshu, Dev.to, Qiita, YouTube, Hacker News, Reddit, note.com, Substack, Douyin, Channels — with one command. Automatically adapts content format per platform: threads for Twitter, professional articles for LinkedIn, HTML drafts for WeChat, emoji notes for Xiaohongshu. Bundles the super-writer content pipeline (topic selection, AI drafting, human review). Triggers: publish content, social media, twitter post, linkedin post, wechat article, xiaohongshu note, cross-platform publish, multi-platform
- Reads credentials
In this repository2 other files it gives its agents.
- lieflat-less-ai-toneSkill
- self-media-opsSkill
The file
Files
Multi-Platform Social Media Publisher
Publish content to multiple social media platforms with a single command. The publisher (main.py) covers X/Twitter, LinkedIn, WeChat Official Account (微信公众号), and Xiaohongshu (小红书) over official APIs. The bundled super-writer pipeline (super-writer/) adds Dev.to, Qiita, YouTube, Hacker News, Reddit, note.com, Substack, Douyin, and Channels — plus topic selection, AI drafting, and human-in-the-loop review.
Prerequisites
Install dependencies:
pip3 install requests tweepy PillowSet credentials via environment variables:
# Twitter / X
export TWITTER_API_KEY="your-api-key"
export TWITTER_API_SECRET="your-api-secret"
export TWITTER_ACCESS_TOKEN="your-access-token"
export TWITTER_ACCESS_TOKEN_SECRET="your-access-token-secret"
# LinkedIn
export LINKEDIN_ACCESS_TOKEN="your-l...oken"
export LINKEDIN_PERSON_URN="urn:li:person:abc123" # optional
export LINKEDIN_CLIENT_ID="your-client-id" # optional, for OAuth app wiring
export LINKEDIN_CLIENT_SECRET="your-primary-secret" # optional
export LINKEDIN_CLIENT_SECRET_SECONDARY="your-secondary-secret" # optional
# If LINKEDIN_ACCESS_TOKEN accidentally contains a client secret that starts with WPL_AP1,
# the loader now ignores it and falls back to the token stored in openclaw.json.
# The adapter also uses LinkedIn-Version 202504 and sends a single-image payload when only one image is attached.
# WeChat Official Account
export WECHAT_APPID="your-appid"
export WECHAT_APPSECRET="***"
# Note: WeChat draft cover images must use permanent thumb media.
# Inline article images should use local file paths so the adapter can upload them to mmbiz CDN automatically.
# Xiaohongshu
export XHS_COOKIE="your-cookie-string"Or configure via ~/.openclaw/openclaw.json:
{
"skills": {
"entries": {
"multi-platform-publisher": {
"env": {
"TWITTER_API_KEY": "...",
"LINKEDIN_ACCESS_TOKEN": "...",
"WECHAT_APPID": "...",
"XHS_COOKIE": "..."
}
}
}
}
}Quick Start
# Publish to all configured platforms
python3 {baseDir}/main.py publish --content "Your post content here" --platforms all
# Specific platforms
python3 {baseDir}/main.py publish --content "Your content" --platforms twitter,linkedin
# Publish from a Markdown file
python3 {baseDir}/main.py publish --file /path/to/article.md --platforms all
# Twitter thread for long content
python3 {baseDir}/main.py publish --content "Long article..." --platforms twitter --thread
# Attach images
python3 {baseDir}/main.py publish --content "Check this out!" --platforms all --images photo.jpg
# Preview without publishing (dry run)
python3 {baseDir}/main.py publish --content "Test" --platforms all --dry-run
# Validate credentials
python3 {baseDir}/main.py validate
# List configured platforms
python3 {baseDir}/main.py list-platformsSupported Platforms
| Platform | Auth Method | Features |
| X/Twitter | OAuth 1.0a | Tweets, Threads, Images |
| OAuth 2.0 | Posts, Articles, Images | |
| WeChat Official Account | API Token | Draft creation, Images |
| Xiaohongshu (小红书) | MCP / Cookie | Notes, Images |
Content Adaptation
Content is automatically adapted for each platform:
- X/Twitter — Strips Markdown, splits into 280-char tweets, creates numbered threads for long content
- LinkedIn — Formats as professional post, up to 3,000 chars, clean paragraphs
- WeChat — Converts to styled HTML article (draft, requires manual publish in dashboard)
- Xiaohongshu — Casual tone, emoji injection, topic tags, 1,000 char limit
Project Structure
main.py # CLI entry point
adapters/
base_adapter.py # Abstract base class
twitter_adapter.py # X / Twitter (OAuth 1.0a)
linkedin_adapter.py # LinkedIn (OAuth 2.0)
wechat_adapter.py # WeChat Official Account
xiaohongshu_adapter.py # Xiaohongshu (MCP/Cookie)
utils/
config_loader.py # Credential loading (env > openclaw.json > config.json)
content_adapter.py # Platform-specific content transformation
image_handler.py # Image resize/validate before upload
logger.py # Stderr loggerDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

