SuperAPI AI Directory

wechat-hotspot-publisher

Frontend & websites

View repository

Updated 10-15 19:56

About this skill

Multi-Platform AI Hot Topic Publishing Assistant

Task Objective

  • This Skill is used to: automatically generate content from hot topics and publish it to multiple platforms
  • Supported platforms:
    • WeChat Official Accounts: Publish image-text content to the draft box (supports material upload)
    • Xiaohongshu: Publish image-text notes
    • Bilibili: Publish column articles
  • Capabilities include:
    • The agent generates a hot topic list based on keywords
    • AI creates content that matches the tone of each platform
    • Generate HTML layouts that match Xiumi templates
    • Intelligent topic selection screening system (10-point scoring)
    • Supports one-click publishing to supported platforms (draft box mode)
  • Trigger condition: the user needs to publish content on multiple platforms and quickly create based on hot topics

Prerequisites

  • Dependency notes:
    # scripts脚本所需的依赖
    requests==2.31.0
    

Operation Steps

Standard Process

Important Note: This skill supports the "generate a preview first, publish after satisfaction" mode. The hot topic collection and content generation stages require no configuration at all.

Stage 1: Content Generation (No Configuration Required)

Default Mode Description: If the user has no special requirements, by default generatea viral WeChat Official Account article with rich text and images。

  1. Select Publishing Platform(Optional)

    • If the user does not specify a platform, the default isWeChat Official Accounts
    • If the user specifies another platform, generate content according to the platform's requirements
    • Supported platforms: WeChat Official Accounts, Xiaohongshu, Bilibili (multiple selections allowed)
    • Different platforms have different content style requirements:
      • WeChat Official Accounts: In-depth long-form article, 1200-2000 words, professional and rigorous
      • Xiaohongshu: Image-text note, 800-1200 words, lively and attractive
      • Bilibili: Column article, 1000-1800 words, technical or in-depth analysis
  2. Determine Content Direction(No configuration required)

    • The agent asks the user for keywords of interest (such as: AI, quantitative trading, new energy, etc.)
    • The agent generates a list of 5-10 related hot topics based on the keywords
    • The user selects topics of interest

    Enhanced Feature: Intelligent topic selection screening

    • Supports an intelligent scoring system (10-point scale): popularity (4 points) + controversy (2 points) + value (3 points) + relevance (1 point)
    • Automatically screen high-quality topics with a score of ≥7
    • The agent will call scripts/filter_topics.py to perform scoring
  3. Generate Complete Content(No configuration required)

    • The agent generates complete content containing the following elements based on the selected hot topics and target platform:

    3.1 Title Generation:

    3.2 Cover image (2.35:1):

    • Call scripts/search_images.py --query "关键词" --cover to search for matching images
    • Cover image ratio: 2.35:1 (standard ratio for WeChat Official Accounts)
    • Recommended image size: 1080x459 pixels (standard for WeChat Official Account covers)

    3.3 In-article images (3-5 images):

    • Call scripts/search_images.py --query "关键词" to search for 3-5 high-quality images
    • Insert the images into appropriate positions in the article according to the content logic
    • Each image includes a short description (HTML format)

    3.4 Trending hashtags:

    • Automatically extract 3-5 trending hashtags based on the article content
    • Format: #Tag1 #Tag2 #Tag3 (HTML format, placed at the end of the article)

    3.5 HTML formatting:

    • Strictly follow references/html-layout-guide.md formatting specifications
    • Structural hierarchy: clear primary, secondary, and tertiary headings
    • Partial underlining: underline only key phrases/core information, do not highlight entire sentences/paragraphs
    • Color specifications: light yellow (#fff3cd), light green (#d4edda), light red (#f8d7da), light blue (#e8f4f8), light purple (#f3e5f5), light orange (#fff8e1)
    • Underlining density: no more than 20% of the full text

    3.6 Content style(viral article):

    • Refer to references/viral-content-templates.md viral style templates
    • High-value practical type: starts with a number, list structure, highly practical
    • Sharp opinion type: counterintuitive, clear viewpoint, sparks discussion
    • Trending commentary type: quick response, unique angle
    • Story insight type: specific scenes, plot twists, memorable closing lines
    • Technical analysis type: breaking down principles, explaining in simple terms, using analogies

    3.7 Formatting requirements:

    • Previewable and copyable: generate complete HTML format that can be directly previewed and copied
    • No author information: do not add author names, author introductions, etc.
    • No production information: do not add "COZE production", "AI assistant", or similar wording
    • Clean output: includes only the article title, cover, body content, and hashtags
  4. Preview and adjustment(no configuration required)

    • Display the complete generated article (HTML format) to the user
    • Includes: title, cover image, in-article images (3-5), trending hashtags, body content
    • HTML format can be directly previewed and copied
    • Users can request adjustments to the title, content, images, or formatting
    • Users can make adjustments multiple times until fully satisfied
    • At this stage, users can choose:
      • Continue adjusting the content
      • Push directly to the WeChat Official Account drafts (recommended)
      • Manually copy the HTML content to the WeChat Official Account backend

Stage 2: One-click push (recommended)

WeChat publishing workflow:

Custom interface push (recommended)

This method uses your custom interface, requires no WeChat official account credentials to be configured, and the IP whitelist has already been added.

Direct push (command-line mode):

python scripts/publish_wechat.py --mode custom_api \
  --title "文章标题" \
  --content "HTML内容" \
  --cover "封面图片URL" \
  --tags "AI,工具,效率"
  • Parameter description:
    • --title: Article title
    • --content: Article content (HTML format)
    • --cover: Cover image URL
    • --tags: Tag array (comma-separated)
    • --api-url: Custom interface URL (default:http://39.108.254.228:8002/publish-draft)
  • Returns: push result (including draft ID)

Push from JSON file:

python scripts/publish_wechat.py --mode custom_api --json-file "output.json"
  • JSON file format:
{
  "title": "文章标题",
  "content": "<html>...</html>",
  "cover_url": "封面图片URL",
  "tags": ["AI", "工具", "效率"]
}

Interface advantages:

  • ✅ No need to configure WeChat official account credentials
  • ✅ No need to manually upload materials
  • ✅ Automatically handle cover, content, and tags
  • ✅ Push directly to the draft box
  • ✅ The IP whitelist has already been added, safe and reliable

Post-push operations:

  • Log in to the WeChat official account backend's "Draft Box" to view
  • Can be further edited, previewed, or published
  • Safe mode: it will not be published online directly and requires manual confirmation

Official API publishing (backup method, requires access_token)

If you need to use the official API, you can use the following method:

Complete workflow:

python scripts/publish_wechat.py --mode workflow \
  --title "文章标题" \
  --content "HTML内容" \
  --cover "封面图片路径"
  • ✅ Automatically handle cover, content, and tags
  • ✅ Push directly to the draft box

Post-publishing operations:

  • Log in to the WeChat official account backend's "Draft Box" to view
  • Can be further edited, previewed, or published
  • Safe mode: it will not be published online directly and requires manual confirmation

Xiaohongshu publishing:

python scripts/publish_xiaohongshu.py \
  --title "标题" \
  --content "内容" \
  --images "图片1,图片2"

Bilibili publishing:

python scripts/publish_bilibili.py \
  --title "标题" \
  --content "内容"

Optional branches

Branch A: Manual publishing mode

  • When the user chooses manual publishing, after the agent generates the complete content:
    • Call scripts/copy_to_clipboard.py to copy the content to the clipboard
    • Guide the user to manually paste it into each platform's backend
    • Suitable for scenarios that require fine adjustments

Branch B: Xiumi template mode

  • When the user needs to use a Xiumi template:
    • The agent generates HTML that conforms to the Xiumi structure
    • The user can manually paste it into the Xiumi editor
    • Use Xiumi preset templates for final beautification

Resource index

Required scripts

  • scripts/publish_wechat.py

    • Purpose: WeChat official account draft box publishing (enhanced version)
    • Features:
      • Material upload, draft creation, complete workflow (official API)
      • Custom interface push (recommended): No credentials required, push directly to your interface
    • Modes:
      • workflow: Complete workflow (upload cover → create draft)
      • upload_cover: Upload cover
      • create_draft: Create draft
      • custom_api:Custom interface push (recommended)
  • scripts/filter_topics.py

    • Purpose: Intelligent topic scoring and screening
    • Features: 10-point scoring, screen high-quality topics
  • scripts/search_images.py

    • Purpose: Unsplash image search
    • Features: Search cover images and in-content illustrations
  • scripts/copy_to_clipboard.py

    • Purpose: Clipboard copy
    • Function: Copy content to the system clipboard for manual publishing
  • scripts/publish_xiaohongshu.py

    • Purpose: Publishing image-and-text notes on Xiaohongshu
  • scripts/publish_bilibili.py

    • Purpose: Publishing articles on Bilibili专栏

Domain References

  • references/viral-content-templates.md

    • When to read: When generating viral-style content
    • Content: 5 viral content style templates (high-value practical tips, sharp viewpoints, trending commentary, story insights, technical analysis)
  • references/html-layout-guide.md

    • When to read: When generating HTML layout
    • Content: Complete HTML layout specifications, including structural hierarchy, local underlining, color specifications, and Xiumi template adaptation
  • references/sources-config.md

    • When to read: When configuring subscription feeds
    • Content: Automated workflow configuration instructions

Notes

Default mode (when there are no special requirements)

When the user has no special requirements, the agent should generate content in the following default mode:

1. Platform selection:

  • Default platform: WeChat Official Account
  • Default format: Viral article with images and text

2. Content elements:

  • Title: Viral style, eye-catching
  • Cover image: 2.35:1 ratio, high-quality image
  • In-text images: 3-5, inserted in appropriate positions
  • Trending tags: 3-5, placed at the end of the article
  • HTML layout: Previewable and copyable, clear structure

3. Layout requirements:

  • Structural hierarchy: Level 1, 2, and 3 headings
  • Local underlining: Underline only key phrases, no more than 20% of the full text
  • Color specifications: Light tones (light yellow, light green, light red, light blue, light purple, light orange)
  • Clean output: Does not include author information, production information, etc.

4. Output format:

  • Complete HTML format
  • Can be previewed directly in a browser
  • Can be copied directly to the WeChat Official Account backend

Security principles

  • Draft box first: WeChat Official Account publishing saves to the draft box by default and will not publish directly online
  • Manual confirmation: All automatic publishing operations require user confirmation
  • Step-by-step operations: Supports step-by-step operations (first upload materials, then create a draft)

Layout specifications

  • Local underlining: Underline only key phrases/core information, do not highlight entire sentences/paragraphs
  • Color limits: Underlining density must not exceed 20% of the full text
  • Clear structure: Ensure clear heading hierarchy and clear content logic

Image processing

  • Cover ratio: Must use a 2.35:1 ratio (1080x459 pixels)
  • Image quality: Use high-quality images, avoid blurriness
  • Copyright notice: Use free image libraries such as Unsplash

Agent capabilities

  • Content creation: Titles, body text, and tags are generated by the agent
  • HTML layout: The agent generates HTML code according to the guidelines
  • Topic selection screening: The agent judges the quality of topic selections

Technical capabilities

  • Material upload: The script is responsible for uploading images to WeChat Official Account
  • Draft creation: The script is responsible for saving the article to the drafts box
  • Image Search: The script is responsible for searching for suitable accompanying images

Usage Examples

Example 1: Complete WeChat Publishing Workflow

# 1. 生成内容(智能体完成)
# 2. 上传封面
python scripts/publish_wechat.py --mode upload_cover --cover "https://example.com/cover.jpg"

# 3. 创建草稿(使用返回的media_id)
python scripts/publish_wechat.py --mode create_draft \
  --title "AI时代的内容创作指南" \
  --content "<html>...</html>" \
  --media-id "MEDIA_ID_FROM_STEP_2" \
  --author "智能助手"

Example 2: Publish in One Step

python scripts/publish_wechat.py --mode workflow \
  --title "AI时代的内容创作指南" \
  --content "<html>...</html>" \
  --cover "https://example.com/cover.jpg" \
  --author "智能助手" \
  --digest "本文介绍如何利用AI工具提升内容创作效率"

Example 3: Topic Selection Screening

python scripts/filter_topics.py \
  --topics "AI技术,ChatGPT应用,大模型训练,AGI发展" \
  --keyword "AI"

Returns: The screened topic list (≥7 points)

Example 4: Image Search

# 搜索封面图
python scripts/search_images.py --query "AI technology" --cover

# 搜索内文配图
python scripts/search_images.py --query "写作效率"

Frequently Asked Questions

Q1: How do I use WeChat Official Account credentials?

  • This skill uses WeChatOfficialAccount authorization
  • You need to provide the AppID and AppSecret
  • The system automatically manages the access_token

Q2: Why use the drafts box mode?

  • Avoid publishing directly online
  • Allows manual preview and adjustment
  • Ensures content quality and accuracy

Q3: How do I use Xiumi templates?

  • The agent generates HTML that conforms to the Xiumi structure
  • Manually paste it into the Xiumi editor
  • Use preset templates for beautification

Q4: What should I do if an image cannot be found?

  • Call the image search API
  • If it cannot be found, provide a placeholder image or a text-to-image prompt
  • Users can manually generate images

Q5: How do I ensure layout standards?

  • Strictly follow html-layout-guide.md
  • The agent automatically generates HTML that conforms to the standards
  • Supports preview and adjustment

Q6: Which platforms are supported?

  • WeChat Official Account (Drafts Box)
  • Xiaohongshu (Image-Text Notes)
  • Bilibili (Column Articles)