/media-master:zlib-downloadfrom media-master
Searches and downloads books, papers, and ebooks from Z-Library and Anna's Archive via a unified CLI. Handles credential setup and dependency checks.
Ships in media-master. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Search and download books from multiple sources through a unified CLI.
Match user's language: Respond in the same language the user uses.
| Backend | Source | Auth Required | Best For |
|---|---|---|---|
| zlib | Z-Library (EAPI) | Email + Password | Largest catalog, direct download |
| annas | Anna's Archive | API Key (donation) | Aggregated sources, multiple mirrors |
Before any workflow, run preflight to check environment readiness:
python3 ${SKILL_PATH}/scripts/book.py preflight
Returns standardized JSON:
{
"ready": true,
"dependencies": { "python3": {"status": "ok"}, "requests": {"status": "ok"} },
"credentials": { "zlib": {"status": "configured"}, "annas_api_key": {"status": "not_configured"} },
"services": { "annas_binary": {"status": "ok"} }
}
ready: true — proceed directly to the Workflow section.ready: false — follow the Check/Fix table below, then run the Setup flow.| Check | Fix |
|---|---|
requests missing | bash ${SKILL_PATH}/scripts/setup.sh install-deps (or manually: pip3 install requests / uv pip install requests) |
zlib not configured | Guide user to edit ~/.claude/book-tools/.env — set ZLIB_EMAIL and ZLIB_PASSWORD |
zlib expired | Cached tokens expired and no email/password in .env. Guide user to re-add credentials to ~/.claude/book-tools/.env |
annas_api_key not configured | Guide user to donate at Anna's Archive for API key, then add ANNAS_SECRET_KEY to ~/.claude/book-tools/.env |
annas_binary missing | bash ${SKILL_PATH}/scripts/setup.sh install-annas (or manually: download from annas-mcp releases, extract to ~/.local/bin/annas-mcp) |
Only run setup when preflight reports ready: false. Guide the user through configuration interactively.
bash ${SKILL_PATH}/scripts/setup.sh install-deps
Credentials are stored in ~/.claude/book-tools/.env. Create the file from the skill's bundled template:
mkdir -p ~/.claude/book-tools
# Only copy if .env does not already exist — never overwrite existing credentials
if [ ! -f ~/.claude/book-tools/.env ]; then
cp ${SKILL_PATH}/scripts/.env.example ~/.claude/book-tools/.env
else
echo "Existing .env found — skipping copy to preserve your credentials."
fi
The .env file looks like this:
# Z-Library credentials
[email protected]
ZLIB_PASSWORD=your_password_here
# Anna's Archive (optional, requires donation for API key)
# ANNAS_SECRET_KEY=your_api_key_here
IMPORTANT: Do NOT ask the user for credentials directly in chat. Instead:
.env file (or .env.example template)~/.claude/book-tools/.env with their credentialspython3 ${SKILL_PATH}/scripts/book.py preflight
Confirm ready: true before proceeding.
Canonical path: ~/.claude/book-tools/.env — this is the single place users should edit credentials.
| Variable | Purpose | Required |
|---|---|---|
ZLIB_EMAIL | Z-Library email | For Z-Library backend |
ZLIB_PASSWORD | Z-Library password | For Z-Library backend |
ANNAS_SECRET_KEY | Anna's Archive API key | For Anna's Archive backend |
On first successful Z-Library login, session tokens are automatically cached in ~/.claude/book-tools/config.json for performance. This file is auto-managed — do not edit it manually. If login issues occur, delete config.json and the script will re-login using .env credentials.
The typical flow is: search → pick → download.
# Auto-detect backend (tries zlib first, then annas)
python3 ${SKILL_PATH}/scripts/book.py search "machine learning" --limit 10
# Z-Library with filters
python3 ${SKILL_PATH}/scripts/book.py search "deep learning" --source zlib --lang english --ext pdf --limit 5
# Anna's Archive
python3 ${SKILL_PATH}/scripts/book.py search "reinforcement learning" --source annas
# Chinese books
python3 ${SKILL_PATH}/scripts/book.py search "莱姆 索拉里斯" --source zlib --lang chinese --limit 5
Output (JSON to stdout):
{
"source": "zlib",
"count": 5,
"books": [
{
"source": "zlib",
"id": "12345",
"hash": "abc123def",
"title": "Deep Learning",
"author": "Ian Goodfellow",
"year": "2016",
"language": "english",
"extension": "pdf",
"filesize": "22.5 MB"
}
]
}
After searching, present results as a numbered table so the user can pick:
| # | Title | Author | Year | Format | Size |
|---|-------|--------|------|--------|------|
| 1 | Deep Learning | Ian Goodfellow | 2016 | pdf | 22.5 MB |
| 2 | ... | ... | ... | ... | ... |
If results span multiple languages or editions, group them by language or category with sub-headings for clarity.
Ask: "Which book would you like to download? (number)"
# Z-Library download (needs id + hash from search results)
python3 ${SKILL_PATH}/scripts/book.py download --source zlib --id 12345 --hash abc123def -o ~/Downloads/
# Anna's Archive download (needs MD5 hash from search results)
python3 ${SKILL_PATH}/scripts/book.py download --source annas --hash a1b2c3d4e5 --filename "deep_learning.pdf" -o ~/Downloads/
Output:
{
"source": "zlib",
"status": "ok",
"path": "~/Downloads/Deep Learning (Ian Goodfellow).pdf",
"size": 23592960
}
After download, present a structured completion report:
[Book Download] Complete!
Book: [title] by [author]
Source: [zlib/annas]
Path: [file path]
Size: [file size]
If using Z-Library, also mention any remaining daily download quota.
python3 ${SKILL_PATH}/scripts/book.py info --source zlib --id 12345 --hash abc123def
Returns full metadata: description, ISBN, pages, table of contents, etc.
python3 ${SKILL_PATH}/scripts/book.py config show
python3 ${SKILL_PATH}/scripts/book.py setup
| Error | Cause | Action |
|---|---|---|
| "Z-Library not configured" | No credentials | Guide user to edit ~/.claude/book-tools/.env |
| "Z-Library login failed" | Bad credentials or service down | Ask user to verify credentials. Z-Library domains change — if persistent, the vendored Zlibrary.py domain may need updating. |
| "annas-mcp binary not found" | Binary not installed | Run setup.sh install-annas |
| "Anna's Archive API key not configured" | No API key | Guide user to donate at Anna's Archive for API access, then add key to .env |
| Search timeout | Network issue | Retry once. If persistent, try the other backend. |
| "No backend available" | Neither backend configured | Walk through full setup flow from Step 1 |
| Scenario | Behavior |
|---|---|
| Z-Library down | Auto-fallback to Anna's Archive (--source auto handles this) |
| Anna's Archive unavailable | Use Z-Library only |
| Neither configured | Halt and guide user through Setup flow |
info to check a book before downloading to avoid wasting quota.--lang chinese with Z-Library for best results.--source auto.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (psylch/media-master) — no native marketplace selected
npx claudepluginhub p/psylch-media-master3 skills in this plugin
/hifi-downloadDiscover music, get personalized recommendations, and download high-fidelity audio files. Use when user wants to find new music based on their taste, search for songs/albums/artists, get recommendations similar to artists they like, or download lossless audio (FLAC/Hi-Res) from Qobuz or TIDAL. Trigger phrases include "find music like", "recommend songs", "download album", "lossless", "Hi-Res", "FLAC", "music discovery", "similar artists", "setup music"./quark-downloadSearch, validate, and save cloud drive resources via PanSou aggregation API and local Quark desktop APP integration. This skill should be used when the user wants to find and download resources from cloud drives (网盘资源搜索下载), especially when they mention keywords like "搜资源", "找片", "下载", "网盘", "夸克", "quark", "panso", "盘搜". Requires Quark desktop APP running and logged in with membership.Other plugins' skills for the same job