Token导航 LogoToken导航

Agent Skill · 研究检索

xiaohongshutools(xiaohongshutools 搜索)

xiaohongshutools 用于处理浏览器自动化、网页检查和页面信息提取,适合在 OpenClaw 中需要让 Agent 打开页面、读取网页或验证前端流程时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

xiaohongshutools 是研究检索类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为需要联网;许可证为 MIT-0,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 757。

总安装 177,860周安装 7,195GitHub Stars 11下载 55,833核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
0.1.0

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:xiaohongshutools(xiaohongshutools 搜索)
来源仓库:https://github.com/chocomintx/xiaohongshutools
安装命令:
openclaw skills install xiaohongshutools
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install xiaohongshutools

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

小红书(小红书)数据整理和交互工具包。与小红书平台合作时使用:(1) 搜索和抓取笔记/帖子,(2) 获取用户个人资料和详细信息,(3) 提取评论和点赞,(4) 关注用户并点赞帖子,(5) 获取主页提要和趋势内容。

自动处理所有加密参数(cookie、标头),包括 a1、webId、x-s、x-s-common、x-t、sec_poison_id、websectiga、gid、x-b3-traceid、x-xray-traceid。支持访客模式和通过 web_session cookie 进行身份验证的会话。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install xiaohongshutools;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

xiaohongshutools 怎么安装?

在终端执行 openclaw skills install xiaohongshutools。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

xiaohongshutools 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

xiaohongshutools 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

xiaohongshutools 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

xiaohongshutools 用的人多吗?

公开数据是累计安装 177,860 次,近一周安装 7,195 次,下载 55,833 次,GitHub 11 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

xiaohongshutools 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
xiaohongshutools

xiaohongshutools 搜索 · 本页

177,86011需要联网MIT-0有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
xiaohongshu
description
XiaoHongShu (Little Red Book) data collection and interaction toolkit. Use when working with XiaoHongShu (小红书) platform for: (1) Searching and scraping notes/posts, (2) Getting user profiles and details, (3) Extracting comments and likes, (4) Following users and liking posts, (5) Fetching home feed and trending content. Automatically handles all encryption parameters (cookies, headers) including a1, webId, x-s, x-s-common, x-t, sec_poison_id, websectiga, gid, x-b3-traceid, x-xray-traceid. Supports guest mode and authenticated sessions via web_session cookie.

Xiaohongshu Skill

小红书(XiaoHongShu / Little Red Book)数据整理和交互工具包。基于RedCrack纯Python逆向工程实现。

Quick Start

Installation

Dependencies are already installed:

pip install aiohttp loguru pycryptodome getuseragent

Basic Usage

import asyncio
import sys
sys.path.insert(0, r'C:\\Users\\Chocomint\\.openclaw\\workspace\\xiaohongshu\\scripts')

from request.web.xhs_session import create_xhs_session

async def main():
    # ✅ 推荐:不强制代理(有代理再填 proxy)
    # 说明:当前小红书接口经常对“未登录/游客”限制搜索能力。
    # 如果 search 报 code=-104(未登录无权限),请提供 web_session。
    xhs = await create_xhs_session(proxy=None, web_session="YOUR_WEB_SESSION_OR_NONE")

    # Search notes
    res = await xhs.apis.note.search_notes("美妆")
    data = await res.json()
    print(data)

    await xhs.close_session()

asyncio.run(main())

Core Capabilities

1. Search & Discovery

Search notes by keyword:

res = await xhs_session.apis.note.search_notes("口红")

Get home feed (trending):

# 注意:get_homefeed 需要 category 参数
res = await xhs_session.apis.note.get_homefeed(
    xhs_session.apis.note.homefeed_category_enum.FOOD
)

Get note detail:

# note_detail 需要 note_id + xsec_token(有时在搜索结果 item 里叫 xsec_token)
res = await xhs_session.apis.note.note_detail(note_id, xsec_token)

2. User Interactions

Get user info:

res = await xhs_session.apis.auth.get_self_simple_info()

Follow a user:

res = await xhs_session.apis.user.follow_user(user_id)

Like a note:

res = await xhs_session.apis.note.like_note(note_id)

3. Comments

Get comments for a note:

# comments 也需要 note_id + xsec_token
res = await xhs_session.apis.comments.get_comments(note_id, xsec_token)

Configuration

Proxy

代理不是硬性要求(本技能可以 proxy=None 运行)。但在以下情况建议使用代理:

  • 网络环境不稳定/请求超时
  • 频繁触发风控(例如 461)想换出口 IP 试试

不使用代理:

xhs = await create_xhs_session(proxy=None, web_session=None)

使用代理:

xhs = await create_xhs_session(
    proxy="http://127.0.0.1:7890",
    web_session="your_web_session_cookie"  # 需要登录能力时再提供
)

Encryption Parameters

All encryption parameters are automatically generated:

  • Cookies: a1, webId, acw_tc, web_session, sec_poison_id, websectiga, gid
  • Headers: x-s, x-s-common, x-t, x-b3-traceid, x-xray-traceid

Configuration file: scripts/request/web/encrypt/web_encrypt_config.ini

Session Management

Guest Mode (No Login)

xhs_session = await create_xhs_session(proxy="http://127.0.0.1:7890")

Authenticated Mode (With Login)

xhs_session = await create_xhs_session(
    proxy="http://127.0.0.1:7890",
    web_session="030037afxxxxxxxxxxxxxxxxxxxaeb59d5b4"  # Your cookie
)

Close Session

await xhs_session.close_session()

Links & IDs (重要)

  • 小红书笔记的公开标识通常是 note_id(十六进制风格字符串),例如:697cc945000000000a02cdad。
  • 这个 note_id 可以做数学意义的 16 进制→10 进制转换,但那只是“另一种表示法”,不会变成小红书的短数字 ID(类似 App Store 的 id741292507),也不会更适合拼接小红书链接。
  • 我们通过接口得到的可直接打开的网页链接通常形如:

- https://www.xiaohongshu.com/explore/<note_id>?xsec_token=...&xsec_source=pc_search

  • xhslink.com 短链一般需要在 App/登录态里通过“分享→复制链接”获得;仅靠当前接口通常拿不到。

输出到聊天时的链接美化(推荐)

为了避免长链接难看,优先用文本标签超链接:

  • Markdown:[标题](https://www.xiaohongshu.com/explore/...)

Available APIs

All APIs are accessible via xhs_session.apis.*:

Authentication (apis.auth):

  • get_self_simple_info() - Get current user info

Notes (apis.note):

  • search_notes(keyword) - Search notes by keyword
  • get_homefeed(category) - Get home feed
  • note_detail(note_id, share_token) - Get note details
  • like_note(note_id) - Like a note

Comments (apis.comments):

  • get_comments(note_id, share_token) - Get note comments

User (apis.user):

  • follow_user(user_id) - Follow a user
  • get_user_info(user_id) - Get user details

Example Workflows

Workflow 1: Search and Extract Notes

async def search_example():
    xhs_session = await create_xhs_session(proxy="http://127.0.0.1:7890")

    # Search for makeup tutorials
    res = await xhs_session.apis.note.search_notes("美妆教程")
    data = await res.json()

    for note in data['data']['items']:
        print(f"Title: {note['display_title']}")
        print(f"Author: {note['user']['nickname']}")
        print(f"Likes: {note['liked_count']}")
        print("---")

    await xhs_session.close_session()

Workflow 2: Get Comments for Analysis

async def comments_example():
    xhs_session = await create_xhs_session(proxy="http://127.0.0.1:7890")

    note_id = "64f1a2d30000000013003689"
    res = await xhs_session.apis.comments.get_comments(note_id, "")
    data = await res.json()

    for comment in data['data']['comments']:
        print(f"User: {comment['user']['nickname']}")
        print(f"Content: {comment['content']}")
        print(f"Likes: {comment['like_count']}")
        print("---")

    await xhs_session.close_session()

Workflow 3: User Profile Analysis

async def profile_example():
    xhs_session = await create_xhs_session(
        proxy="http://127.0.0.1:7890",
        web_session="your_cookie_here"
    )

    # Get self info
    res = await xhs_session.apis.auth.get_self_simple_info()
    data = await res.json()

    print(f"Username: {data['data']['user']['nickname']}")
    print(f"Followers: {data['data']['user']['follows']}")
    print(f"Fans: {data['data']['user']['fans']}")

    await xhs_session.close_session()

Important Notes

  1. Proxy is required for most operations due to XiaoHongShu's anti-scraping measures
  2. Rate limiting: Be respectful with request frequency to avoid IP bans
  3. Authentication: Some operations require login (web_session cookie)
  4. Legal compliance: Use only for legitimate research and data analysis purposes

Technical Details

Based on RedCrack - Pure Python reverse engineering of XiaoHongShu's encryption algorithms.

What's automatically handled:

  • Base64/Base58 custom encoding
  • RC4/XOR encryption
  • MD5/SHA256 hashing
  • Custom signature generation (x-s, x-s-common)
  • Dynamic cookie generation (a1, webId, sec_poison_id, etc.)

No JavaScript runtime required - All encryption is pure Python.

Troubleshooting

Connection errors

  • Verify your proxy is running on the configured port
  • Try different proxy servers if needed
  • Check network connectivity

461 errors(风控/安全校验)

  • 这通常不是代码语法问题,而是触发了小红书的风控/安全校验。
  • 典型现象:OtherStatusError: 461异常,或者接口返回看似 success=true 但 HTTP=461。

应对建议:

  • 降低频率/加随机 sleep、避免并发
  • 换关键词/换 endpoint(例如先用搜索拿到 note_id + xsec_token,再查 detail)
  • 使用稳定的登录态(web_session)
  • 必要时更换代理出口

401/403 errors

  • web_session 可能过期
  • 小红书可能更新了风控参数/签名逻辑(需要更新逆向实现)

Import errors

  • Ensure all dependencies are installed: pip install aiohttp loguru pycryptodome getuseragent
  • Check that the skill path is correct in sys.path.insert()

平台分布

OpenClaw

70.32%
按下载量换算39,262

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

未展示

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills