Skip to content
Back to search

xhs-claude-skills

SkillWorks with Claude CodeGitHub

Claude Code slash commands for extracting Xiaohongshu posts into Obsidian notes

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/chenxiachan--xhs-claude-skills/badge.svg)](/listings/chenxiachan--xhs-claude-skills)

HTML

<a href="/listings/chenxiachan--xhs-claude-skills"><img src="/api/listings/chenxiachan--xhs-claude-skills/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

前置要求

- [Claude Code](https://docs.anthropic.com/en/docs/claude-code)(本插件的运行环境) - [Obsidian](https://obsidian.md)(只需 vault 文件夹存在,不需要 CLI) - 视频转录(可选,仅当视频无内嵌字幕时需要):`brew install ffmpeg` + `pip install mlx-whisper`

安装插件

/plugin marketplace add chenxiachan/xhs-claude-skills
/plugin install rednote-to-obsidian@chenxiachan-xhs-claude-skills

首次使用

/xhs https://www.xiaohongshu.com/explore/...

首次运行会自动引导你完成 **30 秒 Cookie 设置**:

1. 🌐 打开 Chrome → xiaohongshu.com(确保已登录) 2. 🔧 打开 DevTools Console(F12) 3. 📋 粘贴 skill 给出的代码 → cookies 自动复制到剪贴板 4. 💾 保存到 `~/cookies.json` 5. ✅ 搞定 — 之后每次运行自动使用

> 🔄 Cookies 过期时 skill 会自动检测并重新引导,无需手动检查。

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 143 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <div align="center">
  2. # 📕 小红书转 Obsidian
  3. [![Claude Code](https://img.shields.io/badge/Claude_Code-插件-7C3AED)](https://docs.anthropic.com/en/docs/claude-code)
  4. [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
  5. 中文 &nbsp;|&nbsp; **[English](README_EN.md)**
  6. </div>
  7. ---
  8. 一个 [Claude Code](https://docs.anthropic.com/en/docs/claude-code) 插件,把小红书帖子一键提取为简洁的 [Obsidian](https://obsidian.md) 笔记。支持图文和视频帖子——视频优先使用平台内嵌字幕,无字幕时回退到本地 Whisper 转录;图文帖子支持 OCR 识别图片中的文字内容。不需要 MCP 服务、无头浏览器或任何后端,只用 cookies + HTTP + Claude 多模态。
  9. ---
  10. ## 🚀 安装
  11. ### 前置要求
  12. - [Claude Code](https://docs.anthropic.com/en/docs/claude-code)(本插件的运行环境)
  13. - [Obsidian](https://obsidian.md)(只需 vault 文件夹存在,不需要 CLI)
  14. - 视频转录(可选,仅当视频无内嵌字幕时需要):`brew install ffmpeg` + `pip install mlx-whisper`
  15. ### 安装插件
  16. ```bash
  17. /plugin marketplace add chenxiachan/xhs-claude-skills
  18. /plugin install rednote-to-obsidian@chenxiachan-xhs-claude-skills
  19. ```
  20. ### 首次使用
  21. ```
  22. /xhs https://www.xiaohongshu.com/explore/...
  23. ```
  24. 首次运行会自动引导你完成 **30 秒 Cookie 设置**:
  25. 1. 🌐 打开 Chrome → xiaohongshu.com(确保已登录)
  26. 2. 🔧 打开 DevTools Console(F12)
  27. 3. 📋 粘贴 skill 给出的代码 → cookies 自动复制到剪贴板
  28. 4. 💾 保存到 `~/cookies.json`
  29. 5. ✅ 搞定 — 之后每次运行自动使用
  30. > 🔄 Cookies 过期时 skill 会自动检测并重新引导,无需手动检查。
  31. ---
  32. ## ✨ 功能
  33. | 命令 | 说明 |
  34. |:-----|:-----|
  35. | `/xhs <链接>` | 📄 提取单个帖子 — 文字、图片 OCR、视频字幕/转录 |
  36. | `/xhs-batch <链接列表>` | 📦 批量提取多个帖子 |
  37. | `/xhs-analyze [关键词]` | 🔍 分析已保存的帖子 — 总结、对比、发现模式 |
  38. ### 📂 输出
  39. 笔记按日期排序,直接放在 Obsidian vault 的 `xhs/` 文件夹下:
  40. ```
  41. xhs/
  42. ├── 2026-03-22 YY方法论解析.md
  43. ├── 2026-03-29 ZZ技术突破.md
  44. ├── img/
  45. └── video/
  46. ```
  47. 每条笔记是**决策工具**——扫一眼决定深挖还是跳过:
  48. ```markdown
  49. # 一句话洞察 ← 判断,不是描述
  50. 核心论点,2-3 句话。
  51. **与我的关联:** 为什么跟我有关。
  52. **值得深挖吗:** 是/否 + 理由。
  53. > [!tip]- 详情 ← 默认折叠
  54. > 结构化内容...
  55. > [!info]- 笔记属性 ← 默认折叠
  56. > 来源 · 日期 · 互动 · 标签
  57. ```
  58. "与我的关联"会读取 Claude Code 的 [memory](https://docs.anthropic.com/en/docs/claude-code) 自动适配你的背景,无需手动配置。
  59. ---
  60. ## 🏗 工作原理
  61. ```
  62. 小红书链接
  63. │
  64. ▼
  65. ┌─────────────────────────┐
  66. │ Cookie 认证 │ ← 复用 Chrome 登录态
  67. └────────────┬────────────┘
  68. ▼
  69. ┌─────────────────────────┐
  70. │ 解析 __INITIAL_STATE__ │ ← 一次 HTTP 请求拿到全部数据
  71. └────┬──────┬──────┬──────┘
  72. ▼ ▼ ▼
  73. 文字 图片 视频
  74. │ │
  75. curl+Read ├→ 平台字幕(优先)
  76. 多模态OCR └→ Whisper(回退)
  77. │ │
  78. ▼ ▼
  79. Obsidian 笔记
  80. ```
  81. ---
  82. ## ⚙️ 配置
  83. | 配置项 | 默认值 | 说明 |
  84. |:------|:------|:-----|
  85. | Cookies | `~/cookies.json` | 小红书认证 |
  86. | 输出目录 | `~/Documents/Obsidian Vault/xhs` | Obsidian vault 路径 |
  87. 路径不同时编辑 `skills/xhs/SKILL.md` 中的常量定义。
  88. ## 📁 插件结构
  89. ```
  90. rednote-to-obsidian/
  91. ├── .claude-plugin/plugin.json
  92. └── skills/
  93. ├── xhs/SKILL.md
  94. ├── xhs-batch/SKILL.md
  95. └── xhs-analyze/SKILL.md
  96. ```
  97. <div align="center">
  98. ---
  99. MIT License
  100. </div>

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.