agentleFS
jcaiagent7143-uijcaiagent7143-ui/linkdigest-mcp/skills/xiaohongshu-note-to-text/SKILL.md

xiaohongshu-note-to-text

Skill5 starsChanged 56 days agoMITView on GitHub

小红书笔记提取 / 小红书笔记转文字:图文笔记每张图里的字(OCR)、图片描述、正文、标签、点赞收藏,视频笔记给口播逐字稿和画面文字,附分享页前几条热评;加 --insight 得消费者洞察(受众、卖点、顾虑、购买意向、产品价格、读者提问,每条带核对过的引文)。用户发来 xiaohongshu.com、xhslink.com、rednote.com 链接或分享口令,要提取笔记内容、图片文字、文案、做笔记总结或翻译时使用。不需要 Key 也能先免费看一条摘要;注册拿 Key(送 10 积分)后给完整逐字稿和逐图文字,一条图文 1 积分(约 ¥0.14)。不需要小红书账号或 Cookie,不是下载/去水印工具。

  • Reads credentials
  • Sends data out

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Never invent a link or a note id to test with: a made-up id answers 422 not_a_post, a link with <...> left in it answers 400 …

    line 65

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Xiaohongshu note to text / 小红书笔记转文字

没有 Key 也可以直接运行:脚本会用网站的免费看一条(每天 1 条,返回摘要)。要完整输出,在 https://linkdigest.dev/signin?ref=skill-xiaohongshu-note-to-text&next=/app/keys 创建 Key(注册送 10 积分,不用卡)。

小红书图文笔记的正文经常写在图片里:标题一句话,干货全在图上。直接抓网页只能拿到标题、几行正文和反复出现的「打开App查看更多」。这个技能把笔记链接交给 LinkDigest,返回正文、每张图的描述和图上的文字(OCR)、要点、点赞收藏数和话题标签,按图片顺序排好。

实测同一条图文笔记(公开结果页:https://linkdigest.dev/d/5d0e7837ec2742ea4ae07806d979f0ce ):

  • 直接 curl 网页,去掉脚本和样式后只剩 860 个可见字符;
  • yt-dlp 报 No video formats found(它只认视频笔记);
  • LinkDigest 返回的 Markdown 是 35,059 个字符,约为前者的 41 倍。

什么时候用

  • 用户发来小红书笔记链接或整段分享文案,要「提取文案」「图片上的字」「把这篇笔记转成文字」「整理成文档」。
  • 做选题或竞品调研,需要笔记的完整内容和互动数据。
  • 笔记是视频时,同一个接口也能读,逐字稿的说明见 linkdigest-video-transcript 技能。

什么时候不用

  • 要搜索笔记、翻整个评论区、发布或点赞:这个技能只读单条笔记,不搜索、不登录、不发帖。评论只带分享页自带的前几条热评(comments[]),不翻页、不抓评论接口。
  • 私密、已删除或需要登录才能看的笔记:读不了(返回 422,不扣费)。
  • B站链接:可以读(2026-10-24 起)。

准备(一次)

  1. 打开 https://linkdigest.dev/signin?ref=skill-xiaohongshu-note-to-text&next=/app/keys ,用 Google 或邮箱登录(邮箱会收到一封登录链接),创建 API Key(ld_live_ 开头)。新账户送 10 积分,只送一次,不用绑卡。
  2. 设置环境变量:
export LINKDIGEST_API_KEY=ld_live_...

也可以写进 OpenClaw 配置(~/.openclaw/openclaw.json)里这个技能的 env:

{ skills: { entries: { "linkdigest-xhs-note-ocr": { env: { LINKDIGEST_API_KEY: "ld_live_..." } } } } }

Key 只放在环境变量或配置里,不要贴进对话、代码或提交记录。

先确认 Key 能用(0 积分,不要自己编链接)

不要编一个链接或笔记 ID 来测试。<笔记ID> 这类写法是占位符:带尖括号的链接会得到 400 placeholder_link,编出来的 ID(比如全是 0)会得到 422 not_a_post,都不扣费,但也读不到任何东西。用户还没给链接时,用这条真实的示例笔记试——它已经读过,0 积分,一秒内返回:

python3 {baseDir}/scripts/linkdigest.py "https://www.xiaohongshu.com/discovery/item/6a6bf662000000002402de7e?xsec_token=CBCe01s1uyd2C8uMx6ycYcnEwPV5_31OX1u_I19FCSd54=&xsec_source=app_share"

试通之后,向用户要他真正想读的那条笔记的分享链接(App 里「分享」→「复制链接」)。

Never invent a link or a note id to test with: a made-up id answers 422 not_a_post, a link with <...> left in it answers 400 placeholder_link. To check the key, read the sample note above (already read, 0 credits), then ask the user for the real link.

用法

推荐用自带脚本。它只用 Python 3.8+ 标准库,已经处理好 202 排队和轮询:

python3 {baseDir}/scripts/linkdigest.py "<笔记链接或整段分享文案>"
  • 默认输出 Markdown,适合直接读;要结构化数据加 --format json(脚本会省略和其他字段重复的 raw_markdown)。
  • 分享文案里有引号或换行时,从标准输入传:printf '%s' "$SHARE_TEXT" | python3 {baseDir}/scripts/linkdigest.py -
  • 用 App 里「分享 → 复制链接」得到的链接,保留链接上的参数(如 xsec_token);整段分享文案也可以,服务端会从里面取出链接。
  • 想控制花费:--max-credits 2,这条笔记超过 2 积分就不读、不扣费(返回 402)。
  • 做对标 / 选品 / 舆情:加 --insight(+1 积分),返回 insight:受众、卖点、顾虑与痛点、购买意向(求链接 / 多少钱)、产品与价格、读者提问,每条附原文或热评里逐字核对过的引文(verified)。
  • 本次扣了几个积分、是否命中缓存,打印在 stderr 的最后一行。
  • 退出码:0 成功;2 参数错误或没设 Key;3 Key 无效(401);4 积分不够(402,未扣费,stderr 里有付款链接);5 链接读不了(422);6 调用太频繁,或这个 Key 在 /app/keys 设的 30 天积分上限已用完(429,未扣费);7 等待超时(任务还在跑,按提示用 --job-id 接着取)。

直接调 HTTP(没有 Python 时)

提交:

curl -sS -X POST https://linkdigest.dev/api/v1/digest \
  -H "Authorization: Bearer $LINKDIGEST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://www.xiaohongshu.com/discovery/item/6a6bf662000000002402de7e?xsec_token=CBCe01s1uyd2C8uMx6ycYcnEwPV5_31OX1u_I19FCSd54=&xsec_source=app_share", "format": "json"}'
  • 200:结果 JSON,字段见下文。
  • 202:还在处理,返回 {"pending":true,"jobId":"…","poll":"/api/v1/digest/…","retryAfter":15}。用 jobId 取结果,不要重新提交:
curl -sS "https://linkdigest.dev/api/v1/digest/<jobId>?wait=20" \
  -H "Authorization: Bearer $LINKDIGEST_API_KEY"

wait=20 让服务端最多等 20 秒再回复;仍是 202 就再取一次,直到 200。要 Markdown 时,提交用 "format": "markdown",取结果加 &format=markdown(202 响应始终是 JSON)。用 curl 传分享文案时,注意把里面的引号和换行按 JSON 转义。

可以直接运行的 bash/zsh 版本(提交 + 轮询,最多约 15 分钟):

API=https://linkdigest.dev/api/v1/digest
AUTH="Authorization: Bearer $LINKDIGEST_API_KEY"
LINK='https://www.xiaohongshu.com/discovery/item/6a6bf662000000002402de7e?xsec_token=CBCe01s1uyd2C8uMx6ycYcnEwPV5_31OX1u_I19FCSd54=&xsec_source=app_share'   # 真实的示例笔记(已读过,0 积分);换成用户给的链接
res=$(curl -sS -w '\n%{http_code}' -X POST "$API" -H "$AUTH" \
  -H "Content-Type: application/json" -d "{\"url\": \"$LINK\", \"format\": \"json\"}")
code=${res##*$'\n'}; body=${res%$'\n'*}
n=0
while [ "$code" = 202 ] && [ $n -lt 45 ]; do
  n=$((n+1))
  job=$(printf '%s' "$body" | sed -n 's/.*"jobId":"\([^"]*\)".*/\1/p')
  res=$(curl -sS -w '\n%{http_code}' "$API/$job?wait=20" -H "$AUTH")
  code=${res##*$'\n'}; body=${res%$'\n'*}
done
echo "HTTP $code" >&2
printf '%s\n' "$body"

返回字段(图文笔记)

字段内容
title / author / posted_at标题、作者、发布日期
caption笔记正文(文字部分)
images[]按图片顺序,每张一个 {description, ocr}:description 是模型写的画面描述,ocr 是图上的文字
ocr_text[]所有图片里读出的文字片段汇总成一个列表(同样的字只出现一次);要按图对应,用 images[].ocr
key_points[]要点,用原文语言
statslikes 点赞、comments 评论、collects 收藏、shares 分享;是读取当天平台给的数,as_of 是日期,拿不到的是 null
tags[]话题标签
comments[]分享页自带的前几条热评:text、likes、replies、reply_texts[];不是整个评论区,coverage 里写明读了几条(如「top 5 of 674」)
insight加 --insight 才有:audience、claims、objections、purchase_intent、products、questions 六组,每组 found 和 items[],每条 text + quote + verified(引文是否在原文或热评里逐字找到)
raw_markdown整条内容的 Markdown:## Caption、## Key points、## Images(每张图是「Image N. 描述」,下面引用块里是图上文字)
credits / cached本次扣了几个积分;读过的链接 cached=true,0 积分
degraded[]处理中没做完的部分的说明,正常为空

把结果交给用户时

  • 用户要「文案」「图片上的字」:先给 caption,再按顺序给每张图的 ocr,标明「图 1」「图 2」。原样给出,不改写、不总结,除非用户要求。
  • caption、ocr、stats、tags 来自笔记本身;images[].description 和 key_points 是模型写的。转述时分清楚。
  • 花体字、手写字、很小的字可能认错。涉及价格、数字、品牌名时,提醒用户对照原图。
  • 告诉用户这次用了几个积分(credits,缓存命中是 0)。

费用

按加量包 ¥36 = 250 积分折算,1 积分约 ¥0.144。

内容积分约合
图文笔记,6 张图以内1¥0.14
7–12 张图2¥0.29
13–18 张图3¥0.43
加爆款拆解(--breakdown)+1+¥0.14
加消费者洞察(--insight)+1+¥0.14
加译文(--translate-to en 等)+1+¥0.14
任何人读过的链接(缓存)00
读不出内容00

注册送 10 积分(每个账户一次,不按月补)。加量包 $5 = 250 积分,可用支付宝付款(按 ¥36 结算),不过期;或 Dev 月付 $9 = 每月 500 积分(银行卡)。价格以 https://linkdigest.dev/zh/docs?ref=skill-xiaohongshu-note-to-text 为准。

限制

  • B站:可以读(2026-10-24 起)。B 站偶尔拒绝时返回 503,不扣费,稍后重试即可。
  • 私密、已删除、需要登录才能看的笔记读不了。
  • 视频笔记另按时长计费(每开始的 1 分钟 +1 积分);免费账户和加量包账户单条视频最长 10 分钟,Dev 月付 30 分钟,超过返回 402 且不扣费。详见 linkdigest-video-transcript。
  • 互动数据是读取当天的快照,不是实时数据;缓存里的结果保留第一次读取那天的数。
  • 每个账户每小时最多 60 次 API 调用。
  • 不搜索、不读评论、不登录、不发帖、不点赞。

隐私

  • 只把你给的链接发给 linkdigest.dev,不需要也不会读取你的小红书账号或 Cookie。
  • 图片、视频、音频只在处理时放在临时目录,返回前删除,不保存、不转发。
  • 文字结果按链接缓存(所以同一链接再读免费),可能提供给请求同一公开链接的其他用户。不要提交私密内容的链接。
  • 读取时会用到第三方模型服务,详见 https://linkdigest.dev/privacy 。
  • scripts/linkdigest.py 只读环境变量 LINKDIGEST_API_KEY,只连 linkdigest.dev,不读写本地文件。

其他接入方式

LinkDigest 由独立开发者 Jack(GitHub jcaiagent7143-ui)开发和维护。问题和反馈:support@linkdigest.dev

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.