YoudaoNote Clip

v1.21.8

网页剪藏到有道云笔记。触发词:剪藏网页、保存网页、收藏网页。

3· 1.6k·17 current·18 all-time
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
Name/description (网页剪藏到有道云笔记) matches the included scripts and CLI flows. Required binaries (node, jq, base64, curl, openclaw) are reasonable for the described browser extraction, image processing, and HTTP/SSE upload flows. mcporter appears only for optional post-clip guidance. The primary credential YOUDAONOTE_API_KEY is appropriate for a MCP/SSE upload to a Youdao backend.
Instruction Scope
Runtime instructions perform DOM extraction via the OpenClaw browser evaluate APIs, local image download/compression, and SSE/HTTP uploads to an MCP endpoint (default open.mail.163.com). The skill injects an in-package parser into target pages (no external CDN). The SKILL.md and scripts document that injected code only reads DOM and will not access cookies/localStorage, and the injected code appears to be a DOM parser. The skill writes temporary files in /tmp and optional debug logs to a user-supplied debug directory. These behaviors are within scope but are privacy-sensitive (page content and images are read and uploaded).
Install Mechanism
No external download/install step is included; this is a packaged skill with code files included. No remote installer or URL-based download/exec is used in the provided manifest, so install risk is low from the package itself.
Credentials
The registry metadata declares only YOUDAONOTE_API_KEY as required (primary). The code also reads other optional env vars at runtime: YOUDAONOTE_CLIP_DEBUG, YOUDAONOTE_MCP_URL, YOUDAONOTE_MCP_TIMEOUT, and twitter-apify.mjs optionally reads APIFY_API_TOKEN. Those additional envs are optional and documented in SKILL.md, but they are not listed in the declared requires.env array — this mismatch is worth noting because APIFY_API_TOKEN (if set) will be read by the twitter path. Overall the credentials the skill uses are proportional to its functions.
Persistence & Privilege
Skill does not request always:true and does not modify other skills or system-wide configuration. It writes transient artifacts to /tmp and (if enabled) debug logs to a configured debug directory; those are normal for this functionality and scoped to the skill.
Assessment
This skill appears to do what it claims (extract page HTML via the OpenClaw browser, download/compress images, and upload to a Youdao MCP endpoint). Before installing, consider: 1) Provide only the YOUDAONOTE_API_KEY unless you intend to use the Twitter/X path — the twitter flow can read APIFY_API_TOKEN from the environment if set. 2) Keep debug mode off (YOUDAONOTE_CLIP_DEBUG) unless you trust the skill and control the debug directory; debug writes metadata and short content previews to disk. 3) The skill will fetch images and page content and upload them to the MCP endpoint (default open.mail.163.com) and may call Apify when handling X/twitter URLs — review those endpoints if you need to restrict data flow. 4) If you need stronger guarantees about page-scoped privacy, audit the injected static injector (static/inject-sdk.fn.js) yourself — the package contains the injected parser source. 5) If you do not use the Twitter path, avoid setting APIFY_API_TOKEN. If you want me to, I can point out the exact lines that read optional env vars and the places where network uploads occur, or check the injected SDK for any network calls.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

📎 Clawdis
Binsnode, mcporter, jq, base64, openclaw, curl
EnvYOUDAONOTE_API_KEY
Primary envYOUDAONOTE_API_KEY
latestvk977tj79wck59h8ye5d52kwww182tenz
1.6kdownloads
3stars
8versions
Updated 1mo ago
v1.21.8
MIT-0

YoudaoNote Clip — 网页剪藏

将网页稳定保存到有道云笔记。核心原则:优先成功率,其次才是速度并发限制:本 Skill 不支持并发执行。同一次请求里若有多个 URL,必须逐个串行处理,前一个完成后再处理下一个。 先回复正在保存中...

路由判断

按优先级命中第一条即可:

优先级条件路径
1URL 为 x.com / twitter.com 且含 /status/路径 A
2知乎文章、微信公众号、掘金、36kr、少数派、CSDN、163/qq 资讯正文页(正文可服务端直接抓取);首页/搜索页/话题流/登录后页面不走此路径路径 B
3所有其他页面(默认路径,必须先尝试浏览器提取)路径 C

路径 A — Twitter 专用流程

node {baseDir}/twitter-apify.mjs --url "<URL>"

成功标准:stdout 输出 metadata JSON,且 /tmp/youdaonote-clip-data.json 已生成。

bash {baseDir}/clip-note.sh --data-file /tmp/youdaonote-clip-data.json --source-url "<URL>"

stdout 含 {"ok":true进入响应格式

路径 B — 国内快速路径

bash {baseDir}/clip-note.sh --clip-web-page --source-url "<URL>"

stdout 含 {"ok":true进入响应格式。若报超时、MCP 调用失败、unknown tool、内容明显不完整,立即降级到路径 C

路径 C — 浏览器提取(含降级)

第一步:优先使用浏览器提取(支持 SPA 动态渲染、懒加载图片、JS 生成内容)。不建议直接用 web_fetch 替代,因为 web_fetch 只能获取原始 HTML,无法提取客户端渲染的页面内容。

bash {baseDir}/collect-page.sh "<URL>"

stdout 最后一行为 metadata JSON 且 contentLength > 0提取成功,执行:

bash {baseDir}/clip-note.sh --data-file /tmp/youdaonote-clip-data.json --source-url "<URL>"

stdout 含 {"ok":true进入响应格式

当 collect-page.sh 报错时(CSP、空内容、browser 不可用、timeout 等),降级为 web_fetch:

  1. web_fetch(url="<URL>", extractMode="markdown")
  2. 写入 /tmp/youdaonote-clip-data.json{"title":"页面标题","content":"<Markdown>","imageUrls":[],"source":"<URL>"}
bash {baseDir}/clip-note.sh --data-file /tmp/youdaonote-clip-data.json --markdown --source-url "<URL>"

stdout 含 {"ok":true进入响应格式

响应格式

成功后回复:

📎 **网页剪藏完成**

| 项目 | 详情 |
|------|------|
| 📌 标题 | {实际页面标题或保存标题} |
| 🔗 来源网址 | {原始 URL} |
| ⏰ 剪藏时间 | {yyyy-MM-dd HH:mm} |

> 标题以实际保存结果为准

不要编造“保存位置”或文件夹信息。当前链路默认保存为普通笔记,除非底层命令明确返回了可确认的位置。

剪藏后引导(可选)

mcporter call youdaonote.getRecentFavoriteNotes --args '{"limit":3}' --output json
openclaw cron list --json | jq '.[] | select(.name == "youdaonote-news")'

若收藏 ≥3 篇且未设置资讯推送,可追加:💡 你已经收藏了 N 篇文章,试试说「资讯推送」看看 AI 为你整理的简报吧~

调试

设置环境变量 YOUDAONOTE_CLIP_DEBUG 为日志目录路径即可开启调试模式:

# 在 ~/.zshrc 或 ~/.bashrc 中配置
export YOUDAONOTE_CLIP_DEBUG="~/logs/youdaonote-clip"

# 或临时开启
YOUDAONOTE_CLIP_DEBUG="~/logs/youdaonote-clip" bash clip-note.sh ...

YOUDAONOTE_API_KEYYOUDAONOTE_CLIP_DEBUG 请在 OpenClaw config 的 skills.entries["youdaonote-clip"].env 中配置,执行时会注入为 process.env;或在 shell 中 export。

调试日志按 key 分目录存储:{DEBUG_DIR}/{key}/main.log(clip-note)、twitter.logcollect.log。各 path 首行会输出路径标识(A/B/C/D),便于排查。key 由首个脚本生成并写入 data-file 的 _debugKey 字段,串联整条剪藏流程。通过 perf-test/run-clip.sh 测试时,脚本会 export 该变量,日志写入可预期目录。

调试日志经过脱敏处理:不记录完整页面内容,仅记录长度和前 200 字符摘要。

安全说明

浏览器提取:路径 C 使用 openclaw browser evaluate 在目标页面中注入内容解析脚本(inject-sdk.fn.js),用于提取正文、标题和图片列表。该脚本完全内联在 Skill 包中(不加载外部 CDN),代码可审计。注入仅用于读取 DOM 内容,不修改页面、不发送网络请求、不访问 cookie 或 localStorage。

调试模式:默认关闭。开启后仅写入脱敏的元数据(标题、URL、内容长度),不写入完整页面内容。

环境变量:核心模块 clip-note.mjs 不直接读取 process.env,由 clip-note.sh 从环境变量读取后通过命令行参数传入。twitter-apify.mjsprocess.env 读取 APIFY_API_TOKEN(可选,仅 Twitter/X 路径使用)和 YOUDAONOTE_CLIP_DEBUG(可选,调试模式)。collect-page.sh 内联 Node 代码从 process.env 读取 YOUDAONOTE_CLIP_DEBUG。所有环境变量均由 OpenClaw 执行时从 skills.entries["youdaonote-clip"].env 注入。

Comments

Loading comments...