xiaohongshu-ingest

xiaohongshu-ingest is a skill for Claude Code, Codex from chubbyguan/chubbyskills. It costs 76 tokens per session (1,244 once invoked), scanned B, original, MIT.

A workflow for collecting Xiaohongshu, a Chinese social-media platform, posts into structured Markdown files. It can also break down popular posts into reusable content ideas based on audience, situation, problem, emotion, and hook.

In plain words
What is it for?
Use it with Xiaohongshu post links or short links to save titles, text, tags, authors, engagement data, and media. It can download images, transcribe video notes, and produce an analysis report with five follow-up topics.
Why use it?
It saves posts in a consistent local format and reduces the work of studying why popular content works. It handles text, images, and video notes through separate collection paths.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python scripts/analyze_hook.py ./out/某笔记.md -o ./out.

Good fit Use it with Xiaohongshu post links or short links to save titles, text, tags, authors, engagement data, and media. It can download images, transcribe video notes, and produce an analysis report with five follow-up topics.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/chubbyguan/chubbyskills
agentmods
npx agentmods add skills/chubbyguan/chubbyskills/xiaohongshu-ingest

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for xiaohongshu-ingest

README.md
[![agentmods](https://agentmods.dev/badge/skills/chubbyguan/chubbyskills/xiaohongshu-ingest/github.svg)](https://agentmods.dev/skills/chubbyguan/chubbyskills/xiaohongshu-ingest)
Your own site
<a href="https://agentmods.dev/skills/chubbyguan/chubbyskills/xiaohongshu-ingest"><img src="https://agentmods.dev/badge/skills/chubbyguan/chubbyskills/xiaohongshu-ingest/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for xiaohongshu-ingest

Your own site · 80×15
<a href="https://agentmods.dev/skills/chubbyguan/chubbyskills/xiaohongshu-ingest"><img src="https://agentmods.dev/badge/skills/chubbyguan/chubbyskills/xiaohongshu-ingest.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,244 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Privilege Escalation · line 29
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00076 $0.01244
Opus 5 $0.00038 $0.00622
Sonnet 5 $0.00015 $0.00249
Haiku 4.5 $0.00008 $0.00124

Measured 11d ago against content hash 23b75a33d121, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade B, and why

xiaohongshu-ingest scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/analyze_hook.py, scripts/fetch_note.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

# macOS: brew install ffmpeg | Ubuntu: sudo apt install ffmpeg
xiaohongshu-ingest/SKILL.md · 83 lines

How it starts

The opening of the file, as written. The whole thing — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.

小红书采集 + 爆款拆解 Skill

把小红书笔记抓成结构化 Markdown 入库,再用 DeepSeek 拆解爆款逻辑、衍生可直接写的选题。 自动区分图文与视频笔记:图文 → 下载图片本地嵌入;视频 → 像抖音那样转成文字稿。 补齐了仓库在「中文内容采集」上最大的平台缺口,也是「采集 → 选题」创作工作流的起点。

环境要求

# 图文采集零依赖(仅 Python 标准库)

# 视频笔记转录需要(与抖音/B站转录同一套依赖):
pip install funasr modelscope torch torchaudio
# macOS: brew install ffmpeg   |   Ubuntu: sudo apt install ffmpeg

# 强烈建议:配置 cookie 以规避风控(从浏览器登录后复制)
export XHS_COOKIE="你的小红书 cookie 字符串"

# 爆款拆解需要 DeepSeek API Key
export DEEPSEEK_API_KEY="your-api-key"

使用方法

# 1) 采集笔记 → 统一 frontmatter Markdown
python scripts/fetch_note.py "https://www.xiaohongshu.com/explore/xxxx" -o ./out
python scripts/fetch_note.py "http://xhslink.com/xxxx" -o ./out
python scripts/fetch_note.py "链接" -o ./out --no-images   # 图文:只留图片链接不下载
python scripts/fetch_note.py "链接" -o ./out --no-video    # 视频:不转录,只留视频链接
python scripts/fetch_note.py "链接" -o ./out --fallback-text 手动正文.txt

# 2) 爆款拆解 → 拆解报告 + 5 条衍生选题
python scripts/analyze_hook.py ./out/某笔记.md -o ./out

产出

  • fetch_note.py:标题、正文、标签、作者、互动数据(赞/藏/评)→ 统一 frontmatter Markdown(platform: xiaohongshu,含 note_type: image|video)。按笔记类型分流
    • 图文笔记:图片下载到本地 <标题>.assets/ 并以 ![]() 嵌入(正文常在图里,本地化后 Obsidian 直接可见)。--no-images 只留链接,单张失败自动回退为链接
    • 视频笔记:提取视频直链 → ffmpeg 抽音频 → SenseVoice 转录为文字稿写入 ## 视频文字稿--no-video 只留视频链接;缺 funasr/ffmpeg 时自动降级为存链接
  • analyze_hook.py:目标人群 / 场景 / 痛点 / 情绪价值 / 标题钩子 / 正文结构 / 可复用模板 / 5 条衍生选题(带 - [ ] 勾选,可直接进选题库)

⚠️ 关于反爬(务必先读)

小红书风控严格,未登录的纯脚本访问经常被拦。本 skill 的策略:

  1. 优先解析页面内嵌的 __INITIAL_STATE__ 结构化数据
  2. 失败则回退到 og: 元标签
  3. 仍失败时给出明确提示——此时可手动复制笔记正文存成 .txt,用 --fallback-text 继续生成统一 Markdown,或直接走 analyze_hook.py 拆解(拆解环节不依赖抓取)

提供 XHS_COOKIE 能显著提高采集成功率。页面结构若调整,需更新 fetch_note.py 里的选择器。

合规声明

仅供个人学习与研究使用。请遵守小红书用户协议与 robots 规则,控制请求频率,不要用于批量抓取、商用爬取或侵犯他人权益的场景。

衔接工作流

  • 采集产物 → knowledge-base-management 入库(统一 frontmatter,按 platform 聚合)
  • 衍生选题 → 创作者选题流(采集 → 拆解 → 选题库 → 初稿)
  • 多篇拆解 → 沉淀「爆款选题库」,对接 industry-intelligence-radar 的趋势信号

参考

Read the full file on GitHub · 83 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 83 lines · 76 tokens per session scan B 23b75a33d121

Subscribe to this mod's changes

xiaohongshu-ingest is a skill published in the GitHub repository chubbyguan/chubbyskills (667 stars, last pushed 23d ago), licensed MIT. It adds 76 tokens to every session and 1,244 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

Chinese Market Content Engineer

A guide for creating and adapting content for major Chinese digital platforms, including WeChat, Xiaohongshu, Douyin, Zhihu, and Bilibili. It covers Chinese and English writing with attention to each platform's audience and format.

demo112/yunqu-ai-skills · 44 tokens

xiaohongshu-title

A Chinese-language title-writing and editing assistant for Xiaohongshu, a Chinese social-media platform for image and video posts. It creates titles for posts, covers, tutorials, reviews, recommendations, and services.

mengke-wang/xiaohongshu-ai-workbench · 157 tokens

xiaohongshu-magazine

A Chinese-language planning guide for treating a Xiaohongshu account as a magazine. Xiaohongshu is a Chinese social platform where people publish and follow posts, and the guide helps define recurring content themes and columns.

mengke-wang/xiaohongshu-ai-workbench · 184 tokens

xiaohongshu-suite

A Chinese-language workflow guide for improving a Xiaohongshu account, its content, and its path from posts to private messages or sales. It routes a request to a more specific skill, such as titles, profile text, topic planning, comments, or conversion paths.

mengke-wang/xiaohongshu-ai-workbench · 119 tokens

xiaohongshu-comment-reply

A Xiaohongshu comment-reply guide helps write replies for Xiaohongshu, a Chinese social-content platform, including pinned comments and responses to doubts or hostile comments.

mengke-wang/xiaohongshu-ai-workbench · 102 tokens

xiaohongshu-conversion-path

A Xiaohongshu conversion-path guide maps how people move from seeing content on Xiaohongshu, a Chinese social-content platform, to taking a next step such as messaging, booking, trying a tool, or buying.

mengke-wang/xiaohongshu-ai-workbench · 168 tokens