baoyu-translate▌
jimliu/baoyu-skills · updated Apr 21, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
Three-mode translation with terminology consistency and publication-quality refinement workflows.
- ›Supports quick (direct), normal (analyze then translate), and refined (analyze, translate, review, polish) modes; auto-detects mode from user intent keywords
- ›Handles long content via intelligent markdown-aware chunking with parallel subagent translation and shared glossary enforcement across chunks
- ›Customizable via EXTEND.md for target language, mode, audience, style presets (storytellin
Translator
Three-mode translation skill: quick for direct translation, normal for analysis-informed translation, refined for full publication-quality workflow with review and polish.
Script Directory
Scripts in scripts/ subdirectory. {baseDir} = this SKILL.md's directory path. Resolve ${BUN_X} runtime: if bun installed → bun; if npx available → npx -y bun; else suggest installing bun. Replace {baseDir} and ${BUN_X} with actual values.
| Script | Purpose |
|---|---|
scripts/main.ts |
CLI entry point. Default action splits markdown into chunks; also supports explicit chunk subcommand |
scripts/chunk.ts |
Markdown chunking implementation used by main.ts and kept compatible for direct invocation |
Preferences (EXTEND.md)
Check EXTEND.md existence (priority order):
# macOS, Linux, WSL, Git Bash
test -f .baoyu-skills/baoyu-translate/EXTEND.md && echo "project"
test -f "${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-translate/EXTEND.md" && echo "xdg"
test -f "$HOME/.baoyu-skills/baoyu-translate/EXTEND.md" && echo "user"
# PowerShell (Windows)
if (Test-Path .baoyu-skills/baoyu-translate/EXTEND.md) { "project" }
$xdg = if ($env:XDG_CONFIG_HOME) { $env:XDG_CONFIG_HOME } else { "$HOME/.config" }
if (Test-Path "$xdg/baoyu-skills/baoyu-translate/EXTEND.md") { "xdg" }
if (Test-Path "$HOME/.baoyu-skills/baoyu-translate/EXTEND.md") { "user" }
| Path | Location |
|---|---|
.baoyu-skills/baoyu-translate/EXTEND.md |
Project directory |
$HOME/.baoyu-skills/baoyu-translate/EXTEND.md |
User home |
| Result | Action |
|---|---|
| Found | Read, parse, apply settings. On first use in session, briefly remind: "Using preferences from [path]. You can edit EXTEND.md to customize glossary, audience, etc." |
| Not found | MUST run first-time setup (see below) — do NOT silently use defaults |
EXTEND.md Supports: Default target language | Default mode | Target audience | Custom glossaries (inline or file path) | Translation style | Chunk settings
Schema: references/config/extend-schema.md
First-Time Setup (BLOCKING)
CRITICAL: When EXTEND.md is not found, you MUST run the first-time setup before ANY translation. This is a BLOCKING operation.
Full reference: references/config/first-time-setup.md
Use AskUserQuestion with all questions (target language, mode, audience, style, save location) in ONE call. After user answers, create EXTEND.md at the chosen location, confirm "Preferences saved to [path]", then continue.
Defaults
All configurable values in one place. EXTEND.md overrides these; CLI flags override EXTEND.md.
| Setting | Default | EXTEND.md key | CLI flag | Description |
|---|---|---|---|---|
| Target language | zh-CN |
target_language |
--to |
Translation target language |
| Mode | normal |
default_mode |
--mode |
Translation mode |
| Audience | general |
audience |
--audience |
Target reader profile |
| Style | storytelling |
style |
--style |
Translation style preference |
| Chunk threshold | 4000 |
chunk_threshold |
— | Word count to trigger chunked translation |
| Chunk max words | 5000 |
chunk_max_words |
— | Max words per chunk |
Modes
| Mode | Flag | Steps | When to Use |
|---|---|---|---|
| Quick | --mode quick |
Translate | Short texts, informal content, quick tasks |
| Normal | --mode normal (default) |
Analyze → Translate | Articles, blog posts, general content |
| Refined | --mode refined |
Analyze → Translate → Review → Polish | Publication-quality, important documents |
Default mode: Normal (can be overridden in EXTEND.md default_mode setting).
Style presets — control the voice and tone of the translation (independent of audience):
| Value | Description | Effect |
|---|---|---|
storytelling |
Engaging narrative flow (default) | Draws readers in, smooth transitions, vivid phrasing |
formal |
Professional, structured | Neutral tone, clear organization, no colloquialisms |
technical |
Precise, documentation-style | Concise, terminology-heavy, minimal embellishment |
literal |
Close to original structure | Minimal restructuring, preserves source sentence patterns |
academic |
Scholarly, rigorous | Formal register, complex clauses OK, citation-aware |
business |
Concise, results-focused | Action-oriented, executive-friendly, bullet-point mindset |
humorous |
Preserves and adapts humor | Witty, playful, recreates comedic effect in target language |
conversational |
Casual, spoken-like | Friendly, approachable, as if explaining to a friend |
elegant |
Literary, polished prose | Aesthetically refined, rhythmic, carefully crafted word choices |
Custom style descriptions are also accepted, e.g., --style "poetic and lyrical".
Auto-detection:
- "快翻", "quick", "直接翻译" → quick mode
- "精翻", "refined", "publication quality", "proofread" → refined mode
- Otherwise → default mode (normal)
Upgrade prompt: After normal mode completes, display:
Translation saved. To further review and polish, reply "继续润色" or "refine".
If user responds, continue with review → polish steps (same as refined mode Steps 4-6 in refined-workflow.md) on the existing output.
Usage
/translate [--mode quick|normal|refined] [--from <lang>] [--to <lang>] [--audience <audience>] [--style <style>] [--glossary <file>] <source>
<source>: File path, URL, or inline text--from: Source language (auto-detect if omitted)--to: Target language (from EXTEND.md or defaultzh-CN)--audience: Target reader profile (from EXTEND.md or defaultgeneral)--style: Translation style (from EXTEND.md or defaultstorytelling)--glossary: Additional glossary file to merge with EXTEND.md glossary
Audience presets:
| Value | Description | Effect |
|---|---|---|
general |
General readers (default) | Plain language, more translator's notes for jargon |
technical |
Developers / engineers | Less annotation on common tech terms |
academic |
Researchers / scholars | Formal register, precise terminology |
business |
Business professionals | Business-friendly tone, explain tech concepts |
Custom audience descriptions are also accepted, e.g., --audience "AI感兴趣的普通读者".
Workflow
Step 1: Load Preferences
1.1 Check EXTEND.md (see Preferences section above)
1.2 Load built-in glossary for the language pair if available:
- EN→ZH: references/glossary-en-zh.md
1.3 Merge glossaries: EXTEND.md glossary (inline) + EXTEND.md glossary_files (external files, paths relative to EXTEND.md location) + built-in glossary + --glossary file (CLI overrides all)
Step 2: Materialize Source & Create Output Directory
Materialize source (file as-is, inline text/URL → save to translate/{slug}.md), then create output directory: {source-dir}/{source-basename}-{target-lang}/. Detect source language if --from not specified.
Full details: references/workflow-mechanics.md
Output directory contents (all intermediate and final files go here):
| File | Mode | Description |
|---|---|---|
translation.md |
All | Final translation (always this name) |
01-analysis.md |
Normal, Refined | Content analysis (domain, tone, terminology) |
02-prompt.md |
Normal, Refined | Assembled translation prompt |
03-draft.md |
Refined | Initial draft before review |
04-critique.md |
Refined | Critical review findings (diagnosis only) |
05-revision.md |
Refined | Revised translation based on critique |
chunks/ |
Chunked | Source chunks + translated chunks |
Step 3: Assess Content Length
Quick mode does not chunk — translate directly regardless of length. Before translating, estimate word count. If content exceeds chunk threshold (default 4000 words), proactively warn: "This article is ~{N} words. Quick mode translates in one pass without chunking — for long content, --mode normal produces better results with terminology consistency." Then proceed if user doesn't switch.
For normal and refined modes:
| Content | Action |
|---|---|
| < chunk threshold | Translate as single unit |
| >= chunk threshold | Chunk translation (see Step 3.1) |
3.1 Long Content Preparation (normal/refined modes, >= chunk threshold only)
Before translating chunks:
- Extract terminology: Scan entire document for proper nouns, technical terms, recurring phrases
- Build session glossary: Merge extracted terms with loaded glossaries, establish consistent translations
- Split into chunks: Use
${BUN_X} {baseDir}/scripts/main.ts <file> [--max-words <chunk_max_words>] [--output-dir <output-dir>]- Parses markdown blocks (headings, paragraphs, lists, code blocks, tables, etc.)
- Splits at markdown block boundaries to preserve structure
- If a single block exceeds the threshold, falls back to line splitting, then word splitting
- Assemble translation prompt:
- Main agent reads
01-analysis.md(if exists) and assembles shared context using Part 1 of references/subagent-prompt-template.md — inlining: target style, content background, merged glossary, and translation challenges - Save as
02-prompt.mdin the output directory (shared context only, no task instructions)
- Main agent reads
- Draft translation via subagents (if Agent tool available):
- Spawn one subagent per chunk, all in parallel (Part 2 of the template)
- Each subagent reads
02-prompt.mdfor shared context, receives chunk position info (chunk N of M + brief context of where it sits in the argument), translates its chunk, saves tochunks/chunk-NN-draft.md - Consistency is guaranteed by the shared
02-prompt.md(glossary, figurative language mapping, comprehension challenges, source voice, and translation challenges from analysis) - If no chunks (content under threshold): spawn one subagent for the entire source file
- If Agent tool is unavailable, translate chunks sequentially inline using
02-prompt.md
- Merge: Once all subagents complete, combine translated chunks in order. If
chunks/frontmatter.mdexists, prepend it. Save as03-draft.md(refined) ortranslation.md(normal) - All intermediate files (source chunks + translated chunks) are preserved in
chunks/
After chunked draft is merged, return control to main agent for critical review, revision, and polish (Step 4).
Step 4: Translate & Refine
Translation principles (apply to all modes):
- Rewrite, not translate: Rewrite content into natural, engaging target language as if a skilled native writer composed it from scratch. Quality test: "Does this read like it was originally written in the target language?"
- Accuracy first: Facts, data, and logic must match the original exactly
- Natural flow: Use idiomatic target language word order. Break long source sentences into shorter, natural ones. Interpret metaphors and idioms by intended meaning, not word-for-word
- Terminology: Use standard translations consistently. First occurrence of specialized terms: annotate with original in parentheses
- Preserve format: Keep all markdown formatting (headings, bold, italic, images, links, code blocks)
- Proactive interpretation: For jargon or concepts the target audience may lack context for, add concise explanations in bold parentheses
(**解释**). Keep annotations few — only where genuinely needed for comprehension - Frontmatter: If source has YAML frontmatter, rename source-metadata fields with
sourceprefix (camelCase:url→sourceUrl,title→sourceTitle, etc.), add translated values as new top-level fields (skiptitleif body has H1), keep other fields as-is
Quick Mode
Translate directly → save to translation.md. Apply all translation principles above.
Normal Mode
- Analyze →
01-analysis.md(domain, tone, terminology, translation challenges) - Assemble prompt →
02-prompt.md(translation instructions with context, glossary, challenges) - Translate (following
02-prompt.md) →translation.md
After completion, prompt user: "Translation saved. To further review and polish, reply 继续润色 or refine."
If user continues, proceed with critical review → revision → polish (same as refined mode Steps 4-6 below), saving 03-draft.md (rename current translation.md), 04-critique.md, 05-revision.md, and updated translation.md.
Refined Mode
Full workflow for publication quality. See references/refined-workflow.md for detailed guidelines per step.
The subagent (if used in Step 3.1) only handles the initial draft. All subsequent steps (critical review, revision, polish) are handled by the main agent, which may delegate to subagents at its discretion.
Steps and saved files (all in output directory):
- Analyze →
01-analysis.md(domain, tone, terminology, translation challenges) - Assemble prompt →
02-prompt.md(translation instructions with inlined context) - Draft →
03-draft.md(initial translation with translator's notes; from subagent if chunked) - Critical review →
04-critique.md(diagnosis only: accuracy, Europeanized language, strategy execution, expression issues) - Revision →
05-revision.md(apply all critique findings to produce revised translation) - Polish →
translation.md(final publication-quality translation)
Each step reads the previous step's file and builds on it.
Step 5: Output
Final translation is always at translation.md in the output directory.
After the final translation is written, do a lightweight image-language pass:
- Collect image references from the translated article
- Identify likely text-heavy images such as covers, screenshots, diagrams, charts, frameworks, and infographics
- If any image likely contains a main text language that does not match the translated article language, proactively remind the user
- The reminder must be a list only. Do not automatically localize those images unless the user asks
Reminder format (use whatever image syntax the article already uses — standard markdown or wikilink):
Possible image localization needed:
- : likely still contains source-language text while the article is now in target language
- : likely text-heavy framework graphic, check whether labels need translation
Display summary:
**Translation complete** ({mode} mode)
Source: {source-path}
Languages: {from} → {to}
Output dir: {output-dir}/
Final: {output-dir}/translation.md
Glossary terms applied: {count}
If mismatched image-language candidates were found, append a short note after the summary telling the user that some embedded images may still need image-text localization, followed by the candidate list.
Extension Support
Custom configurations via EXTEND.md. See Preferences section for paths and supported options.
How to use baoyu-translate 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 development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add baoyu-translate
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches baoyu-translate from GitHub repository jimliu/baoyu-skills and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate baoyu-translate. Access the skill through slash commands (e.g., /baoyu-translate) or your agent's skill management interface.
Security & Verification 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 development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
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
Installation Steps
- 1.Install product management skill
- 2.Start with user story generation for known feature
- 3.Progress to competitive analysis: research 2-3 competitors
- 4.Use for roadmap prioritization: apply RICE/ICE scoring
- 5.Draft stakeholder communications and refine based on feedback
- 6.Build template library for recurring PM tasks
- 7.Share 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
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.8★★★★★50 reviews- ★★★★★Shikha Mishra· Dec 24, 2024
Solid pick for teams standardizing on skills: baoyu-translate is focused, and the summary matches what you get after install.
- ★★★★★William Agarwal· Dec 24, 2024
Solid pick for teams standardizing on skills: baoyu-translate is focused, and the summary matches what you get after install.
- ★★★★★Isabella Agarwal· Dec 8, 2024
baoyu-translate fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Xiao Liu· Dec 4, 2024
We added baoyu-translate from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Hana Mehta· Nov 27, 2024
baoyu-translate has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Hana Ramirez· Nov 23, 2024
Solid pick for teams standardizing on skills: baoyu-translate is focused, and the summary matches what you get after install.
- ★★★★★Yash Thakker· Nov 15, 2024
We added baoyu-translate from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Ishan Flores· Nov 15, 2024
We added baoyu-translate from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Xiao Farah· Nov 15, 2024
Keeps context tight: baoyu-translate is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Zara White· Oct 18, 2024
Solid pick for teams standardizing on skills: baoyu-translate is focused, and the summary matches what you get after install.
showing 1-10 of 50