当用户想要与小红书(xiaohongshu/rednote)交互时使用此 Skill。包括搜索笔记、获取帖子详情、查看用户主页、二维码扫码登录、提取平台内容等。当用户提到 xiaohongshu、小红书、rednote,或需要浏览/抓取中国社交媒体内容时激活此 Skill。
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install xiaohongshu-skill或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install xiaohongshu-skill⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/xiaohongshu-skill/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: xiaohongshu-skill description: 当用户想要与小红书(xiaohongshu/rednote)交互时使用此 Skill。包括搜索笔记、获取帖子详情、查看用户主页、二维码扫码登录、提取平台内容等。当用户提到 xiaohongshu、小红书、rednote,或需要浏览/抓取中国社交媒体内容时激活此 Skill。 user-invokable: true metadata: {"openclaw": {"emoji": "📕", "requires": {"bins": ["python3", "playwright"], "anyBins": ["python3", "python"]}, "os": ["win32", "linux", "darwin"], "install": [{"id": "pip", "kind": "node", "label": "Install dependencies (pip)", "bins": ["playwright"]}]}} ---
基于 Python Playwright 的小红书(rednote)交互工具,通过浏览器自动化从 window.__INITIAL_STATE__(Vue SSR 状态)中提取结构化数据。
在 {baseDir} 目录下安装依赖:
cd {baseDir}
pip install -r requirements.txt
playwright install chromium
Linux/WSL 环境还需运行:
playwright install-deps chromium
所有命令从 {baseDir} 目录运行。
cd {baseDir}
# 打开浏览器窗口,显示二维码供微信/小红书扫描
python -m scripts qrcode --headless=false
# 检查登录是否仍然有效
python -m scripts check-login
在无头环境下,二维码图片保存到 {baseDir}/data/qrcode.png,可通过其他渠道发送扫码。
cd {baseDir}
# 基础搜索
python -m scripts search "关键词"
# 带筛选条件
python -m scripts search "美食" --sort-by=最新 --note-type=图文 --limit=10
筛选选项:
--sort-by:综合、最新、最多点赞、最多评论、最多收藏--note-type:不限、视频、图文--publish-time:不限、一天内、一周内、半年内--search-scope:不限、已看过、未看过、已关注--location:不限、同城、附近cd {baseDir}
# 使用搜索结果中的 id 和 xsec_token
python -m scripts feed <feed_id> <xsec_token>
# 加载评论
python -m scripts feed <feed_id> <xsec_token> --load-comments --max-comments=20
cd {baseDir}
python -m scripts user <user_id> [xsec_token]
| 数据类型 | JavaScript 路径 | |----------|----------------| | 搜索结果 | window.__INITIAL_STATE__.search.feeds | | 帖子详情 | window.__INITIAL_STATE__.note.noteDetailMap | | 用户信息 | window.__INITIAL_STATE__.user.userPageData | | 用户笔记 | window.__INITIAL_STATE__.user.notes |
Vue Ref 处理: 始终通过 .value 或 ._value 解包:
const data = obj.value !== undefined ? obj.value : obj._value;
本 Skill 内置了针对小红书反机器人策略的保护措施:
CaptchaError 并给出处理建议触发验证码时的处理:
cd {baseDir} && python -m scripts qrcode --headless=false 手动通过验证所有命令输出 JSON 到标准输出。搜索结果示例:
{
"id": "abc123",
"xsec_token": "ABxyz...",
"title": "帖子标题",
"type": "normal",
"user": "用户名",
"user_id": "user123",
"liked_count": "1234",
"collected_count": "567",
"comment_count": "89"
}
{baseDir}/
├── SKILL.md # 本文件(Skill 规范)
├── README.md # 项目文档
├── requirements.txt # Python 依赖
├── LICENSE # MIT 许可证
├── data/ # 运行时数据(二维码、调试输出)
└── scripts/ # 核心模块
├── __init__.py
├── __main__.py # CLI 入口
├── client.py # 浏览器客户端封装(频率控制 + 验证码检测)
├── login.py # 二维码扫码登录流程
├── search.py # 搜索(支持多种筛选)
├── feed.py # 帖子详情提取
└── user.py # 用户主页提取
| 环境 | 无头模式 | 有头模式(扫码登录) | 备注 | |------|----------|----------------------|------| | Windows | 支持 | 支持 | 主要开发环境 | | WSL2 (Win11) | 支持 | 通过 WSLg 支持 | 需要 playwright install-deps | | Linux 服务器 | 支持 | 不适用 | 二维码保存为图片文件 |
check-login 返回 false 时需重新登录安装 小红书skill 后,可以对 AI 说这些话来触发它
Show me the top-performing posts in my Xiaohongshu account this month
Fetches account analytics, ranks posts by engagement rate, and returns a table with views, likes, saves, and comments
Draft a Xiaohongshu post for this skincare product with trending hashtags
Analyzes current trending hashtags in the beauty category, writes an engaging post in the Xiaohongshu style, and suggests 5 relevant tags
Analyze the comments on my latest Xiaohongshu post for sentiment
Reads all comments, classifies them as positive/neutral/negative, and surfaces the most common themes and actionable feedback
将技能文件夹放到 ~/.claude/skills/xiaohongshu-skill/ 目录(个人级,所有项目可用),或 .claude/skills/xiaohongshu-skill/(项目级)。重启 AI 客户端后,用 /xiaohongshu-skill 主动调用,或让 AI 根据上下文自动发现并使用。
小红书skill 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
小红书skill 可免费安装使用。请查阅仓库了解许可证信息。
当用户想要与小红书(xiaohongshu/rednote)交互时使用此 Skill。包括搜索笔记、获取帖子详情、查看用户主页、二维码扫码登录、提取平台内容等。当用户提到 xiaohongshu、小红书、rednote,或需要浏览/抓取中国社交媒体内容时激活此 Skill。
小红书skill 属于「Documents & Notes」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。