translate-book
AGENTS.md2.1k starsChanged 3 months agoMITView on GitHub
translate-book is an agent skill for Codex, Claude Code, and OpenClaw that translates books (PDF/DOCX/EPUB) into any language using parallel subagents. Published on ClawHub as translate-book and on GitHub as deusyu/translate-book. Use a small file for quick checks, or the checked-in baseline book for the repository's full-pipeline test. Quick smoke test: Full baseline test: Verify: all output_chunk*.md files exist, manifest validation passes, output formats generate.
- Commits and pushes
Trending
More talk lately.thin dataabout the whole repository
Who's talking about deusyu/translate-book
- ProSkillsMD/proskills“[Candidate] deusyu/translate-book - translate-book”GitHub · Oct 1, 2026
- sudosubin/agents.nix“agent-skills.github.deusyu.translate-book: init at 1.0.0”GitHub · Sep 26, 2026
- elan7192/second-brain“Ingest deusyu/translate-book thin pointer (promo flagged, no install)”GitHub · Sep 5, 2026
- ComposioHQ/awesome-claude-skills“Add translate-book skill”GitHub · Mar 21, 2026
- VoltAgent/awesome-agent-skills“Add skill: deusyu/translate-book”GitHub · Mar 21, 2026
The biggest 5 of 5 mentions linking to the repository that our crawl found. Each line is their own headline.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- translate-bookSkill
The file
We split this AGENTS.md into the rules it gives an agent
8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
Use a small file for quick checks, or the checked-in baseline book for the repository's full-pipeline test.
- Distinctive: line 43
Verify: all output_chunk*.md files exist, manifest validation passes, output formats generate.
- Very specific: line 47
Only chunk*.md naming — no page* legacy support
- Very specific: line 58
Do not reintroduce page* file support — it was intentionally removed
- Very specific: line 59
Do not hardcode per-runtime skill paths (~/.agents/skills/, ~/.claude/skills/) in SKILL.md — use {baseDir}
- Very specific: line 60
Do not put platform-specific tool names (Agent, sessions_spawn) in allowed-tools as the only option — keep the whitelist cross-platform
- Distinctive: line 61
Do not add mtime-based incremental rebuild for HTML/format generation — the current skip logic is intentionally simple (existence check).
- Very specific: line 78
Run from tests/.artifacts/ to keep generated files out of the repo root:
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Project
translate-book is an agent skill for Codex, Claude Code, and OpenClaw that translates books (PDF/DOCX/EPUB) into any language using parallel subagents. Published on ClawHub as translate-book and on GitHub as deusyu/translate-book.
Structure
SKILL.md— Skill definition, the orchestration logic that Codex / Claude Code / OpenClaw followsscripts/convert.py— PDF/DOCX/EPUB → Markdown chunks (via Calibre HTMLZ); Markdown input (e.g. from MinerU/Marker) skips Calibrescripts/manifest.py— SHA-256 chunk tracking and merge validationscripts/glossary.py— Term-consistency glossary; per-chunk term tables injected into sub-agent promptsscripts/chunk_context.py— Read-only previous/next chunk excerpts injected into sub-agent promptsscripts/meta.py— Per-chunk sub-agent observation file schemascripts/merge_meta.py— Batch-boundary merge of sub-agent observations into the canonical glossaryscripts/run_state.py— Selective re-translation planner and run_state.json recorderscripts/merge_and_build.py— Merge translated chunks → HTML/DOCX/EPUB/PDFscripts/calibre_html_publish.py— Calibre format conversion wrapperscripts/template.html,scripts/template_ebook.html— HTML templates
Testing changes
Use a small file for quick checks, or the checked-in baseline book for the repository's full-pipeline test.
Quick smoke test:
python3 scripts/convert.py /path/to/small.pdf --olang zh
# then run translation via the skill
python3 scripts/merge_and_build.py --temp-dir <name>_temp --title "test"Full baseline test:
mkdir -p tests/.artifacts
cd tests/.artifacts
python3 ../../scripts/convert.py ../baselines/standard-alice/standard-alice.epub --olang zh
# then run translation via the skill
python3 ../../scripts/merge_and_build.py --temp-dir standard-alice_temp --title "test"Verify: all output_chunk*.md files exist, manifest validation passes, output formats generate.
Conventions
- Only
chunk*.mdnaming — nopage*legacy support - Pipeline output artifacts use the canonical names
book.html,book_doc.html,book.docx,book.epub,book.pdf. Internal scripts and skip/cache logic depend on these names; if title-based filenames are added later they must be optional aliases/copies, not silent replacements - SKILL.md frontmatter must stay single-line per field (OpenClaw parser requirement)
- Script paths in SKILL.md use
{baseDir}not hardcoded paths - Subagent instructions in SKILL.md must be platform-neutral (work on Codex, Claude Code, OpenClaw)
- Checked-in baseline inputs live under
tests/baselines/<book-id>/; generated full-pipeline outputs live undertests/.artifacts/ - README changes must be synced to both README.md and README.zh-CN.md
- Releases follow
.claude/commands/release.md— three commands in order:git push origin main,git tag vX.Y.Z && git push --tags,npx clawhub@latest publish ./ --version X.Y.Z. Do not skip the git tag; it's the only version anchor in the repo
Do not
- Do not reintroduce
page*file support — it was intentionally removed - Do not hardcode per-runtime skill paths (
~/.agents/skills/,~/.claude/skills/) in SKILL.md — use{baseDir} - Do not put platform-specific tool names (Agent, sessions_spawn) in
allowed-toolsas the only option — keep the whitelist cross-platform - Do not add mtime-based incremental rebuild for HTML/format generation — the current skip logic is intentionally simple (existence check). Metadata/template changes require manual cleanup. This is documented in the README.
Cursor Cloud specific instructions
Environment
- Python 3.12+ is pre-installed; no version manager needed.
- System dependencies (Calibre, Pandoc) and pip packages (pypandoc, beautifulsoup4) are installed by the update script.
- Unit tests depend only on the Python stdlib (no pip packages or external binaries needed;
python3 -m unittest discoverruns as-is).
Running tests
- Unit tests (CI-equivalent):
python3 -m unittest discover -s tests -p 'test_*.py' -v— runs from repo root, no setup needed. - Compile check:
python3 -m compileall scripts tests
Full pipeline integration test
Run from tests/.artifacts/ to keep generated files out of the repo root:
mkdir -p tests/.artifacts && cd tests/.artifacts
python3 ../../scripts/convert.py ../baselines/standard-alice/standard-alice.epub --olang zh
# Create mock output_chunk*.md files (copy source chunks) since actual translation requires LLM subagents
for f in standard-alice_temp/chunk*.md; do cp "$f" "standard-alice_temp/output_$(basename $f)"; done
python3 ../../scripts/merge_and_build.py --temp-dir standard-alice_temp --title "test"Known issues
- Ubuntu's Calibre 7.6.0 package has an EPUB generation bug (bytes/str mismatch in
container.py). DOCX and PDF generation work fine. This is a distro packaging issue, not a codebase bug. pypandocinstalls its CLI script to~/.local/binwhich may not be on PATH, but the Python library import works regardless.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

