Translate Book (Parallel Subagents)
Skill by ara.so — Daily 2026 Skills collection.
A Claude Code skill that translates entire books (PDF/DOCX/EPUB) into any language using parallel subagents. Each chunk gets an isolated context window — preventing truncation and context accumulation that plague single-session translation.
Pipeline Overview
Prerequisites
Verify all tools are available:
Installation
Option A: npx (recommended)
Option B: ClawHub
Option C: Git clone
Usage in Claude Code
Once the skill is installed, use natural language inside Claude Code:
The skill orchestrates the full pipeline automatically.
Supported Languages
Language codes are extensible — add new ones in the skill definition.
Running Pipeline Steps Manually
Step 1: Convert to Markdown Chunks
This produces inside {book_name}_temp/:
chunk0001.md,chunk0002.md, ... (source chunks, ~6000 chars each)manifest.json(SHA-256 hashes for validation)
Step 2: Translate (Parallel Subagents)
The skill handles this step — it launches 8 concurrent subagents per batch, each translating one chunk independently:
Resumable: Already-translated chunks (valid output_chunk*.md files) are skipped on re-run.
Step 3: Merge and Build All Formats
Before merging, validation checks:
- Every source chunk has a matching output file (1:1)
- Source chunk hashes match
manifest.json(no stale outputs) - No output files are empty
Outputs produced:
Project Structure
How Manifest Validation Works
If validation fails, the script auto-deletes stale output.md and re-merges from valid chunk outputs.
Real-World Example: Translate a Technical Book
Resuming an Interrupted Translation
Changing Output Metadata After Translation
If you need to update the title, author, template, or image assets without re-translating:
Do NOT delete chunk files — those are your translated content. Only delete final artifacts when changing metadata.
Troubleshooting
Diagnosing Chunk Issues
Configuration Tips
- Chunk size: ~6000 chars per chunk is the default. Smaller chunks = more parallelism but more API calls.
- Concurrency: Default is 8 parallel subagents per batch. Adjust in
SKILL.mdif hitting rate limits. - Languages: Add new language codes to the skill triggers and translation prompt in
SKILL.md. - Templates: Customize
scripts/template.htmlandscripts/template_ebook.htmlfor different HTML/ebook styling.
Key Design Principles
- Isolated context per chunk — each subagent starts fresh, preventing context overflow on long books
- Hash-based integrity — SHA-256 tracking catches stale or corrupt translated chunks before merging
- Resumable at chunk granularity — never re-translate what's already done
- Format-agnostic input — Calibre handles PDF/DOCX/EPUB normalization before the pipeline begins
- Multiple output formats — single pipeline produces HTML, DOCX, EPUB, and PDF simultaneously


