Task Objective
- This Skill is used to: efficiently achieve multi-platform content publishing, with full-process automation from topic selection and creation to one-click push
- Capabilities include:
- Intelligent topic selection and screening (10-point scoring system)
- AI-generated high-quality content (hot topic commentary, technical analysis, practical tutorials, story insights, etc.)
- One-click multi-platform publishing (WeChat, Zhihu, Juejin, CSDN, Bilibili, Xiaohongshu)
- Automatic content format adaptation (HTML, Markdown, plain text)
- Trigger conditions:
- "Publish to WeChat Official Accounts"
- "Publish articles to multiple platforms"
- "One-click push content"
- "Generate and publish an article"
Prerequisites
Dependency Description
This Skill uses the Python standard library and has no additional dependencies.
Environment Preparation
No special environment preparation is required; just ensure a network connection.
Interface Configuration
- Server Address:
http://39.108.254.228:8002(your self-hosted service) - WeChat Official Accounts: interface configured
/publish-draft✅ - Other Platforms: independent interfaces need to be configured step by step
- Zhihu:
/publish-zhihu(Zhihu Cookie needs to be configured) - Weibo:
/publish-weibo(Weibo AppKey/Token needs to be configured) - Juejin:
/publish-juejin(Juejin Cookie needs to be configured) - CSDN:
/publish-csdn(CSDN Cookie needs to be configured) - Other platforms: see
references/server-config-guide.md
- Zhihu:
Interface Architecture:
- Independent publishing interface for each platform
- Independent authentication configuration for each platform
- Unified request and response format
Detailed Configuration Guide:
- Reference document:
references/server-config-guide.md - Includes: interface configuration examples for each platform, methods for obtaining authentication information, deployment steps, and testing methods
Operation Steps
Standard Process
Step 1: Topic Selection and Screening (Optional)
If you have multiple topic candidates, you can use the topic selection and screening function to score and rank them:
python scripts/filter_topics.py --topics "AI技术:8,2,3,1,AI伦理:7,2,4,1,人工智能:6,1,3,1" --threshold 7
Parameter Description:
--topics: topic list, format is选题名:热度,争议性,价值,相关性--threshold: score threshold, ≥7 points enters the recommendation pool
Agent Processing: If topics are processed by the agent, the agent will score them according to the four dimensions of popularity, controversy, value, and relevance, and screen out high-quality topics.
Step 2: Differentiated Content Generation
Generate differentiated content according to platform characteristics to ensure that the content on each platform conforms to the platform style and user habits.
Core Principles:
- Same topic, multiple adapted versions
- Keep core information consistent
- Optimize expression style and emphasis
- Comply with platform format requirements
Generate Content:
-
Understand platform characteristics: refer to references/content-adaptation-guide.md
- In-depth reading type: WeChat, WordPress (1500-3000 words, HTML format)
- Knowledge Q&A: Zhihu (1000-2000 words, Markdown format)
- Short content: Weibo, X (140-280 characters, plain text)
- Tech community: Juejin, CSDN (800-1500 words, Markdown + code)
- Image-text community: Xiaohongshu (300-800 words, plain text + emoji)
-
Generate main content(suggest using WeChat Official Account as the primary):
- Choose content style: refer to references/viral-content-templates.md
- Generate HTML-format content: follow references/html-layout-guide.md
- Formatting rules: hierarchical structure + partial underlining, no more than 20%
-
Adapt to other platforms:
- Zhihu: convert to Q&A structure, Markdown format
- Weibo/X: extract core viewpoints, plain text + topic hashtags
- Xiaohongshu: use emoji + short paragraphs, plain text + tags
- Juejin/CSDN: add code examples, Markdown format
-
Search for cover image:
python scripts/search_images.py --keyword "AI技术" --count 1 --size 1600x680
Agent processing: The agent will automatically, based on the target platform:
- Adjust content length (WeChat 3000 words vs Xiaohongshu 600 words)
- Choose content format (HTML/Markdown/plain text)
- Optimize title style (suspense-style vs technical vs eye-catching short title)
- Adjust cover ratio (2.35:1 vs 16:9 vs 3:4)
- Adapt tag format (#topic# vs #tag)
- Ensure clean output (no author information, production information)
Step 3: One-click publish
Call the publishing script to push the content to the target platform:
# 发布到微信公众号(已可用)
python scripts/publish.py --platform wechat --title "文章标题" --content "HTML内容" --cover-image "封面图URL" --tags "标签1,标签2"
# 发布到知乎(需配置统一接口)
python scripts/publish.py --platform zhihu --title "文章标题" --content "Markdown内容"
# 发布到微博(需配置统一接口)
python scripts/publish.py --platform weibo --title "文章标题" --content "纯文本内容"
# 发布到掘金(需配置统一接口)
python scripts/publish.py --platform juejin --title "文章标题" --content "Markdown内容" --tags "AI,技术"
# 发布到小红书(需配置统一接口)
python scripts/publish.py --platform xiaohongshu --title "文章标题" --content "纯文本内容" --cover-image "封面图URL"
Supported platforms:
- In-depth reading: wechat, wordpress
- Knowledge Q&A: zhihu
- Short content: weibo, x
- Tech community: juejin, csdn
- Literary community: jianshu
- Traffic distribution: toutiao, dayu
- Video companion: bilibili
- Finance and investment: xueqiu
- Image-text community: xiaohongshu
Optional branches
Branch A: Quick publish mode (recommended)
When there are no special requirements, automatically execute the following process:
- Automatic topic selection: the agent generates a topic based on current hot topics and the target audience
- Generate content: by default, generate an illustrated viral WeChat Official Account article
- Search cover: automatically search for a cover image based on title keywords
- One-click push: publish to the WeChat Official Account drafts box
Example requests:
- "Publish an article about AI technology"
- "Generate and publish a hot topic commentary"
- "Quickly push a technical analysis"
Branch B: Differentiated multi-platform publishing (recommended)
When content needs to be published to multiple platforms at the same time, the agent will generate differentiated content for each platform:
- Generate main content: with WeChat Official Account as the primary, generate in-depth content (1500-3000 words, HTML format)
- Differentiated adaptation:
- Zhihu: convert to Q&A structure (1000-2000 words, Markdown format)
- Weibo: extract core viewpoints (140-280 characters, plain text + topic hashtags)
- Xiaohongshu: Use emoji + short paragraphs (300-800 characters, plain text + tags)
- Juejin/CSDN: Add code examples (800-1500 characters, Markdown format)
- X: Concise and impactful (140-280 characters, plain text + topic tags)
- Batch push: Publish to each platform sequentially
Note: Except for WeChat, other platforms need to have a unified interface configured first.
Example request:
- "Publish 'AI Technology Revolution' to WeChat, Zhihu, Weibo, Xiaohongshu, Juejin"
- "Distribute this article across multiple platforms"
- "Batch publish to all platforms"
Differentiation points:
- Content length: WeChat 3000 characters vs Xiaohongshu 600 characters vs Weibo 200 characters
- Content format: HTML vs Markdown vs plain text
- Title style: suspense-style vs question-style vs eye-catching short titles
- Cover ratio: 2.35:1 vs 16:9 vs 3:4
Branch C: Manual review mode
Requires manual review before publishing:
- Generate content: Agent generates content
- Preview and review: User provides review feedback
- Adjust and optimize: Adjust content based on feedback
- Final publish: Publish to target platforms
Resource index
Required scripts
- scripts/publish.py: Multi-platform publishing script, supports WeChat Official Account (already configured), Zhihu, Juejin, CSDN, Bilibili, Xiaohongshu (interface configuration required)
- scripts/search_images.py: Unsplash image search script, supports keyword and size filtering
- scripts/filter_topics.py: Topic selection script, 10-point scoring system
Domain references
- references/server-config-guide.md: Complete guide to server-side interface configuration
- When to read: When you need to understand how to configure interfaces and authentication information for each platform on the server
- references/platform-requirements.md: Publishing format requirements for each platform
- When to read: When you need to understand the content formats and publishing specifications of target platforms
- references/html-layout-guide.md: Complete guide to HTML layout
- When to read: When generating HTML content for WeChat Official Account
- references/viral-content-templates.md: Viral content templates
- When to read: When you need to generate high-quality content for reference
- references/content-adaptation-guide.md: Differentiated content generation guide
- When to read: When you need to generate differentiated content for multiple platforms
- references/xiaohongshu-creation-guide.md: Complete guide to Xiaohongshu creation
- When to read: When you need to create polished content and image cards for Xiaohongshu
Precautions
Publishing specifications
- Clean output: Does not include author information or production information (such as "COZE production", "AI assistant", etc.)
- Layout quality:
- WeChat: strictly follow the HTML layout guide, underline density not exceeding 20%
- Other platforms: comply with each platform's format requirements
- Cover specifications:
- WeChat: 2.35:1 ratio (recommended 1600x680px)
- Xiaohongshu: 3:4 vertical screen
- Other platforms: 16:9 ratio
Content quality
- Originality: Ensure content is original or cite the source
- Accuracy: Data and citations must be accurate and reliable
- Value: Provide valuable information and insights
Platform Limitations
- WeChat Official Account: API is configured and ready to use
- Other Platforms: Need to be in
scripts/publish.pyconfigure the API address, refer to:def publish_zhihu(title, content, cover_image=None, tags=None): api_url = "YOUR_ZHIHU_API_URL" # 替换为实际接口 # 实现发布逻辑
Usage Examples
Example 1: Quick Publishing of WeChat Articles (Recommended)
Function Description: Automatically generate illustrated viral Official Account articles and publish them to the drafts box
Execution Method: Agent + Script hybrid
Key Steps:
- Agent generates topic and content
- Call
scripts/search_images.pyto search for cover images - Call
scripts/publish.pyto publish to WeChat drafts box
Example:
# 智能体生成内容
# 脚本搜索封面图
python scripts/search_images.py --keyword "AI技术" --count 1
# 脚本发布内容
python scripts/publish.py --platform wechat --title "AI如何改变未来" --content "HTML内容" --cover-image "https://source.unsplash.com/1600x680/?AI"
Example 2: Topic Selection + Content Generation + Publishing
Function Description: Select the best topic from multiple candidate topics, generate content and publish
Execution Method: Script + Agent + Script hybrid
Key Steps:
- Call
scripts/filter_topics.pyto filter topics - Agent generates content based on the filtering results
- Call
scripts/publish.pyto publish
Example:
# 筛选选题
python scripts/filter_topics.py --topics "AI技术:8,2,3,1,AI伦理:7,2,4,1" --threshold 7
# 智能体生成内容
# 脚本发布
python scripts/publish.py --platform wechat --title "AI伦理" --content "HTML内容"
Example 3: Multi-platform Batch Publishing
Function Description: Publish to multiple platforms simultaneously (API configuration required)
Execution Method: Agent + Script hybrid
Key Steps:
- Agent generates the main content (HTML format)
- Agent converts it to each platform's format (Markdown/plain text)
- Call
scripts/publish.pyin sequence to publish to each platform
Example:
# 发布到微信(已配置)
python scripts/publish.py --platform wechat --title "标题" --content "HTML内容"
# 发布到知乎(需配置接口)
python scripts/publish.py --platform zhihu --title "标题" --content "Markdown内容"
# 发布到掘金(需配置接口)
python scripts/publish.py --platform juejin --title "标题" --content "Markdown内容" --tags "AI,技术"
Advanced Features
Automated Workflow
Combining scheduled tasks and automation tools (such as n8n, Zapier) can achieve a fully automated content publishing process:
- Scheduled Topic Selection: Automatically fetch trending topics and filter topics daily
- AI Content Generation: Automatically generate content based on the topic
- Automatic Publishing: One-click push to multiple platforms
API Extension
Supports custom API extension, in scripts/publish.py add a new platform publishing method:
def publish_custom(title, content, cover_image=None, tags=None):
"""
自定义平台发布
"""
api_url = "YOUR_CUSTOM_API_URL"
# 实现发布逻辑
Content Templates
Supports custom content templates, in references/viral-content-templates.md add a new template type.
Troubleshooting
Common Issues
Issue 1: WeChat publishing failed
- Check network connection
- Confirm the API address is correct:
http://39.108.254.228:8002/publish-draft - Check the returned error message
Issue 2: Publishing to other platforms is yet to be implemented
- In
scripts/publish.pyconfigure the API address of the corresponding platform - Refer to each platform's official documentation to learn about the API specifications
Issue 3: Image search failed
- Check network connection
- Confirm the Unsplash service is available
Changelog
v1.0.0 (2024)
- Initial version release
- Support one-click publishing to WeChat Official Account
- Support image search
- Support topic filtering
- Provide a multi-platform publishing framework