prompt-lookup
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use…
Translate books (PDF/DOCX/EPUB) into any language using parallel sub-agents. Converts input -> Markdown chunks -> translated chunks -> HTML/DOCX/EPUB/PDF.
Claude Code
$ npx -y skills add deusyu/translate-book --skill translate-book --agent claude-code
Codex
$ npx skills add deusyu/translate-book --skill translate-book -a codex -y
Cursor
$ npx skills add deusyu/translate-book --skill translate-book -a cursor -y
Gemini CLI
$ npx skills add deusyu/translate-book --skill translate-book -a gemini-cli -y
GitHub Copilot
$ npx skills add deusyu/translate-book --skill translate-book -a github-copilot -y
OpenCode
$ npx skills add deusyu/translate-book --skill translate-book -a opencode -y
Windsurf
$ npx skills add deusyu/translate-book --skill translate-book -a windsurf -y
name: translate-book
description: Translate books (PDF/DOCX/EPUB) into any language using parallel sub-agents. Converts input -> Markdown chunks -> translated chunks -> HTML/DOCX/EPUB/PDF.
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Agent, AskUserQuestion
metadata: {"openclaw":{"requires":{"bins":["python3","pandoc","ebook-convert"],"anyBins":["calibre","ebook-convert"]},"homepage":"https://github.com/deusyu/translate-book"}}You are a book translation assistant. You translate entire books from one language to another by orchestrating a multi-step pipeline.
Determine the following from the user's message:
If the file path is not provided, ask the user.
Run the conversion script to produce chunks:
python3 {baseDir}/scripts/convert.py "<file_path>" --olang "<target_lang>"If the user provided `temp_root`, add `--temp-root "<temp_root>"`. The temp directory leaf name remains `{filename}_temp/`; only the parent directory changes.
For PDFs, Calibre reflows text by coordinate heuristics, which shatters math formulas, flattens tables, and interleaves multi-column layouts before translation starts. If the PDF is an academic or technical document and a layout-aware parser is already installed — or the user asks for one — extract the PDF with it first, then pass the resulting Markdown file to `convert.py` instead of the PDF. Markdown input (`.md` / `.markdown`) skips Calibre:
Keep the PDF's file name stem for the Markdown file, because the temp directory is named after it. These CLIs change between versions; check the parser's `--help` if a flag is rejected. Do not install a parser without the user's consent, because they download large models. Images next to the Markdown file and base64 images inlined in it are copied into the temp directory. `--strip-page-numbers` does not apply to Markdown input.
Page-number lines are detected and dropped for PDF input only; EPUB and DOCX keep every standalone number (chapter, verse or exercise numbers). If an EPUB prints its page numbers as text and they show up in the chunks, delete the temp directory before translating and re-run with `--detect-page-numbers`.
This creates a `{filename}_temp/` directory containing:
If `convert.py` aborts because the temp dir was created from different source bytes, do not reuse it — delete the temp directory or pass a fresh `--temp-root`, then re-run. Temp dirs created before fingerprinting existed are adopted with a warning and fingerprinted on the next successful run.
Use Glob to find all source chunks:
Glob: {filename}_temp/chunk*.mdExclude `output_chunk*.md` from the source list. The selective re-translation plan below decides which chunks actually need work.
A separate sub-agent translates each chunk with a fresh context. Without shared state, the same proper noun can drift across multiple translations. The glossary makes every sub-agent see the same canonical translation for the terms that appear in its chunk.
If `<temp_dir>/glossary.json` already exists, skip the rebuild — re-running the skill must not overwrite a hand-edited glossary. To force a rebuild, delete the file.
Otherwise:
1. **Sample chunks**: read `chunk0001.md`, the last chunk, and 3 evenly-spaced middle chunks. If `chunk_count < 5`, sample all of them. 2. **Extract terms**: from the samples, identify proper nouns and recurring domain terms that need consistent translation across the book — typically people, places, organizations, technical concepts. Translate each into the target language. Skip generic vocabulary that any translator would render the same way. 3. **Write `glossary.json`** in the temp dir, matching this v2 schema:
{
"version": 2,
"terms": [
{"id": "Manhattan", "source": "Manhattan", "target": "曼哈顿",
"category": "place", "aliases": [], "gender": "unknown",
"confidence": "medium", "frequency": 0,
"evidence_refs": [], "notes": ""}
],
"high_frequency_top_n": 20,
"applied_meta_hashes": {}
}Existing v1 `glossary.json` files are auto-upgraded to v2 on first load. v2 forbids the same surface form (source or alias) appearing in two different terms; if a v1 file has polysemous duplicate sources, the upgrade aborts with a disambiguation message.
4. **Count frequencies** by running:
python3 {baseDir}/scripts/glossary.py count-frequencies "<temp_dir>"This scans every `chunk*.md` (excluding `output_chunk*.md`), updates each term's `frequency` field, and writes back atomically.
The glossary is hand-editable. If the user edits a `target`, `aliases`, or `category` field after a partial run, the run-state planner in the next step will re-translate on
An agent skill for Codex, Claude Code, and OpenClaw that translates entire books (PDF/DOCX/EPUB) into any language using parallel subagents. Inspired by claude_translater.
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use…
AI-driven presentation workflow for generating editable PPTX decks and slides, reconstructing page visuals, creating reusable…
Use this skill when the user wants a .pptx with smooth cross-slide animation — PowerPoint Morph transitions, Keynote-style…
Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to…