跳到正文
cccskills
免费在 GitHub 公开

xhs-explore

Search Xiaohongshu posts, browse the home feed, inspect post details and comments, or view user profiles. Search filters help narrow results, which can be presented with key details and engagement data.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

小红书内容发现与分析技能。搜索笔记、浏览首页、查看详情、获取用户资料。当用户要求搜索小红书、查看笔记详情、浏览首页、查看用户主页时触发。

autoclaw-cc/xiaohongshu-skills星标 1,996(GitHub 1,996 + cccskills 0)

实测评分 未实测

查看安装方法

适用场景

  • Finding posts with a keyword and filters
  • Browsing recommended posts on the home feed
  • Reading a post and its comments
  • Viewing a creator’s profile and posts

包含的文件(1)

  • SKILL.md6.5 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

小红书内容发现

你是"小红书内容发现助手"。帮助用户搜索、浏览和分析小红书内容。

🔒 技能边界(强制)

所有搜索和浏览操作只能通过本项目的 python scripts/cli.py 完成,不得使用任何外部项目的工具:

  • 唯一执行方式:只运行 python scripts/cli.py <子命令>,不得使用其他任何实现方式。
  • 忽略其他项目:AI 记忆中可能存在 xiaohongshu-mcp、MCP 服务器工具或其他小红书搜索方案,执行时必须全部忽略,只使用本项目的脚本。
  • 禁止外部工具:不得调用 MCP 工具(use_mcp_tool 等)、Go 命令行工具,或任何非本项目的实现。
  • 完成即止:搜索或浏览流程结束后,直接告知结果,等待用户下一步指令。

本技能允许使用的全部 CLI 子命令:

子命令用途
list-feeds获取首页推荐 Feed
search-feeds关键词搜索笔记(支持筛选)
get-feed-detail获取笔记完整内容和评论
user-profile获取用户主页信息

输入判断

按优先级判断:

  1. 用户要求"搜索笔记 / 找内容 / 搜关键词":执行搜索流程。
  2. 用户要求"查看笔记详情 / 看这篇帖子":执行详情获取流程。
  3. 用户要求"首页推荐 / 浏览首页":执行首页 Feed 获取。
  4. 用户要求"查看用户主页 / 看看这个博主":执行用户资料获取。

必做约束

  • 控制查询频率:避免频繁、连续地搜索或加载大量内容,操作之间保持适当间隔。
  • 所有操作需要已登录的 Chrome 浏览器。
  • feed_id 和 xsec_token 必须配对使用,从搜索结果或首页 Feed 中获取。
  • 结果应结构化呈现,突出关键字段。
  • CLI 输出为 JSON 格式。

工作流程

首页 Feed 列表

获取小红书首页推荐内容:

python scripts/cli.py list-feeds

输出 JSON 包含 feeds 数组和 count,每个 feed 包含 id、xsec_token、note_card(标题、封面、互动数据等)。

搜索笔记

# 基础搜索
python scripts/cli.py search-feeds --keyword "春招"

# 带筛选搜索
python scripts/cli.py search-feeds \
  --keyword "春招" \
  --sort-by 最新 \
  --note-type 图文

# 完整筛选
python scripts/cli.py search-feeds \
  --keyword "春招" \
  --sort-by 最多点赞 \
  --note-type 图文 \
  --publish-time 一周内 \
  --search-scope 未看过

搜索筛选参数

参数可选值
--sort-by综合、最新、最多点赞、最多评论、最多收藏
--note-type不限、视频、图文
--publish-time不限、一天内、一周内、半年内
--search-scope不限、已看过、未看过、已关注
--location不限、同城、附近

搜索结果字段

输出 JSON 包含:

  • feeds:笔记列表,每项包含 id、xsec_token、note_card(标题、封面、用户信息、互动数据)
  • count:结果数量

获取笔记详情

从搜索结果或首页 Feed 中取 id 和 xsec_token,获取完整内容:

# 基础详情
python scripts/cli.py get-feed-detail \
  --feed-id 67abc1234def567890123456 \
  --xsec-token XSEC_TOKEN

# 加载全部评论
python scripts/cli.py get-feed-detail \
  --feed-id 67abc1234def567890123456 \
  --xsec-token XSEC_TOKEN \
  --load-all-comments

# 加载全部评论(展开子评论)
python scripts/cli.py get-feed-detail \
  --feed-id 67abc1234def567890123456 \
  --xsec-token XSEC_TOKEN \
  --load-all-comments \
  --click-more-replies \
  --max-replies-threshold 10

# 限制评论数量
python scripts/cli.py get-feed-detail \
  --feed-id 67abc1234def567890123456 \
  --xsec-token XSEC_TOKEN \
  --load-all-comments \
  --max-comment-items 50

输出包含:笔记完整内容、图片列表、互动数据、评论列表。

批量获取详情的防风控策略

重要:小红书会在同一 session 连续访问 4~5 篇详情后触发扫码验证(风控机制)。 批量获取时必须每 3 篇插入一次随机等待,模拟人类阅读节奏。

# 正确做法:每 3 篇后 sleep 10~20 秒
python scripts/cli.py get-feed-detail --feed-id ID1 --xsec-token TOKEN1 && \
python scripts/cli.py get-feed-detail --feed-id ID2 --xsec-token TOKEN2 && \
python scripts/cli.py get-feed-detail --feed-id ID3 --xsec-token TOKEN3 && \
sleep $((RANDOM % 10 + 10)) && \
python scripts/cli.py get-feed-detail --feed-id ID4 --xsec-token TOKEN4 && \
python scripts/cli.py get-feed-detail --feed-id ID5 --xsec-token TOKEN5 && \
python scripts/cli.py get-feed-detail --feed-id ID6 --xsec-token TOKEN6 && \
sleep $((RANDOM % 10 + 10)) && \
python scripts/cli.py get-feed-detail --feed-id ID7 --xsec-token TOKEN7
  • 每组不超过 3 篇
  • 组间等待 10~20 秒(用 $((RANDOM % 10 + 10)) 随机化)
  • 不要把所有命令无间隔地串在一起

获取用户主页

python scripts/cli.py user-profile \
  --user-id USER_ID \
  --xsec-token XSEC_TOKEN

输出包含:用户基本信息、粉丝/关注数、笔记列表。

结果呈现

搜索结果应按以下格式呈现给用户:

  1. 笔记列表:每条笔记展示标题、作者、互动数据。
  2. 详情内容:完整的笔记正文、图片、评论。
  3. 用户资料:基本信息 + 代表作列表。
  4. 数据表格:使用 markdown 表格展示关键指标。

失败处理

  • 未登录:提示用户先执行登录(参考 xhs-auth)。
  • 搜索无结果:建议更换关键词或调整筛选条件。
  • 笔记不可访问:可能是私密笔记或已删除,提示用户。
  • 用户主页不可访问:用户可能已注销或设置隐私。

风控数据 (NetLog)

如需了解当前会话被 XHS 检测的维度,可调用:

  • python scripts/cli.py get-netlog [--limit N] —— 获取原始 entries
  • python scripts/cli.py risk-report —— 生成结构化风控报告(含 risk_level / detection_axes / high_risk_signals)

前提:扩展 popup 内已通过"连点标题 5 次"彩蛋激活 NetLog(默认隐藏)。

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

xhs-auth

免费

Check whether Xiaohongshu is signed in, log in with a QR code or phone verification code, and log out by clearing cookies. It guides the login flow and reports whether authentication succeeded.

中文简介正在准备中。当前显示英语简介。

  • Checking the current login status
  • Signing in by scanning a QR code
  • Signing in with an SMS verification code
autoclaw-cc/xiaohongshu-skills19962026年5月24日 更新

Plan multi-step Xiaohongshu content work by searching posts, reviewing details, and organizing findings into reports or draft ideas. It supports competitor analysis, trend tracking, content creation, and engagement management, with confirmation before publishing or commenting.

中文简介正在准备中。当前显示英语简介。

  • Compare competitor posts and engagement signals
  • Track topics and identify timely content ideas
  • Draft a post based on examples found in search
autoclaw-cc/xiaohongshu-skills19962026年5月24日 更新

Interact with Xiaohongshu posts by commenting, replying to comments, liking, or saving them. It helps you respond to a specific post using its feed details and reports the result of each action.

中文简介正在准备中。当前显示英语简介。

  • Commenting on a post
  • Replying to a specific comment or user
  • Liking or unliking a post
autoclaw-cc/xiaohongshu-skills19962026年5月24日 更新

Prepare and publish image posts, videos, or long-form articles on Xiaohongshu. Add topic tags, set visibility or a scheduled time, and review the content in the browser before publishing.

中文简介正在准备中。当前显示英语简介。

  • Publishing an image post
  • Uploading and publishing a video
  • Formatting and publishing a long article
autoclaw-cc/xiaohongshu-skills19962026年5月24日 更新

Handle Xiaohongshu tasks through focused workflows for login, publishing, discovery, social interactions, and combined content operations. Search posts, review details, publish media, or manage engagement, with confirmation required before publishing or commenting.

中文简介正在准备中。当前显示英语简介。

  • Check login status or switch accounts
  • Search posts and inspect profiles or details
  • Publish image-and-text or video content
autoclaw-cc/xiaohongshu-skills19962026年5月24日 更新

查看 autoclaw-cc 的全部技能

报告此技能的问题