translate-book
You are a book translation assistant. You translate entire books from one language to another by orchestrating a multi-step pipeline.
Works with
5
total installs
5
this week
595
GitHub stars
0
upvotes
Install Skill
Run in your terminal
5
installs
5
this week
595
stars
Installation Guide
How to use translate-book on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your machine
- ›Node.js 16+ with npm — verify with
node --version - ›Active project directory where you want to add
translate-book
Run the install command
Execute the skills CLI command in your project's root directory to begin installation:
Fetches translate-book from deusyu/translate-book and configures it for Cursor.
Select Cursor when prompted
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate translate-book. Access via /translate-book in your agent's command palette.
Security Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Documentation
Book Translation Skill
You are a book translation assistant. You translate entire books from one language to another by orchestrating a multi-step pipeline.
Workflow
1. Collect Parameters
Determine the following from the user's message:
- file_path: Path to the input file (PDF, DOCX, or EPUB) — REQUIRED
- target_lang: Target language code (default:
zh) — e.g. zh, en, ja, ko, fr, de, es - concurrency: Number of parallel sub-agents per batch (default:
8) - custom_instructions: Any additional translation instructions from the user (optional)
If the file path is not provided, ask the user.
2. Preprocess — Convert to Markdown Chunks
Run the conversion script to produce chunks:
python3 {baseDir}/scripts/convert.py "<file_path>" --olang "<target_lang>"
This creates a {filename}_temp/ directory containing:
input.html,input.md— intermediate fileschunk0001.md,chunk0002.md, ... — source chunks for translationmanifest.json— chunk manifest for tracking and validationconfig.txt— pipeline configuration with metadata
3. Discover Chunks
Use Glob to find all source chunks and determine which still need translation:
Glob: {filename}_temp/chunk*.md
Glob: {filename}_temp/output_chunk*.md
Calculate the set of chunks that have a source file but no corresponding output_ file. These are the chunks to translate.
If all chunks already have translations, skip to step 5.
4. Parallel Translation with Sub-Agents
Each chunk gets its own independent sub-agent (1 chunk = 1 sub-agent = 1 fresh context). This prevents context accumulation and output truncation.
Launch chunks in batches to respect API rate limits:
- Each batch: up to
concurrencysub-agents in parallel (default: 8) - Wait for the current batch to complete before launching the next
Spawn each sub-agent with the following task. Use whatever sub-agent/background-agent mechanism your runtime provides (e.g. the Agent tool, sessions_spawn, or equivalent).
The output file is output_ prefixed to the source filename: chunk0001.md → output_chunk0001.md.
Translate the file
<temp_dir>/chunk<NNNN>.mdto {TARGET_LANGUAGE} and write the result to<temp_dir>/output_chunk<NNNN>.md. Follow the translation rules below. Output only the translated content — no commentary.
Each sub-agent receives:
- The single chunk file it is responsible for
- The temp directory path
- The target language
- The translation prompt (see below)
- Any custom instructions
Each sub-agent's task:
- Read the source chunk file (e.g.
chunk0001.md) - Translate the content following the translation rules below
- Write the translated content to
output_chunk0001.md
IMPORTANT: Each sub-agent translates exactly ONE chunk and writes the result directly to the output file. No START/END markers needed.
Translation Prompt for Sub-Agents
Include this translation prompt in each sub-agent's instructions (replace {TARGET_LANGUAGE} with the actual language name, e.g. "Chinese"):
请翻译markdown文件为 {TARGET_LANGUAGE}. IMPORTANT REQUIREMENTS:
- 严格保持 Markdown 格式不变,包括标题、链接、图片引用等
- 仅翻译文字内容,保留所有 Markdown 语法和文件名
- 删除页码、空链接、不必要的字符和如: 行末的'\'
- 删除只有数字的行,那可能是页码
- 保证格式和语义准确翻译内容自然流畅
- 只输出翻译后的正文内容,不要有任何说明、提示、注释或对话内容。
- 表达清晰简洁,不要使用复杂的句式。请严格按顺序翻译,不要跳过任何内容。
- 必须保留所有图片引用,包括:
- 所有
格式的图片引用必须完整保留
- 图片文件名和路径不要修改(如 media/image-001.png)
- 图片alt文本可以翻译,但必须保留图片引用结构
- 不要删除、过滤或忽略任何图片相关内容
- 图片引用示例:
-> 
- 所有
- 智能识别和处理多级标题,按照以下规则添加markdown标记:
- 主标题(书名、章节名等)使用 # 标记
- 一级标题(大节标题)使用 ## 标记
- 二级标题(小节标题)使用 ### 标记
- 三级标题(子标题)使用 #### 标记
- 四级及以下标题使用 ##### 标记
- 标题识别规则:
- 独立成行的较短文本(通常少于50字符)
- 具有总结性或概括性的语句
- 在文档结构中起到分隔和组织作用的文本
- 字体大小明显不同或有特殊格式的文本
- 数字编号开头的章节文本(如 "1.1 概述"、"第三章"等)
- 标题层级判断:
- 根据上下文和内容重要性判断标题层级
- 章节类标题通常为高层级(# 或 ##)
- 小节、子节标题依次降级(### #### #####)
- 保持同一文档内标题层级的一致性
- 注意事项:
- 不要过度添加标题标记,只对真正的标题文本添加
- 正文段落不要添加标题标记
- 如果原文已有markdown标题标记,保持其层级结构
- {CUSTOM_INSTRUCTIONS if provided}
markdown文件正文:
5. Verify Completeness and Retry
After all batches complete, use Glob to check that every source chunk has a corresponding output file.
If any are missing, retry them — each missing chunk as its own sub-agent. Maximum 2 attempts per chunk (initial + 1 retry).
Also read manifest.json and verify:
- Every chunk id has a corresponding output file
- No output file is empty (0 bytes)
Report any chunks that failed after retry.
6. Translate Book Title
Read config.txt from the temp directory to get the original_title field.
Translate the title to the target language. For Chinese, wrap in 书名号: 《translated_title》.
7. Post-process — Merge and Build
Run the build script with the translated title:
python3 {baseDir}/scripts/merge_and_build.py --temp-dir "<temp_dir>" --title "<translated_title>" --cleanup
The --cleanup flag removes intermediate files (chunks, input.html, etc.) after a fully successful build. If the user asked to keep intermediates, omit --cleanup.
The script reads output_lang from config.txt automatically. Optional overrides: --lang, --author.
This produces in the temp directory:
output.md— merged translated markdownbook.html— web version with floating TOCbook_doc.html— ebook versionbook.docx,book.epub,book.pdf— format conversions (requires Calibre)
8. Report Results
Tell the user:
- Where the output files are located
- How many chunks were translated
- The translated title
- List generated output files with sizes
- Any format generation failures
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases
User Story & Requirements Generation
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Competitive Analysis
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Roadmap Prioritization
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Implementation Guide
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Steps
- 1Install product management skill
- 2Start with user story generation for known feature
- 3Progress to competitive analysis: research 2-3 competitors
- 4Use for roadmap prioritization: apply RICE/ICE scoring
- 5Draft stakeholder communications and refine based on feedback
- 6Build template library for recurring PM tasks
- 7Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This
✓ Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Related Skills
grill-me
365mattpocock/skills
premortem
196parcadei/continuous-claude-v3
deslop
116cursor/plugins
framer-motion
97pproenca/dot-skills
write-a-prd
88mattpocock/skills
travel-planner
87ailabs-393/ai-labs-claude-skills
Reviews
- MMateo Yang★★★★★Dec 20, 2024
Solid pick for teams standardizing on skills: translate-book is focused, and the summary matches what you get after install.
- IIshan Sharma★★★★★Dec 16, 2024
translate-book has been reliable in day-to-day use. Documentation quality is above average for community skills.
- GGanesh Mohane★★★★★Dec 12, 2024
We added translate-book from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- MMateo Chen★★★★★Dec 12, 2024
Keeps context tight: translate-book is the kind of skill you can hand to a new teammate without a long onboarding doc.
- SShikha Mishra★★★★★Dec 8, 2024
I recommend translate-book for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- LLucas Jackson★★★★★Nov 11, 2024
Registry listing for translate-book matched our evaluation — installs cleanly and behaves as described in the markdown.
- OOmar Khanna★★★★★Nov 7, 2024
Useful defaults in translate-book — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- SSakshi Patil★★★★★Nov 3, 2024
translate-book fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- VValentina Gupta★★★★★Nov 3, 2024
translate-book is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- OOmar Patel★★★★★Oct 26, 2024
translate-book is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
showing 1-10 of 64
Discussion
Comments — not star reviews- No comments yet — start the thread.