xiaohongshu

zhjiang22/openclaw-xhs · updated May 28, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/zhjiang22/openclaw-xhs --skill xiaohongshu
0 commentsdiscussion
summary

Search, analyze, and interact with Xiaohongshu (RedNote) content through a unified MCP interface.

  • Search notes by keyword with filters (sort, note type, publish time, location); retrieve homepage recommendations and user profiles with associated note lists
  • Extract complete post details including text, images, interaction metrics, and comment threads; post comments, reply to comments, like, and favorite posts
  • Publish image or video notes with titles, captions, tags, and optional sched
skill.md

小红书 MCP Skill

基于 xiaohongshu-mcp 封装的 shell 脚本工具集。

前置条件

cd scripts/
./install-check.sh    # 检查依赖(xiaohongshu-mcp、jq、python3)
./start-mcp.sh        # 启动 MCP 服务(默认端口 18060)
./status.sh           # 确认已登录

未登录时需扫码:mcp-call.sh get_login_qrcode 获取二维码,用小红书 App 扫码。

服务端口可通过 MCP_URL 环境变量覆盖(默认 http://localhost:18060/mcp)。

核心数据流

重要: 大多数操作需要 feed_id + xsec_token 配对。这两个值从搜索/推荐/用户主页结果中获取,不可自行构造

search_feeds / list_feeds / user_profile
  返回 feeds 数组,每个 feed 包含:
  ├── id          → 用作 feed_id
  ├── xsecToken   → 用作 xsec_token
  └── noteCard    → 标题、作者、封面、互动数据
  get_feed_detail(feed_id, xsec_token)
  返回完整笔记: 正文、图片列表、评论列表
  评论中包含 comment_id、user_id(用于回复评论)

脚本参考

脚本 用途 参数
search.sh <关键词> 搜索笔记 关键词
recommend.sh 首页推荐
post-detail.sh <feed_id> <xsec_token> 帖子详情+评论 从搜索结果获取
comment.sh <feed_id> <xsec_token> <内容> 发表评论 从搜索结果获取
user-profile.sh <user_id> <xsec_token> 用户主页+笔记 从搜索结果获取
track-topic.sh <话题> [选项] 热点分析报告 --limit N --output file --feishu
export-long-image.sh 帖子导出长图 --posts-file json -o output.jpg
mcp-call.sh <tool> [json_args] 通用 MCP 调用 见下方工具表
start-mcp.sh 启动服务 --headless=false --port=N
stop-mcp.sh 停止服务
status.sh 检查登录
install-check.sh 检查依赖

MCP 工具详细参数

search_feeds — 搜索笔记

{"keyword": "咖啡", "filters": {"sort_by": "最新", "note_type": "图文", "publish_time": "一周内"}}

filters 可选字段:

  • sort_by: 综合 | 最新 | 最多点赞 | 最多评论 | 最多收藏
  • note_type: 不限 | 视频 | 图文
  • publish_time: 不限 | 一天内 | 一周内 | 半年内
  • search_scope: 不限 | 已看过 | 未看过 | 已关注
  • location: 不限 | 同城 | 附近

get_feed_detail — 帖子详情

{"feed_id": "...", "xsec_token": "...", "load_all_comments": true, "limit": 20}
  • load_all_comments: false(默认) 返回前10条,true 滚动加载更多
  • limit: 加载评论上限(仅 load_all_comments=true 时生效),默认 20
  • click_more_replies: 是否展开二级回复,默认 false
  • reply_limit: 跳过回复数超过此值的评论,默认 10
  • scroll_speed: slow | normal | fast

post_comment_to_feed — 发表评论

{"feed_id": "...", "xsec_token": "...", "content": "写得真好!"}

reply_comment_in_feed — 回复评论

{"feed_id": "...", "xsec_token": "...", "content": "谢谢!", "comment_id": "...", "user_id": "..."}

comment_iduser_id 从 get_feed_detail 返回的评论列表中获取。

user_profile — 用户主页

{"user_id": "...", "xsec_token": "..."}

user_id 从 feed 的 noteCard.user.userId 获取,xsec_token 使用该 feed 的 xsecToken

like_feed — 点赞/取消

{"feed_id": "...", "xsec_token": "..."}
{"feed_id": "...", "xsec_token": "...", "unlike": true}

favorite_feed — 收藏/取消

{"feed_id": "...", "xsec_token": "..."}
{"feed_id": "...", "xsec_token": "...", "unfavorite": true}

publish_content — 发布图文

{"title": "标题(≤20字)", "content": "正文(≤1000字)", "images": ["/path/to/img.jpg"], "tags": ["美食","旅行"]}
  • images: 至少1张,支持本地路径或 HTTP URL
  • tags: 可选,话题标签
  • schedule_at: 可选,定时发布(ISO8601,1小时~14天内)

publish_with_video — 发布视频

{"title": "标题", "content": "正文", "video": "/path/to/video.mp4"}

其他工具

工具 参数 说明
check_login_status 检查登录状态
list_feeds 获取首页推荐
get_login_qrcode 获取登录二维码(Base64 PNG)
delete_cookies 删除 cookies,重置登录

热点跟踪

自动搜索 → 拉取详情 → 生成 Markdown 报告。

./track-topic.sh "DeepSeek" --limit 5
./track-topic.sh "春节旅游" --limit 10 --output report.md
./track-topic.sh "iPhone 16" --limit 5 --feishu    # 导出飞书

报告包含:概览统计、热帖详情(正文+热评)、评论关键词、趋势分析。

长图导出

将帖子导出为白底黑字的 JPG 长图。

./export-long-image.sh --posts-file posts.json -o output.jpg

posts.json 格式:

[{
  "title": "标题", "author": "作者", "stats": "1.3万赞",
  "desc": "正文摘要", "images": ["https://..."],
  "per_image_text": {"1": "第2张图的说明"}
}]

依赖:Python 3.10+、Pillow。

注意事项

  • Cookies 有效期约 30 天,过期需重新扫码
  • 首次启动会下载 headless 浏览器(~150MB)
  • 同一账号避免多客户端同时操作
  • 发布限制:标题≤20字符,正文≤1000字符,日发布≤50条
  • Linux 服务器无桌面环境需安装 xvfb(apt-get install xvfb,脚本自动管理)
how to use xiaohongshu

How to use xiaohongshu on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add xiaohongshu
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/zhjiang22/openclaw-xhs --skill xiaohongshu

The skills CLI fetches xiaohongshu from GitHub repository zhjiang22/openclaw-xhs and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/xiaohongshu

Reload or restart Cursor to activate xiaohongshu. Access the skill through slash commands (e.g., /xiaohongshu) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.635 reviews
  • Chaitanya Patil· Dec 24, 2024

    xiaohongshu has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Noah Jain· Dec 12, 2024

    Registry listing for xiaohongshu matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Kiara White· Dec 8, 2024

    xiaohongshu is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Soo Flores· Dec 4, 2024

    Useful defaults in xiaohongshu — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Nia Taylor· Nov 27, 2024

    Keeps context tight: xiaohongshu is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Piyush G· Nov 15, 2024

    xiaohongshu reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Ira Robinson· Oct 18, 2024

    I recommend xiaohongshu for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Shikha Mishra· Oct 6, 2024

    We added xiaohongshu from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Soo Diallo· Oct 2, 2024

    Solid pick for teams standardizing on skills: xiaohongshu is focused, and the summary matches what you get after install.

  • Ira Martinez· Sep 25, 2024

    We added xiaohongshu from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

showing 1-10 of 35

1 / 4