/ SKILL.md
SKILL.md
 1  ---
 2  name: annas-archive
 3  description: Use when the user wants to find or download a book (epub, pdf, mobi) from Anna's Archive. Use for ebook acquisition by title, author, or MD5 hash. Works without a membership key (slower) or with one (fast, higher limits).
 4  ---
 5  
 6  # Anna's Archive
 7  
 8  Search and download ebooks from Anna's Archive (LibGen, Sci-Hub, Z-Library mirror).
 9  
10  ## Requirements
11  
12  - Python 3.8+
13  - `curl_cffi` — installed automatically by setup.sh, or: `pip install curl-cffi`
14  - `curl` — for downloads (standard on most systems)
15  
16  ## Setup
17  
18  ```bash
19  bash ~/.claude/skills/annas-archive/setup.sh
20  ```
21  
22  Set your API key (optional, for faster downloads):
23  ```bash
24  export ANNAS_ARCHIVE_KEY=your_key_here
25  # or store in ~/.openclaw/.env as ANNAS_ARCHIVE_KEY=...
26  ```
27  
28  Get a key at: https://annas-archive.gd/donate (membership)
29  
30  ## Usage
31  
32  **Search for a book:**
33  ```bash
34  scripts/annas-search "The Infidel and the Professor Rasmussen" --format epub --limit 5
35  ```
36  
37  **Download by MD5:**
38  ```bash
39  scripts/annas-download d46ebaa8ebc0fbb6632fb935c1f29f6e ~/books/
40  ```
41  
42  **Combined (search and download first result):**
43  ```bash
44  MD5=$(scripts/annas-search "Dune Herbert" --format epub --limit 1 | awk '{print $1}')
45  scripts/annas-download "$MD5" ~/books/
46  ```
47  
48  ## Formats
49  
50  Supported: `epub`, `pdf`, `mobi`, `fb2`, `djvu`, `cbr`, `cbz` — pass via `--format`.
51  
52  ## How It Works
53  
54  Uses `curl_cffi` with Chrome TLS fingerprint impersonation to bypass DDoS-Guard bot
55  detection on Anna's Archive search pages. Once an MD5 is known, downloads are attempted
56  across multiple domain indexes with automatic fallback (tries HTTPS first, falls back to
57  HTTP mirrors if cert verification fails).
58  
59  ## Valid Mirrors (as of 2026-03)
60  
61  - `annas-archive.gd` (primary)
62  - `annas-archive.pk` (fallback)
63  
64  Do NOT use `annas-archive.gs` (hijacked/malicious) or `annas-archive.org` (seized).