SuperAPI AI Directory

xiaohongshu-workflow

Marketing & growth

View repository

Updated 10-15 08:08

About this skill

Xiaohongshu Full-Process Operations Workflow

Based on xiaohongshu-mcp A complete operations workflow built with .

Workflow Decision Tree

用户请求
├── 配置/登录 → 【账号配置】
├── 发布内容 → 【内容发布】
├── 搜索/监控 → 【热点追踪】
├── 互动管理 → 【互动管理】
└── 数据分析 → 【数据分析】

1. Account Configuration

1.1 Install MCP Service

# 下载 xiaohongshu-mcp(Linux x64)
wget https://github.com/xpzouying/xiaohongshu-mcp/releases/latest/download/xiaohongshu-mcp-linux-amd64.tar.gz
wget https://github.com/xpzouying/xiaohongshu-mcp/releases/latest/download/xiaohongshu-login-linux-amd64.tar.gz

# 解压到 ~/.local/bin
mkdir -p ~/.local/bin
tar -xzf xiaohongshu-mcp-*.tar.gz -C ~/.local/bin/
tar -xzf xiaohongshu-login-*.tar.gz -C ~/.local/bin/

# 重命名并添加执行权限
cd ~/.local/bin
mv xiaohongshu-mcp-* xiaohongshu-mcp
mv xiaohongshu-login-* xiaohongshu-login
chmod +x xiaohongshu-mcp xiaohongshu-login

1.2 Log In to Obtain Cookies

Method 1: Local Desktop Environment

xiaohongshu-login  # 打开浏览器,用小红书 App 扫码登录

Method 2: Linux Server (No Desktop)

Obtain cookies on a local computer (Windows/Mac):

# 下载 Windows 版本
wget https://github.com/xpzouying/xiaohongshu-mcp/releases/latest/download/xiaohongshu-login-windows-amd64.zip
unzip xiaohongshu-login-windows-amd64.zip

# 运行登录
.\xiaohongshu-login-windows-amd64.exe
# Cookies 保存在 C:\Users\<用户名>\AppData\Local\Temp\cookies.json

# 复制到服务器
scp /mnt/c/Users/<用户名>/AppData/Local/Temp/cookies.json user@server:~/.xiaohongshu/

1.3 Start MCP Service

# 启动服务(headless 模式)
xiaohongshu-mcp

# 检查状态
curl http://localhost:18060/mcp

# 查看日志
tail -f ~/.xiaohongshu/mcp.log

1.4 Configure to OpenClaw

Link the skill directory to the OpenClaw workspace:

ln -s /path/to/xiaohongshu-workflow ~/.openclaw/workspace/skills/xiaohongshu-workflow

2. Content Publishing

2.1 Publishing Process

策划主题 → 收集素材 → 撰写内容 → 生成图片 → 发布 → 监控

2.2 Content Specifications

Item Limit
Title ≤20 characters
Body ≤1000 characters
Images Up to 18 images
Video ≤15 minutes
Daily Publishing ≤50 posts

2.3 Publish Image-Text Notes

Use the MCP tool publish_content:

# 通过脚本调用
./scripts/publish.sh \
  --title "标题" \
  --content "正文内容" \
  --images "/path/to/image1.jpg,/path/to/image2.jpg" \
  --tags "标签1,标签2"

Python call example:

import requests

def publish_note(title, content, images, tags=None):
    """发布小红书图文笔记"""
    payload = {
        "title": title,
        "content": content,
        "images": images,  # 图片路径列表
        "tags": tags or []
    }
    
    response = requests.post(
        "http://localhost:18060/mcp",
        json={"tool": "publish_content", "params": payload}
    )
    return response.json()

2.4 Content Strategy

Publishing topic types:

  1. Tutorial type: Usage guides, tips sharing
  2. Case type: Practical applications, success stories
  3. Trend type: Industry news, trend analysis
  4. Interactive type: Q&A, polls, call for submissions

Best publishing times:

  • Weekdays: 9:00-11:00, 18:00-20:00
  • Weekends: 10:00-12:00, 19:00-21:00

Content quality principles:

  • Eye-catching titles (numbers, questions, exclamations)
  • The first image determines the click-through rate
  • Concise and valuable body text
  • Accurate and comprehensive tags

3. Trend Tracking

3.1 Search Content

# 通过脚本搜索
./scripts/search.sh "关键词" --limit 20

# MCP 调用
curl -X POST http://localhost:18060/mcp \
  -H "Content-Type: application/json" \
  -d '{"tool": "search_feeds", "params": {"keyword": "关键词", "limit": 20}}'

3.2 Trend Report Generation

# 生成热点追踪报告
./scripts/track-topic.sh "话题" --limit 10 --output report.md

Report contents include:

  • Overview statistics (post count, like count, comment count)
  • Hot post details (title, author, body text, popular comments)
  • Hot keywords in the comment section
  • Trend analysis

3.3 Scheduled Monitoring

Configure OpenClaw Heartbeat for scheduled monitoring:

# 在 HEARTBEAT.md 中添加
## 小红书监控

**触发条件:** 每 4-6 小时

- [ ] 检查账号帖子表现
- [ ] 搜索相关话题动态
- [ ] 记录数据变化
- [ ] 发现热点时通知

4. Interaction Management

4.1 Get Post Details

./scripts/post-detail.sh <note_id> <xsec_token>

4.2 Post Comments

./scripts/comment.sh <note_id> <xsec_token> "评论内容"

4.3 Reply Strategy

Needs a reply:

  • Genuine questions
  • Technical inquiries
  • Feature suggestions
  • Usage issues

No reply needed:

  • Spam ads
  • Pure emojis
  • Meaningless comments
  • Repeated comments

Reply templates:

👋 感谢关注!

[针对问题简要回答]

📚 更多信息:
- 文档:[链接]
- 社区:[链接]

如有其他问题,欢迎继续交流!

5. Data Analysis

5.1 Monitoring Metrics

Metric Description Monitoring Frequency
Likes User recognition Daily
Saves Content value Daily
Comments Interaction activity Daily
Shares Reach Daily
Follower growth Account influence Weekly

5.2 Data recording format

{
  "history": [
    {
      "time": "2026-02-17 21:54:46",
      "post_id": "xxx",
      "title": "帖子标题",
      "liked_count": 0,
      "comment_count": 0,
      "collected_count": 2,
      "shared_count": 0
    }
  ]
}

5.3 Alert rules

  • Like spike: >100 in a short time
  • Comment spike: >50 in a short time
  • Save spike: >20 in a short time
  • Negative comments: negative keywords detected

6. Memory export

Export Xiaohongshu saves/likes as an AI-searchable knowledge base.

6.1 Install XHS-Downloader

git clone https://github.com/JoeanAmier/XHS-Downloader.git
cd XHS-Downloader
pip install -r requirements.txt

6.2 Extract saved links

  1. Install the Tampermonkey browser extension
  2. Install the userscript:XHS-Downloader.js
  3. Open the Xiaohongshu web version → Profile → Saves/Likes
  4. Click the Tampermonkey icon → Select extract links
  5. Paste into the links.md file

6.3 Batch download and export

# 复制工具脚本到 XHS-Downloader 目录
cp scripts/xhs-downloader/*.py /path/to/XHS-Downloader/

# 批量下载
python batch_download.py links.md

# 导出为 OpenClaw 记忆
python export_to_workspace.py
# 输出到 ~/.openclaw/workspace/xhs-memory/

6.4 Configure memory search

Edit ~/.openclaw/openclaw.json:

{
  "memorySearch": {
    "extraPaths": [
      "~/.openclaw/workspace/xhs-memory"
    ]
  }
}

7. Operations best practices

7.1 Content calendar

Day Content type Publish time
Monday Tutorial/Practical tips 9:00
Wednesday Case sharing 18:00
Friday Trend tracking 12:00
Sunday Interaction/Q&A 10:00

7.2 Account security

  • Avoid logging in on multiple devices at the same time
  • Use the mobile app only for viewing
  • Cookies are valid for about 30 days
  • Regularly check login status

7.3 Data-driven optimization

  1. Record the data for each post
  2. Analyze the characteristics of high-performing content
  3. Replicate successful patterns
  4. Continuously iterate and optimize

Resource directory

scripts/

Script Purpose
install-check.sh Check whether dependencies are installed
start-mcp.sh Start the MCP service
stop-mcp.sh Stop the MCP service
status.sh Check login status
search.sh Search content
recommend.sh Get recommendation list
post-detail.sh Get post details
comment.sh Post a comment
user-profile.sh Get user profile
publish.sh Publish image-text notes
track-topic.sh Trend tracking report

references/

Detailed reference documents:

  • api-reference.md - Complete MCP API reference
  • content-strategy.md - Content strategy guide
  • troubleshooting.md - Common problem solutions

assets/

Resource files:

  • templates/ - Content templates
  • images/ - Sample images

Notes

  1. First runwill download a headless browser (about 150MB)
  2. Publishing limits: title ≤20 characters, body ≤1000 characters, ≤50 posts per day
  3. Account security: Avoid simultaneous login on multiple devices; cookies expire in about 30 days
  4. Compliant use: Follow Xiaohongshu platform rules; do not publish violating content

Statement

This skill is built based on xiaohongshu-mcp and only provides API call encapsulation. Please comply with the Xiaohongshu platform terms of use.