kindle-download

专门用于为 Kindle 下载和推送电子书。 触发词:"kindle 下载"、"给 kindle 下载"、"帮我下载电子书" 注意:本技能仅限文字类电子书,若用户要求下载"漫画",请勿使用此技能。

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 95 · 0 current installs · 0 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description promise (search Z‑Library mirrors, download ebook, send to Kindle) aligns with what the skill asks for and does: Playwright automation to visit Z‑Library mirrors, a Python mailer to SMTP, and configuration for SMTP and Z‑Library credentials. Declared domains, binaries, and node/python dependencies match the described functionality.
Instruction Scope
SKILL.md explicitly instructs executing workflow.js and send_kindle.py; those scripts read credentials from environment variables or ~/.config/kindle-download/auth.json, use Playwright to interact with external mirror sites, save downloads and browser state under /tmp and user config paths, and then send via SMTP. This is coherent with purpose, but the agent will read local config files and persist browser login state/cookies — important to be aware of.
Install Mechanism
There is no manifest install spec (instruction-only in registry), which reduces automatic install risk. The included INSTALL.md instructs installing Node/Playwright and running npx playwright install chromium (which downloads a Chromium binary). Those install commands fetch remote artifacts (NodeSource, nvm install script, Playwright browser) — expected but worth noting as external downloads during setup.
Credentials
Required secrets are SMTP credentials and Z‑Library account credentials (plus optional proxy) — all directly needed for logging into Z‑Library and sending mail to the Kindle. The number and type of env vars are proportionate, but they are highly sensitive (SMTP auth codes, site passwords). The skill also reads config files as fallback; that behavior is declared in SKILL.md.
Persistence & Privilege
The skill writes/reads user-level config (~/.config/kindle-download/auth.json), stores temporary downloads and workflow/browser state under /tmp and the skill workspace, and may persist browser login state (cookie/session). always:false and it does not request elevated system privileges or modify other skills. Persistent login state is expected for this use case but increases the attack surface and should be considered.
Assessment
This skill appears internally consistent with its goal, but consider the following before installing: - Legal: it targets Z‑Library mirrors (potentially infringing content). Ensure you comply with local copyright laws before using. - Sensitive credentials: the skill requires SMTP auth codes and a Z‑Library account password. Use dedicated accounts, prefer environment variables over a file, and restrict auth.json to mode 600 as recommended. - Isolate runtime: because it runs Playwright/Chromium and will store browser sessions and downloaded files on the host, run it in an isolated VM/container if possible. - Review and trust: you have the full scripts — inspect them yourself or have a trusted admin review. Pay attention to where browser_state.json and workflow_state.json are written and remove saved states if you don't want persistent sessions. - Installation downloads: installing Node/Playwright will fetch remote binaries (npx playwright install chromium and install scripts referenced in INSTALL.md). Run those commands from trusted networks and verify sources. - Operational caution: add your Kindle sender to the Kindle whitelist and rotate SMTP credentials if reused elsewhere. If you want, I can highlight specific lines in the scripts that read/write credentials, save browser state, or perform network requests so you know exactly where sensitive operations occur.

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

Current versionv1.1.1
Download zip
latestvk970dze8zfg1x2djm0x3szmssn83ktq2

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

法律免责声明

请仅在符合当地版权法规的前提下使用本技能。若下载的电子书受版权保护,请确保已获得合法授权或购买正版权限。

⚠️ 严格执行规则(必须遵守)

你只是一个脚本执行者,禁止自主决策!

  1. 必须执行 workflow.js 脚本 - 所有下载操作必须通过脚本完成
  2. 禁止直接回复结果 - 必须等脚本输出后才能回复
  3. 禁止虚构下载路径 - 文件路径必须来自脚本输出
  4. 禁止绕过用户选择 - 看到 NEED_SELECTION 必须停止并等待

执行流程

步骤 1:执行搜索脚本

解析用户输入后,立即执行以下命令(确保 node 在环境变量中):

node ~/.openclaw/workspace/skills/kindle-download/scripts/workflow.js "书名" '{"author": "作者", "publisher": "出版社"}'
  • 只有书名:第二个参数用 '{}'
  • 有作者:第二个参数用 '{author: 作者名}'
  • 有出版社:第二个参数用 '{publisher: 出版社名}'

步骤 2:解析脚本输出

逐行解析脚本输出,严格按以下规则处理:

情况 A:看到 SUCCESS_FILE_PATH:

含义:下载成功 动作

  1. 提取冒号后的文件路径
  2. 执行步骤 3 发送邮件

情况 B:看到 NEED_SELECTION: 或 SCREENSHOT_SENT:

含义:需要用户选择 动作

  1. 立即停止执行
  2. 发送截图:<qqimg>/tmp/kindle_downloads/last_search_result.png</qqimg>
  3. 回复:"搜索结果包含多个不同的作者或出版社,请查看截图并告诉我您选择的作者或出版社。"
  4. 等待用户回复,回复后重新执行步骤 1(带上用户选择条件)

情况 C:看到 ERROR: NO_MATCHING_BOOK

含义:没有找到符合的书籍 动作

  1. 发送截图:<qqimg>/tmp/kindle_downloads/last_search_result.png</qqimg>
  2. 回复:"没有找到符合要求的书籍,请查看截图。"

情况 D:看到其他 ERROR:

含义:发生错误 动作

  1. 发送错误截图:<qqimg>/tmp/kindle_downloads/last_error.png</qqimg>
  2. 回复具体错误信息

步骤 3:发送邮件

使用 Python 执行邮件发送脚本

python3 ~/.openclaw/workspace/skills/kindle-download/scripts/send_kindle.py "文件路径"

解析输出

  • 看到 SUCCESS: Email sent → 回复:"已发送"
  • 看到 ERROR: → 回复具体错误

进度报告(可选)

看到 PROGRESS: 输出时,可向用户报告:

  • PROGRESS: 第一步登录已完成。 → 可报告"第一步登录已完成"
  • PROGRESS: 第二步查找书籍已完成。 → 可报告"第二步查找书籍已完成"
  • PROGRESS: 第三步下载书籍已完成。 → 可报告"第三步下载书籍已完成"

🚫 禁止事项

  1. 禁止不执行脚本直接回复"已下载"或"已发送"
  2. 禁止在看到 NEED_SELECTION 后继续下载
  3. 禁止自动选择作者或出版社
  4. 禁止使用之前的下载记录
  5. 禁止虚构文件路径

示例对话

用户:kindle 下载活着 AI:(执行脚本) 脚本输出:NEED_SELECTION: ... AI<qqimg>/tmp/kindle_downloads/last_search_result.png</qqimg> 搜索结果包含多个不同的作者或出版社,请查看截图并告诉我您选择的作者或出版社。 用户:余华 AI:(重新执行脚本,带上 author: 余华) 脚本输出:SUCCESS_FILE_PATH:/tmp/kindle_downloads/活着.epub AI:(执行发送脚本) 脚本输出:SUCCESS: Email sent... AI:已发送

[Category+Skill Reminder] Built-in: playwright, frontend-ui-ux, git-master, dev-browser ⚡ YOUR SKILLS (PRIORITY): (none)

User-installed skills OVERRIDE built-in defaults. ALWAYS prefer YOUR SKILLS when domain matches.

task(category="visual-engineering", load_skills=["playwright"], run_in_background=true)

Files

9 total
Select a file
Select a file to preview.

Comments

Loading comments…