SuperAPI AI Directory

wechatsync-publisher

Office & productivity

View repository

Updated 10-15 19:56

About this skill

Multi-Platform Content Publishing Assistant

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

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:

  1. 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)
  2. Generate main content(suggest using WeChat Official Account as the primary):

  3. 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
  4. 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:

  1. Automatic topic selection: the agent generates a topic based on current hot topics and the target audience
  2. Generate content: by default, generate an illustrated viral WeChat Official Account article
  3. Search cover: automatically search for a cover image based on title keywords
  4. 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:

  1. Generate main content: with WeChat Official Account as the primary, generate in-depth content (1500-3000 words, HTML format)
  2. 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)
  3. 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:

  1. Generate content: Agent generates content
  2. Preview and review: User provides review feedback
  3. Adjust and optimize: Adjust content based on feedback
  4. 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

Precautions

Publishing specifications

  1. Clean output: Does not include author information or production information (such as "COZE production", "AI assistant", etc.)
  2. Layout quality:
    • WeChat: strictly follow the HTML layout guide, underline density not exceeding 20%
    • Other platforms: comply with each platform's format requirements
  3. Cover specifications:
    • WeChat: 2.35:1 ratio (recommended 1600x680px)
    • Xiaohongshu: 3:4 vertical screen
    • Other platforms: 16:9 ratio

Content quality

  1. Originality: Ensure content is original or cite the source
  2. Accuracy: Data and citations must be accurate and reliable
  3. Value: Provide valuable information and insights

Platform Limitations

  1. WeChat Official Account: API is configured and ready to use
  2. Other Platforms: Need to be in scripts/publish.py configure 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:

  1. Agent generates topic and content
  2. Call scripts/search_images.py to search for cover images
  3. Call scripts/publish.py to 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:

  1. Call scripts/filter_topics.py to filter topics
  2. Agent generates content based on the filtering results
  3. Call scripts/publish.py to 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:

  1. Agent generates the main content (HTML format)
  2. Agent converts it to each platform's format (Markdown/plain text)
  3. Call scripts/publish.py in 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:

  1. Scheduled Topic Selection: Automatically fetch trending topics and filter topics daily
  2. AI Content Generation: Automatically generate content based on the topic
  3. 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.py configure 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