rullerzhou-afk

Redbook — AI skill for Claude Code

AI community

小红书 CLI — 搜索、分析、自动化 Xiaohongshu content.

How to install Redbook

This entry records only its repository, not the path inside it, so there is no exact command to give. Open rullerzhou-afk/redbook and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Redbook does

小红书 CLI — 搜索、分析、自动化 Xiaohongshu content. Built for AI agents.

Alternatives in AI

  • Agency Agents Zh — 🎭 211 个即插即用的 AI 专家角色 — 支持 Hermes Agent/Claude Code/Cursor/Copilot 等 16 种工具,覆盖工程/设计/营销/金融等 18 个部门 6.9k ★
  • OpenContext — A personal context store for AI agents and assistants—reuse your existing coding agent CLI (Codex/Claude/OpenC 1.1k ★
  • SEO Geo Claude Skills — 20 SEO & GEO skills for Claude Code, Cursor, Codex, and 35+ AI agents 888 ★

README

redbook — 小红书命令行工具

小红书 CLI 工具:搜索笔记、阅读内容、分析博主、发布图文。使用浏览器 Cookie 认证,无需 API Key。

[English](#english) | 中文

最快上手方式

把这段话发给你的 AI 助手(Claude Code、Cursor、Codex、Windsurf、OpenClaw 等):

**"帮我用 npm 安装 `@lucasygu/redbook` 这个小红书 CLI 工具,然后运行 `redbook whoami` 验证是否能正常连接。GitHub 地址:https://github.com/lucasygu/redbook"**

OpenClaw 用户也可以直接:**`clawhub install redbook`**

AI 会自动完成安装、验证连接、处理可能的 Cookie 问题。你只需要确保已在 Chrome 中登录 xiaohongshu.com。

安装完成后,试试:**"帮我分析'AI编程'这个话题在小红书上的竞争格局"** —— AI 会自动搜索关键词、分析互动数据、发现头部博主、给出内容建议。

安装

npm install -g @lucasygu/redbook
# 或通过 ClawHub(OpenClaw 生态)
clawhub install redbook

需要 Node.js >= 22。支持 **macOS、Windows、Linux**。使用 Chrome 浏览器的 Cookie —— 请先在 Chrome 中登录 xiaohongshu.com。

安装后运行 `redbook whoami` 验证连接。CLI 会自动检测所有 Chrome 配置文件,找到你的小红书登录状态。

  • macOS —— 如果遇到钥匙串弹窗,请点击"始终允许"
  • Windows —— Chrome 127+ 使用了 App-Bound Encryption,CLI 会自动启动 Chrome headless 模式读取 Cookie(需要先关闭 Chrome)。如果自动提取失败,可以用 --cookie-string 手动传入

能做什么

  • 话题研究 —— 搜索关键词,分析哪些话题有流量、哪些是蓝海
  • 竞品分析 —— 找到头部博主,对比粉丝量、互动数据、内容风格
  • 爆款拆解 —— 分析爆款笔记的标题钩子、互动比例、评论主题
  • 爆款模板 —— 从多篇爆款笔记提取内容模板(标题结构、正文结构、钩子模式)
  • 限流检测 —— 检测笔记是否被隐形限流(通过创作者后台 API 的隐藏 level 字段)
  • 收藏专辑 —— 查看收藏专辑内容,分析专辑内的笔记
  • 收藏管理 —— 查看收藏列表、收藏/取消收藏笔记(支持自己和其他用户的公开收藏)
  • 评论管理 —— 发评论、回复评论、按策略批量回复(问题优先 / 高赞优先 / 未回复优先)
  • 图文卡片 —— Markdown 渲染为小红书风格的 PNG 图文卡片(7 种配色主题)
  • 内容策划 —— 基于数据发现内容机会,生成有数据支撑的选题建议
  • 受众洞察 —— 从互动信号推断目标用户画像

通过 AI 助手使用时,这些工作流可以自动串联完成。直接使用 CLI 时,每个命令也可以独立运行。

快速开始

# 检查连接
redbook whoami

# 搜索笔记
redbook search "AI编程" --sort popular

# 阅读笔记
redbook read https://www.xiaohongshu.com/explore/abc123

# 获取评论
redbook comments https://www.xiaohongshu.com/explore/abc123 --all

# 浏览推荐页
redbook feed

# 查看博主信息
redbook user 
redbook user-posts 

# 搜索话题标签
redbook topics "Claude Code"

# 查看收藏(默认当前用户)
redbook favorites --json
redbook favorites  --json --all

# 收藏/取消收藏
redbook collect ""
redbook uncollect ""

# 分析爆款笔记
redbook