Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计未展示

translation-assistant翻译助理

Agent Skill

translation-assistant 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

17,412

周安装

734

GitHub Stars

公开资料未说明

下载量

5,268
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:translation-assistant(翻译助理)
来源仓库:https://github.com/eddiebe147/claude-settings
仓库路径:skills/translation-assistant
安装命令:
npx skills add https://github.com/eddiebe147/claude-settings --skill 'Translation Assistant'
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/eddiebe147/claude-settings --skill 'Translation Assistant'

简介

用于查找、检索和筛选相关信息。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

  • 适合根据关键词或任务场景快速定位候选结果。
  • 可结合来源仓库和原始 README 核验具体用法。
  • 安装前建议确认权限范围、维护状态及是否触发联网或文件读写。
  • translation-assistant 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Translation Assistant

The Translation Assistant skill guides you through implementing multilingual translation systems that bridge language barriers accurately and culturally appropriately. From simple phrase translation to full document localization, this skill covers the spectrum of translation needs.

Modern translation has been transformed by neural machine translation and large language models, but effective translation still requires understanding context, domain, and cultural nuances. This skill helps you choose the right tools, handle translation quality, and build systems that work across languages.

Whether you're translating user interfaces, customer communications, technical documentation, or creative content, this skill ensures your translations are accurate, natural, and culturally appropriate.

Core Workflows

Workflow 1: Choose Translation Approach

  1. Assess requirements:

- Language pairs needed - Domain specificity - Quality requirements - Volume and speed needs - Budget constraints

  1. Compare options: Approach Quality Speed Cost Best For Google Translate API Good Fast $ General, high volume DeepL Very good Fast $$ European languages, quality OpenAI/Anthropic Excellent Medium $$$ Nuanced, context-heavy Custom NMT Domain-specific Fast Setup cost Specialized domains Human + MT Best Slow $$$$ Critical content
  2. Select based on tradeoffs
  3. Plan quality assurance process

Workflow 2: Implement Translation Pipeline

  1. Set up translation service: from google.cloud import translate_v2 as translate class TranslationPipeline: def __init__(self, provider="google"): if provider == "google": self.client = translate.Client() elif provider == "deepl": self.client = deepl.Translator(auth_key) elif provider == "llm": self.client = LLMTranslator() def translate(self, text, source_lang, target_lang): # Preprocess prepared = self.preprocess(text, source_lang) # Translate if self.provider == "google": result = self.client.translate(prepared, source_language=source_lang, target_language=target_lang) translated = result["translatedText"] elif self.provider == "llm": translated = self.llm_translate(prepared, source_lang, target_lang) # Postprocess final = self.postprocess(translated, target_lang) return final
  2. Handle special content:

- Preserve placeholders and variables - Handle HTML/markup - Maintain formatting

  1. Validate translation quality
  2. Add caching for repeated content

Workflow 3: Build Localization System

  1. Extract translatable content: def extract_strings(source_files): """Extract strings needing translation.""" strings = [] for file in source_files: # Find translatable strings content = read_file(file) matches = find_translatable(content) for match in matches: strings.append({"key": generate_key(match), "source": match.text, "context": match.surrounding_context, "file": file, "line": match.line}) return strings
  2. Translate with context: def translate_with_context(strings, target_lang): results = [] for s in strings: translation = translate(text=s["source"], context=s["context"], target_lang=target_lang) results.append({**s, "translation": translation, "target_lang": target_lang}) return results
  3. Store in translation management:

- Translation memory for consistency - Glossary for terminology - Version control for changes

  1. Deploy localized content

Quick Reference

ActionCommand/Trigger
Translate text"Translate [text] to [language]"
Choose service"Best translation for [use case]"
Handle domain terms"Translation glossary for [domain]"
Quality check"Check translation quality"
Localize app"Localize UI for [languages]"
Batch translate"Translate [N] documents"

Best Practices

  • Provide Context: Translation quality depends on context

- Include surrounding text - Specify domain/subject matter - Note tone and register (formal/informal)

  • Maintain Terminology Consistency: Key terms should translate consistently

- Build domain glossaries - Use translation memory - Review terminology with stakeholders

  • Preserve Formatting and Variables: Technical content has special needs

- Protect placeholders ({name}, %s, etc.) - Maintain HTML/markdown structure - Handle number and date formats

  • Handle Untranslatable Content: Some things shouldn't be translated

- Brand names and trademarks - Technical identifiers and codes - Legal disclaimers (sometimes)

  • Quality Assurance is Essential: Machine translation makes mistakes

- Back-translation for verification - Native speaker review - Automated quality checks

  • Consider Cultural Adaptation: Translation!= localization

- Date and number formats - Currency and units - Cultural references and idioms - Right-to-left languages

Advanced Techniques

LLM-Based Contextual Translation

Use language models for nuanced translation:

def llm_translate(text, source_lang, target_lang, context=None, style=None):
    prompt = f"""Translate the following text from {source_lang} to {target_lang}.

{"Context: " + context if context else ""}
{"Style: " + style if style else ""}

Important guidelines:
- Maintain the meaning and tone of the original
- Use natural, fluent {target_lang}
- Preserve any formatting, placeholders, or special characters
- If there are cultural references, adapt them appropriately

Source text:
{text}

Translation:"""

    return llm.complete(prompt)

# Example with context
result = llm_translate(
    text="The app crashed when I clicked submit.",
    source_lang="English",
    target_lang="Japanese",
    context="This is a bug report from a user",
    style="Formal technical support"
)

Translation Memory System

Reuse previous translations for consistency:

class TranslationMemory:
    def __init__(self):
        self.memory = {}  # source -> {lang: translation}
        self.fuzzy_index = FuzzyMatcher()

    def add(self, source, target_lang, translation):
        if source not in self.memory:
            self.memory[source] = {}
        self.memory[source][target_lang] = translation
        self.fuzzy_index.add(source)

    def lookup(self, source, target_lang, fuzzy_threshold=0.8):
        # Exact match
        if source in self.memory and target_lang in self.memory[source]:
            return {
                "match_type": "exact",
                "translation": self.memory[source][target_lang],
                "confidence": 1.0
            }

        # Fuzzy match
        matches = self.fuzzy_index.search(source, threshold=fuzzy_threshold)
        if matches:
            best = matches[0]
            if target_lang in self.memory[best.text]:
                return {
                    "match_type": "fuzzy",
                    "original_source": best.text,
                    "translation": self.memory[best.text][target_lang],
                    "confidence": best.score
                }

        return None

    def translate_with_memory(self, text, target_lang):
        # Check memory first
        cached = self.lookup(text, target_lang)
        if cached and cached["confidence"] > 0.95:
            return cached["translation"]

        # Translate fresh
        translation = translate_api(text, target_lang)

        # Store in memory
        self.add(text, target_lang, translation)

        return translation

Domain Glossary Management

Ensure consistent terminology:

class TranslationGlossary:
    def __init__(self, domain):
        self.domain = domain
        self.terms = {}  # source_term -> {lang: translated_term}

    def add_term(self, source, translations):
        self.terms[source.lower()] = translations

    def apply_to_translation(self, source_text, target_lang, translation):
        """
        Ensure glossary terms are used correctly in translation.
        """
        corrections = []
        source_lower = source_text.lower()

        for term, translations in self.terms.items():
            if term in source_lower and target_lang in translations:
                expected = translations[target_lang]
                if expected.lower() not in translation.lower():
                    corrections.append({
                        "source_term": term,
                        "expected": expected,
                        "found": False
                    })

        if corrections:
            # Re-translate with glossary enforcement
            return self.translate_with_glossary(source_text, target_lang)

        return translation

    def translate_with_glossary(self, text, target_lang):
        glossary_context = "\n".join([
            f"'{term}' should be translated as '{trans[target_lang]}'"
            for term, trans in self.terms.items()
            if target_lang in trans
        ])

        prompt = f"""Translate to {target_lang}, using these required terms:
{glossary_context}

Text: {text}"""

        return llm.complete(prompt)

Quality Estimation

Automatically assess translation quality:

def estimate_translation_quality(source, translation, source_lang, target_lang):
    """
    Estimate translation quality without reference translation.
    """
    checks = []

    # Check 1: Back-translation similarity
    back_translated = translate(translation, target_lang, source_lang)
    back_similarity = compute_similarity(source, back_translated)
    checks.append({
        "check": "back_translation",
        "score": back_similarity,
        "details": {"back_translated": back_translated}
    })

    # Check 2: Length ratio (translations should be similar length)
    length_ratio = len(translation) / max(len(source), 1)
    expected_ratio = get_expected_length_ratio(source_lang, target_lang)
    length_score = 1 - abs(length_ratio - expected_ratio) / expected_ratio
    checks.append({
        "check": "length_ratio",
        "score": max(0, length_score),
        "details": {"ratio": length_ratio, "expected": expected_ratio}
    })

    # Check 3: LLM quality assessment
    quality_prompt = f"""Rate this translation from 1-10 for accuracy and fluency.

Source ({source_lang}): {source}
Translation ({target_lang}): {translation}

Provide scores and brief explanation."""

    llm_assessment = llm.complete(quality_prompt)
    checks.append({
        "check": "llm_assessment",
        "score": parse_score(llm_assessment) / 10,
        "details": {"assessment": llm_assessment}
    })

    # Combined score
    overall = sum(c["score"] for c in checks) / len(checks)

    return {
        "overall_score": overall,
        "checks": checks,
        "recommendation": "accept" if overall > 0.8 else "review"
    }

Batch Translation with Consistency

Translate large volumes while maintaining consistency:

async def batch_translate_consistent(texts, target_lang, batch_size=50):
    """
    Translate many texts while maintaining terminology consistency.
    """
    # Step 1: Extract unique terms for glossary
    all_text = " ".join(texts)
    key_terms = extract_key_terms(all_text)

    # Step 2: Translate key terms first for consistency
    term_translations = {}
    for term in key_terms:
        translation = await translate_with_verification(term, target_lang)
        term_translations[term] = translation

    # Step 3: Batch translate with glossary context
    results = []
    for batch in chunk(texts, batch_size):
        batch_results = await asyncio.gather(*[
            translate_with_glossary(text, target_lang, term_translations)
            for text in batch
        ])
        results.extend(batch_results)

    return results

Common Pitfalls to Avoid

  • Translating without context, leading to wrong word choices
  • Inconsistent terminology across a project
  • Not handling placeholders and variables correctly
  • Ignoring cultural differences (dates, currencies, idioms)
  • Trusting machine translation without quality checks
  • Not maintaining translation memory for consistency
  • Forgetting about text expansion (translations are often longer)
  • Ignoring right-to-left language considerations

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.5%
按下载量换算1,501

OpenCode

24.68%
按下载量换算1,300

Gemini CLI

16.9%
按下载量换算890

Antigravity

12.92%
按下载量换算681

windsurf

8.47%
按下载量换算446

Cursor

3.65%
按下载量换算192

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源字段存在多来源差异,先按来源优先级自动处理,无法消解时进入异常复核队列。

来源信息

继续浏览同类 Skills