translate-book-parallel — Claude Code skill: translate whole books
Turns a full book in PDF, DOCX or EPUB into another language. Each slice of text gets its own context window, so a long file does not get cut short.
npx skills add reason-machines/trending-skills --skill translate-book-parallel -a claude-codeWhat translate-book-parallel does
The skill splits a book into pieces of roughly 6000 characters and runs parallel subagents over them, 8 at a time by default. One subagent reads a piece, translates it and writes its own output file. Nothing piles up in a single context, so the last chapter reads the same as the first.
The pipeline goes through Calibre: ebook-convert turns the input into HTMLZ, then Markdown, then the split happens. manifest.json keeps SHA-256 hashes of the source pieces, and the merge step re-hashes them first. A mismatch or an empty output file stops the build. Interrupted work resumes on the next run — finished pieces are skipped and only the missing ones are retried. You end up with output.md, book.html with a floating table of contents, book.docx, book.epub and book.pdf.
Before you start, install Calibre so ebook-convert is on your machine, plus Pandoc and the Python packages pypandoc and beautifulsoup4. If ebook-convert is not in PATH, the conversion step never starts, and that is the failure you will hit first. Language codes live in the skill definition and you can add your own.
What it helps with
- translate a PDF book without copying chapters by hand
- split a long document and translate the pieces in parallel
- pick up a translation after a crash instead of starting over
- build DOCX, EPUB and PDF from the translated pieces
- catch a lost or stale piece before the final merge
Example prompts for the agent
- Translate
~/books/clean-code.pdfto Chinese - Translate
mybook.epubto Japanese - /translate-book translate
/path/to/book.docxto French
How to install translate-book-parallel
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill translate-book-parallel -a claude-code2Manually: put the files in place
~/.claude/skills/translate-book-parallel/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/translate-book-parallel/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill translate-book-parallel -a codex2Manually: put the files in place
.agents/skills/translate-book-parallel/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill translate-book-parallel -a cursor2Manually: put the files in place
.cursor/skills/translate-book-parallel/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install reason-machines/trending-skills translate-book-parallel2Manually: put the files in place
.github/skills/translate-book-parallel/SKILL.md1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill translate-book-parallel -a gemini-cli2Platform CLI
gemini skills install https://github.com/reason-machines/trending-skills --path skills/translate-book-parallelManually: put the files in place
.devin/skills/translate-book-parallel/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill translate-book-parallel -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about translate-book-parallel
How do I install translate-book-parallel in Claude Code?
Run npx skills add reason-machines/trending-skills --skill translate-book-parallel -a claude-code. The skill lands at ~/.claude/skills/translate-book-parallel/SKILL.md.
What does translate-book-parallel do?
It translates a whole book from PDF, DOCX or EPUB into the language you pick. Parallel subagents each handle one piece of the text.
What has to be installed first?
Calibre with ebook-convert, Pandoc, and the Python packages pypandoc and beautifulsoup4. Check them with ebook-convert --version, pandoc --version and a pypandoc import.