BeClaude

rednote-mining

New
1Community RegistryGeneralby xueyouluo

小红书数据挖掘与分析工具插件,支持关键词搜索、笔记采集、LLM 结构化提取、实体归一化和报告生成。

Community PluginView Source

Overview

小红书数据挖掘与分析工具。通过 Chrome DevTools Protocol (CDP) 抓取笔记和评论,结合 LLM 进行结构化提取与报告生成,无需逆向 API 签名。

作为 Claude Code 插件安装

本项目是一个 Claude Code 插件,安装后可通过 /rednote-mining:xxx 命令直接使用。

安装步骤

1. 在 Claude Code 中添加插件市场:

code
/plugin marketplace add xueyouluo/rednote_mining

2. 安装插件:

code
/plugin install rednote-mining@rednote-mining

3. 初始化环境(首次使用):

code
/rednote-mining:setup

setup 命令会引导你完成依赖安装、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 你想分析的主题,它会自动完成全套流程:

code
帮我分析小红书上关于"防晒霜推荐"的内容
搜索小红书"杭州赏花"话题并出报告
用小红书数据研究"上海咖啡店"

六步自动化流程:

code
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 功能)

手动安装

不使用插件系统,也可以直接克隆仓库使用:

bash
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

1
Create the skills directory
mkdir -p .claude/skills
2
Download the skill file
mkdir -p .claude/skills && curl -o .claude/skills/rednote-mining.md https://raw.githubusercontent.com/xueyouluo/rednote_mining/main/SKILL.md
3
Invoke in Claude Code
/rednote-mining
View source on GitHub

Frequently Asked Questions

What is rednote-mining?

小红书数据挖掘与分析工具插件,支持关键词搜索、笔记采集、LLM 结构化提取、实体归一化和报告生成。

How to install rednote-mining?

To install rednote-mining, create the .claude/skills directory in your project, then run the curl command to download the skill file. Once installed, invoke it in Claude Code with /rednote-mining.

What is rednote-mining best for?

rednote-mining is a community categorized under General. Created by xueyouluo.