---
name: xhs
description: "小红书笔记搜索、创作者分析和内容趋势研究。当用户需要搜索小红书笔记（小红书/红书/XHS/种草/笔记）、查看小红书博主（博主/达人/KOL/创作者）、分析小红书内容（内容分析/爆款笔记）、或研究小红书市场趋势（小红书选品/什么好卖/种草趋势）时使用此技能。"
version: "1.0.0"
owner_repo: Optima-Chat/optima-scout
---

# 小红书 (XHS) - 笔记搜索与创作者分析

**开始前先加载 scout-intent skill 执行意图确认。** 平台已确定为小红书，只需确认目的和品类/关键词。

所有命令使用 `scout xhs` 前缀。

---

## 快速选择：我该用哪个命令？

| 你的目标 | 命令 | 说明 |
|---------|------|------|
| **搜产品/找灵感** | `search-notes "关键词"` | 搜索笔记，支持中英文关键词 |
| **分析某篇笔记** | `note-detail <noteId>` | 获取笔记详情（互动数据、标签等） |
| **看博主主页** | `user-profile <userId>` | 粉丝数、笔记数、获赞数 |
| **看博主作品** | `user-notes <userId>` | 博主发布的笔记列表 |

---

## 典型场景

当用户说：
- "小红书上搜一下XX" / "小红书什么火" → `scout xhs search-notes "XX"`
- "看看这个笔记" + noteId → `scout xhs note-detail <noteId>`
- "看看这个博主" + userId → `scout xhs user-profile <userId>`
- "这个博主发了什么" → `scout xhs user-notes <userId>`
- "小红书上XX好不好卖" → `scout xhs search-notes "XX"` 分析互动数据
- "找小红书达人" → `scout xhs search-notes "品类关键词"` 从高赞笔记找创作者

---

## URL 解析 - 小红书链接处理

用户可能贴小红书链接。**不要用 WebFetch**（会被登录墙拦截），按以下规则提取 ID：

| URL 特征 | 提取内容 | 调用命令 |
|----------|---------|---------|
| `xiaohongshu.com/explore/笔记ID` | note_id（末尾的十六进制字符串） | `scout xhs note-detail <noteId>` |
| `xiaohongshu.com/user/profile/用户ID` | user_id | `scout xhs user-profile <userId>` |
| `xhslink.com/短链接` | 无法直接提取，告知用户提供 note_id | — |

---

## 命令详情

### 搜索笔记 — `scout xhs search-notes`

```bash
scout xhs search-notes "瑜伽裤" --sort popularity_descending
```

**参数**（以 `scout xhs search-notes --help` 为准）：
- `关键词`（必填）：支持中英文
- `-p, --page <number>`：页码（默认 1，翻页用）
- `--sort <type>`：排序 —— `general`（综合，默认）| `time_descending`（最新）| `popularity_descending`（最热）
- `--note-type <type>`：笔记类型 —— `不限`（默认）| `视频笔记` | `普通笔记`
- `-f, --format`：`json`（默认）| `text`

> ⚠️ **每页数量不可调**：`search-notes` **没有** `--page-size` / `--limit` 参数（会报 `unknown option`）。每页数量固定，翻页用 `--page`（或换 `--sort` 角度）。

**返回数据**：
- `id` — 笔记 ID
- `title` — 标题
- `description` — 正文
- `type` — `image` 或 `video`
- `creator` — 作者（uid, username）
- `likes`, `comments`, `collects`, `shares` — 互动数据
- `url` — 笔记链接
- `hashtags` — 标签列表

### 笔记详情 — `scout xhs note-detail`

```bash
scout xhs note-detail 6489a2b0000000001e012345
```

### 用户主页 — `scout xhs user-profile`

```bash
scout xhs user-profile 5a1234567890abcdef012345
```

**返回数据**：
- `uid`, `username` — 用户基本信息
- `followers`, `following`, `totalNotes`, `totalLikes` — 数据概览
- `bio` — 简介
- `verified`, `verifyContent` — 认证状态
- `ipLocation` — IP 属地

### 用户笔记 — `scout xhs user-notes`

```bash
scout xhs user-notes 5a1234567890abcdef012345
```

**参数**（以 `scout xhs user-notes --help` 为准）：
- `userId`（必填）：小红书用户 ID
- `--cursor`：分页游标（翻页用；首次不传，用返回里的 cursor 取下一页）
- `-f, --format`：`json`（默认）| `text`

> ⚠️ **没有** `--num` / `--limit` 参数。返回数量由后端决定，翻页用 `--cursor`。

---

## 数据解读

### 互动数据指标

| 指标 | 爆款 | 优质 | 普通 | 低迷 |
|------|------|------|------|------|
| likes | >1万 | 1000-1万 | 100-1000 | <100 |
| collects | >5000 | 500-5000 | 50-500 | <50 |
| comments | >500 | 100-500 | 10-100 | <10 |

- **高赞 + 高收藏** = 内容有价值，用户想留存
- **高赞 + 低收藏** = 娱乐性内容，不够实用
- **低赞 + 高收藏** = 实用干货，用户默默收藏
- **收藏/点赞比 > 0.5** = 强购买意向信号（选品关键指标）

### 创作者评估

| 指标 | 头部达人 | 腰部达人 | 尾部达人 |
|------|---------|---------|---------|
| followers | >50万 | 1万-50万 | <1万 |
| totalNotes | >200 | 50-200 | <50 |

---

## 使用场景

### 场景 1：选品调研

```bash
# 搜索品类，分析爆款笔记的互动数据
scout xhs search-notes "瑜伽裤测评" --sort popularity_descending

# 分析：
# - 高收藏/点赞比的笔记 = 有购买意向的品类
# - 多篇爆款笔记提到的品牌/功能 = 市场验证的卖点
```

### 场景 2：达人分析

```bash
# 从热门笔记找到达人 → 看主页 → 看作品
scout xhs search-notes "护肤推荐"
scout xhs user-profile <从笔记中获取的userId>
scout xhs user-notes <userId>
```

### 场景 3：跨平台验证

```bash
# 1. 小红书发现趋势
scout xhs search-notes "防晒霜推荐"

# 2. Amazon 验证海外市场需求
scout search "sunscreen"

# 3. 1688 找供应商
scout supplier-search "防晒霜"
```

---

## 重要提醒

1. **中文关键词效果更好**：小红书是中文平台，用中文搜索更精准
2. **收藏数是核心选品指标**：收藏 = 购买意向，比点赞更有参考价值
3. **笔记 ID 是十六进制字符串**：类似 `6489a2b0000000001e012345`
4. **用户 ID 也是十六进制字符串**：类似 `5a1234567890abcdef012345`
5. **不要用 WebFetch 访问小红书**：会被登录墙拦截，只能通过 API
6. **跨平台联动**：小红书发现趋势 → Amazon/TikTok 验证需求 → 1688 找供应商
