Xhs Explore logo

Xhs Explore

OrganizationPopular
autoclaw-cc
xhs-explore

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

Overview

Publisherautoclaw-cc
Repositoryxiaohongshu-skills
Skill namexhs-explore
Stars
1.9K
Forks
236
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by autoclaw-cc on GitHub. Read the source before you install it.

Installation

Install the Xhs Explore AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/autoclaw-cc/xiaohongshu-skills.git /tmp/xiaohongshu-skills
mkdir -p .claude/skills
cp -r /tmp/xiaohongshu-skills/skills/xhs-explore .claude/skills/xhs-explore
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Xhs Explore in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Xhs Explore on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Xhs Explore is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

小红书内容发现

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

🔒 技能边界(强制)

所有搜索和浏览操作只能通过本项目的 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_idxsec_token 必须配对使用,从搜索结果或首页 Feed 中获取。
  • 结果应结构化呈现,突出关键字段。
  • CLI 输出为 JSON 格式。

工作流程

首页 Feed 列表

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

bash
python scripts/cli.py list-feeds

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

搜索笔记

bash
# 基础搜索
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:笔记列表,每项包含 idxsec_tokennote_card(标题、封面、用户信息、互动数据)
  • count:结果数量

获取笔记详情

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

bash
# 基础详情
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 篇插入一次随机等待,模拟人类阅读节奏。

bash
# 正确做法:每 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)) 随机化)
  • 不要把所有命令无间隔地串在一起

获取用户主页

bash
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(默认隐藏)。

Frequently asked questions

What does the Xhs Explore AI skill do?

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

Why use Xhs Explore on TypingMind?

Because you install it once and use it with any model. Xhs Explore is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Xhs Explore in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/autoclaw-cc/xiaohongshu-skills/tree/main/skills/xhs-explore. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Xhs Explore?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Xhs Explore?

As many as you like. As long as a model supports skills, you can use Xhs Explore with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Xhs Explore AI skill free?

Yes. It is published on GitHub by autoclaw-cc under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇