rednote-mining
Newå°çº¢ä¹¦æ°æ®ææä¸åæå·¥å ·æä»¶ï¼æ¯æå ³é®è¯æç´¢ãç¬è®°ééãLLM ç»æåæåãå®ä½å½ä¸å忥åçæã
Summary
This skill enables Claude Code to mine and analyze data from Xiaohongshu (Little Red Book) using Chrome DevTools Protocol for scraping notes and comments, combined with LLM-based structured extraction, entity normalization, and report generation.
- It provides a complete workflow from keyword search to final report, without requiring reverse engineering of API signatures.
Overview
小红书数据挖掘与分析工具。通过 Chrome DevTools Protocol (CDP) 抓取笔记和评论,结合 LLM 进行结构化提取与报告生成,无需逆向 API 签名。
作为 Claude Code 插件安装
本项目是一个 Claude Code 插件,安装后可通过 /rednote-mining:xxx 命令直接使用。
安装步骤
1. 在 Claude Code 中添加插件市场:
/plugin marketplace add xueyouluo/rednote_mining2. 安装插件:
/plugin install rednote-mining@rednote-mining3. 初始化环境(首次使用):
/rednote-mining:setupsetup 命令会引导你完成依赖安装、API Key 配置和 Chrome 登录,全程交互式进行。插件安装时代码已复制到本地 cache,无需单独克隆项目。
可用命令
| 命令 | 说明 |
|---|---|
/rednote-mining:setup | 初始化环境(首次使用必须先运行) |
/rednote-mining:search <关键词> | 搜索小红书笔记 |
/rednote-mining:crawl <关键词> | 批量爬取笔记和评论 |
/rednote-mining:note <feed-id> <xsec-token> | 获取单篇笔记详情 |
/rednote-mining:comments <feed-id> <xsec-token> | 获取笔记评论 |
/rednote-mining:rednote-research | 完整数据挖掘与分析工作流(见下方说明) |
rednote-research:完整分析工作流
这是本插件的核心 skill,适合对某个主题做深度研究。告诉 Claude 你想分析的主题,它会自动完成全套流程:
帮我分析小红书上关于"防晒霜推荐"的内容
搜索小红书"杭州赏花"话题并出报告
用小红书数据研究"上海咖啡店"六步自动化流程:
Step 1: Claude 生成搜索关键词 → 用户确认
Step 2: 爬取笔记与评论 → raw_notes.json
Step 3: LLM 分析样本,提出结构化 schema → 用户确认
Step 4: LLM 批量提取结构化数据 → extracted_data.json
Step 5: LLM 实体归一化(地名/品牌合并)→ normalized_data.json
Step 6: Claude 分析数据,生成报告 → report.md 或 report.html所有中间文件保存在 analysis/{主题}/ 目录下,支持断点续跑。
前置要求
- •Claude Code v1.0.33+
- •Python 3.10+(用于运行爬虫和 LLM 脚本)
- •uv(Python 包管理器)
- •Google Chrome(用于 CDP 控制)
- •火山方舟 API Key(用于 LLM 功能)
手动安装
不使用插件系统,也可以直接克隆仓库使用:
git clone https://github.com/xueyouluo/rednote_mining.git
cd rednote_mining
uv sync
cp .env.example .env
# 编辑 .env 填入 ARK_API_KEY 和 ARK_MODEL详细使用说明见 rednote_miner/README.md。
Install & Usage
/plugin marketplace add <org/repo>Add the configuration to /plugin install rednote-mining@<marketplace>
/pluginUse Cases
Usage Examples
/rednote-mining:search 防晒霜推荐
/rednote-mining:crawl 杭州赏花
帮我分析小红书上关于'上海咖啡店'的内容并生成报告
Security Audits
Frequently Asked Questions
What is rednote-mining?
This skill enables Claude Code to mine and analyze data from Xiaohongshu (Little Red Book) using Chrome DevTools Protocol for scraping notes and comments, combined with LLM-based structured extraction, entity normalization, and report generation. It provides a complete workflow from keyword search to final report, without requiring reverse engineering of API signatures.
How to install rednote-mining?
To install rednote-mining: add a marketplace (/plugin marketplace add <org/repo>), then add the config to /plugin install rednote-mining@<marketplace>. Finally, /plugin in Claude Code.
What is rednote-mining best for?
rednote-mining is a plugin categorized under General. Created by xueyouluo.
What can I use rednote-mining for?
rednote-mining is useful for: Market researchers can analyze consumer opinions on specific products like sunscreen or skincare.; Content creators can discover trending topics and popular notes in their niche.; Brand managers can monitor brand mentions and sentiment across Xiaohongshu posts.; Data analysts can collect structured data from notes and comments for quantitative analysis.; Travel enthusiasts can gather recommendations and reviews for destinations like coffee shops in Shanghai.; Product teams can extract feature requests and pain points from user-generated content..