book-downloader

book-downloader is a skill for Claude Code, Codex from idea2realClaw/myAgent. It costs 85 tokens per session (2,093 once invoked), scanned A, original, MIT.

A tool for finding books, downloading them, and converting PDF files into plain text. For scanned PDFs, OCR reads text from page images; it can also use an LLM to correct recognition errors.

In plain words
What is it for?
Use it to search Z-Library, Project Gutenberg, or Jiumo, download PDF, EPUB, or TXT books, convert local PDFs to text, run OCR on scans, and proofread OCR output.
Why use it?
It combines searching, downloading, text extraction, and scanned-document recognition, so these steps do not have to be performed with separate tools.

Skill for Claude CodeCodex

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

Good fit Use it to search Z-Library, Project Gutenberg, or Jiumo, download PDF, EPUB, or TXT books, convert local PDFs to text, run OCR on scans, and proofread OCR output.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/idea2realclaw/myagent/book-downloader
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add idea2realClaw/myAgent --skill book-downloader
Clone the repo
git clone --depth 1 https://github.com/idea2realClaw/myAgent

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 book-downloader

README.md
[![agentmods](https://agentmods.dev/badge/skills/idea2realclaw/myagent/book-downloader/github.svg)](https://agentmods.dev/skills/idea2realclaw/myagent/book-downloader)
Your own site
<a href="https://agentmods.dev/skills/idea2realclaw/myagent/book-downloader"><img src="https://agentmods.dev/badge/skills/idea2realclaw/myagent/book-downloader/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 book-downloader

Your own site · 80×15
<a href="https://agentmods.dev/skills/idea2realclaw/myagent/book-downloader"><img src="https://agentmods.dev/badge/skills/idea2realclaw/myagent/book-downloader.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,093 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00085 $0.02093
Opus 5 $0.00043 $0.01046
Sonnet 5 $0.00017 $0.00419
Haiku 4.5 $0.00009 $0.00209

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

Security

Grade A, and why

book-downloader scanned grade A with 0 findings 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 10d ago.

The scan reads SKILL.md. This mod also ships 6 executable files (scripts/download_book.py, scripts/pdf_to_txt.py, scripts/proofread.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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/book-downloader/SKILL.md · 197 lines

How it starts

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

书籍下载 Skill v4(2026-04-04)

功能概述

步骤 功能 说明
1 搜索书籍 Z-Library(推荐)、Project Gutenberg、鸠摩搜索
2 下载书籍 自动识别格式(PDF/EPUB/TXT)
3 PDF 转 TXT 智能双路径:文字版直接提取,扫描件自动 OCR
4 智能校对 通过 LLM 重写 OCR 文本,纠正错字乱码,生成通顺文字

依赖安装

# 核心(必须)
pip3 install pymupdf requests

# Z-Library SPA 搜索(必须,Playwright 动态页面)
pip3 install playwright
playwright install chromium          # 首次运行前必须执行一次

# OCR(扫描件需要)
brew install tesseract tesseract-lang poppler
pip3 install pytesseract pdf2image

# 校对(需要 LLM API Key)
# 设置环境变量或使用参数 -k 传入
export OPENAI_API_KEY=sk-xxx

使用方法

一键完成(搜索 → 下载 → 转 TXT)

python3 ~/.workbuddy/skills/book-downloader/scripts/run.py "书名"

分步操作

# 仅搜索
python3 run.py "太极拳" --search-only

# 下载搜索结果的第N本(从0开始)
python3 run.py --download-only --index 1

# 直接将本地 PDF 转 TXT
python3 run.py --pdf ~/Downloads/book.pdf

# PDF 转 TXT(扫描件自动 OCR)
python3 run.py --pdf ~/Downloads/book.pdf --method ocr --ocr-lang chi_sim+eng

指定搜索源

参数 搜索源 说明
--source zlib Z-Library 收录最全(默认),约 1500 万册
--source gutenberg Project Gutenberg 公版书,约 7 万册
--source jiumo 鸠摩搜索 国内资源
--source all 全部 较慢

命令行参数

参数 说明
query 搜索关键词(中文或英文)
--search-only, -s 仅搜索,不下载
--download-only, -d 仅下载,使用上次搜索结果
--index, -i 选择第几本书(从0开始,默认0)
--output-dir, -o 下载目录(默认 ~/Downloads/books)
--lang, -l 语言筛选
--source 搜索源(默认 zlib)
--pdf 指定 PDF 文件直接转 TXT

PDF 转 TXT 参数

参数 说明
--method auto 智能(默认):文字页直提,图片页自动 OCR
--method pymupdf 仅直提文字(快速,不含 OCR)
--method ocr 全量 OCR(适合纯扫描件,速度慢)
--start, --end 指定页码范围
--ocr-lang chi_sim+eng OCR 语言(中文+英文)
--ocr-dpi 200 OCR 渲染清晰度(默认200,越高越清晰)

输出位置

  • 下载目录: ~/Downloads/books/
  • 搜索结果缓存: /tmp/book_search_results.json
  • TXT 文件: 与 PDF 同目录

经验总结(2026-04-04)

Z-Library SPA 技术要点

Read the full file on GitHub · 197 lines

Files

What ships with it

6 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. 10d ago First seen · 197 lines · 85 tokens per session scan A a9654f845bd7

Subscribe to this mod's changes

book-downloader is a skill published in the GitHub repository idea2realClaw/myAgent (2 stars, last pushed 21d ago), licensed MIT. It adds 85 tokens to every session and 2,093 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories