All skills
jimliu avatar

/baoyu-translate

@441ca30 official
by Jim Liu 宝玉jimliu/baoyu-skills26k stars
2,896

This skill should be used when the user asks to "translate", "翻译", "精翻", "translate article", "translate to Chinese", "translate to English", "改成中文", "改成英文", "convert to Chinese", "localize", "本地化", "refined translation", "精细翻译", "proofread translation", "快速翻译", "快翻", "这篇文章翻译一下", or provides a URL/file with translation intent. Supports three modes (quick/normal/refined) with custom glossary support.

Use this Skill: https://skilld.dev/gh/jimliu/baoyu-skills/baoyu-translate

This session only. Nothing lands on disk.

referencessubagent-prompt-template.md

≈861 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Subagent Translation Prompt Template

Two parts:

  1. 02-prompt.md — Shared context (saved to output directory). Contains background, glossary, challenges, and principles. No task-specific instructions.
  2. Subagent spawn prompt — Task instructions passed when spawning each subagent. One subagent per chunk (or per source file if non-chunked).

The main agent reads 01-analysis.md (if exists), inlines all relevant context into 02-prompt.md, then spawns subagents in parallel with task instructions referencing that file.

Replace {placeholders} with actual values. Omit sections marked "if analysis exists" for quick mode.


Part 1: 02-prompt.md (shared context, saved as file)

You are a professional translator. Your task is to translate markdown content from {source_lang} to {target_lang}.

## Target Audience & Style

**Audience**: {audience description}

**Target style**: {style description — e.g., "storytelling: engaging narrative flow, smooth transitions, vivid phrasing" or custom style from user}

**Source voice** (from analysis, if exists): {Brief description of the original author's voice — formal/conversational, humor, register, sentence rhythm.}

## Content Background

{Inlined from 01-analysis.md if analysis exists: content summary, core argument, author background, context.}

## Glossary

Apply these term translations consistently. First occurrence: include original in parentheses.

{Merged glossary — one per line: English → Translation}

## Translation Challenges

{Inlined from 01-analysis.md §1.4 if analysis exists. Comprehension gaps, figurative language, structural challenges with suggested approaches:}

- **{term/passage}**: {challenge type} → {suggested approach}

## Translation Principles

Rewrite the content into natural, engaging {target_lang} — not merely translate it. Every sentence should read as if a skilled native writer composed it from scratch.

- **Accuracy first**: Facts, data, and logic must match the original exactly
- **Natural flow**: Use idiomatic {target_lang} word order. Break long source sentences into shorter, natural ones. Interpret metaphors and idioms by intended meaning, not word-for-word
- **Terminology**: Use glossary translations consistently. Annotate with original in parentheses on first occurrence of specialized terms
- **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

Part 2: Subagent spawn prompt (passed as Agent tool prompt)

Chunked mode (one subagent per chunk, all spawned in parallel)

Read the translation instructions from: {output_dir}/02-prompt.md

You are translating chunk {NN} of {total_chunks}.
Context: {brief description of what this chunk covers and where it sits in the overall argument}

Translate this chunk:
1. Read `{output_dir}/chunks/chunk-{NN}.md`
2. Translate following the instructions in 02-prompt.md
3. Save translation to `{output_dir}/chunks/chunk-{NN}-draft.md`

Non-chunked mode

Read the translation instructions from: {output_dir}/02-prompt.md

Translate the source file and save the result:
1. Read `{source_file_path}`
2. Save translation to `{output_path}`

Source: SKILL.md on GitHub

2 warnings16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill provides translation features with multi-mode workflows (quick, normal, refined) and custom glossary handling. Security scanning has detected zero risk vectors.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: MEDIUM · 1 issue

  • Runlayer6mo

    2/10 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 441ca30. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 4 months ago
version
1.117.3
Other metadata
metadata
{
  "openclaw": {
    "homepage": "https://github.com/JimLiu/baoyu-skills#baoyu-translate",
    "requires": {
      "anyBins": [
        "bun",
        "npx"
      ]
    }
  }
}
  • translation
  • multilingual
  • chinese
  • english
  • glossary
  • markdown
  • content-localization
  • document-processing
  • workflow-automation

README badge

README badge for jimliu/baoyu-skills/baoyu-translate

Translates text, articles, and URLs between languages (EN↔ZH by default) in three modes: quick for direct translation, normal for analysis-informed translation, and refined for publication-quality output with review and polish. Supports custom glossaries, multiple style presets (storytelling, formal, technical, academic, business, etc.), and automatic chunking for long documents to maintain terminology consistency across sections.

Generated from the current SKILL.md.

Does this skill support languages other than Chinese and English?
The skill defaults to Chinese (zh-CN) and includes a built-in glossary for EN↔ZH pairs. It can accept custom target languages via the `--to` flag or `target_language` in EXTEND.md, but glossary support and auto-detection are optimized for Chinese/English workflows.
What's the difference between quick, normal, and refined modes?
Quick mode translates directly in one pass, best for short informal content. Normal mode analyzes content first, then translates with better consistency. Refined mode adds a review and polish cycle for publication-quality output.
How does the skill handle long articles?
If content exceeds 4000 words (configurable), normal and refined modes automatically chunk it into smaller pieces, extract terminology for consistency, and translate chunks in parallel using subagents if available. Quick mode translates without chunking regardless of length.
Can I use a custom glossary or style?
Yes. Create an EXTEND.md file in your project or home config directory to define custom glossaries (inline or external files), target audience, translation style (e.g., formal, technical, conversational), and other preferences. EXTEND.md is checked on first run and required before any translation.
What does the skill require to run?
Bun or npx (to run bun). The skill includes TypeScript scripts that chunk markdown and coordinate the translation workflow.

Generated from the current SKILL.md. These answers refresh after source changes.