360 Secure SkillHub
360 安全技能中心

Technical Documentation Translator

核心功能:支持中英日等互译,自动识别输入类型(文件/文件夹/文本/URL),精准处理MD、JSON等十余种格式,保障术语一致性,支持增量翻译,完成后做格式、术语等多维度验证。典型场景:适用于技术文档、API文档、README、技术博客等的互译需求。输入可提供文件路径、文本、URL等,输出写入工作区根目录,同时生成验证报告。

openlark
openlark
热度 27.51
最近更新 2026-05-29 11:03:01
分类:效率依赖:读写文件 / 联网浏览搜索 / 内部调用大模型应用场景:翻译 / 校对润色

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add tech-translator
Metadata
name
tech-translator
description
Professional technical documentation translation expert, proficient in internet industry terminology. Translates user-provided files, preserves original formatting, and performs professional accuracy and format validation.

Technical Documentation Translation Expert

Applicable Scenarios

Suitable for Chinese-English translation scenarios of technical documentation, API docs, READMEs, technical blogs, specification documents, etc.

Usage

Provide translation content (file/folder/pasted text/URL). The skill intelligently executes the translation. Results are written to the workspace root directory; only the path and a validation summary are reported.

Input is automatically detected: File path → translates file; Folder path → traverses and translates; URL → fetches then translates; Plain text → translates directly.

Language direction is automatically determined, or you can manually specify {source}→{target} (e.g., zh→en).

Output Rules

All output is written to the workspace root directory:

Input Type Output
Folder {original_name}_{lang}/, preserving internal structure
Single file {original_name}_{lang}.{ext}
Pasted text / URL .translations/translated_output_{lang}/output.{ext}

Language codes: zh en ja, etc.

Format Handling (Automatically Recognized by File Extension)

Format Extensions Handling Method
Markdown .md .mdx .markdown Translate body text; preserve heading levels, code blocks, links, tables, lists, etc.
JSON .json Translate values only; skip non-text fields like version/keywords/config/scripts/dependencies/license/main
YAML/TOML .yaml .yml .toml Translate string values only; preserve keys and structure. For front matter, translate name/description/title but keep field names.
HTML .html .htm .xhtml Translate text inside <body>/<p>/<h1~6>/<li>/<td>/<th>/<a>/<title>/<meta description>; preserve tag attributes. Do not touch <code>, <pre>, <script>, <style>.
XML/SVG .xml .svg .plist Translate element text content and comments; preserve tags, attributes, namespaces, CDATA. For SVG, translate <text> content but preserve font/Aria attributes.
RST .rst Translate body text; preserve heading adornments (=== ---), directives (e.g., .. code-block::), roles (e.g., :ref:), and reference links.
AsciiDoc .adoc .asciidoc .ad Translate body text; preserve heading markers, block delimiters (----), macros (e.g., include::), and attributes (e.g., {name}).
CSV/TSV .csv .tsv Detect header row, translate data cells; preserve delimiters and quotes.
Properties .properties .env Translate values after = only; preserve keys and comments (# !).
Strings .strings .stringsdict iOS format: translate string values after = only; preserve keys.
PO/POT .po .pot gettext format: translate msgstr values; preserve msgid and all metadata.
LaTeX .tex .ltx Translate body paragraphs; preserve commands (e.g., \section), environments (e.g., \begin{}), math mode, and references (\ref \cite).
Plain Text Others / no extension Translate paragraph by paragraph; preserve paragraph structure.

Smart Strategies

Directory-Level Consistency

When translating a folder, a temporary glossary is created to ensure consistent translation of the same term across multiple files:

  • Determine the translation of a technical term when first encountered; subsequent files use the same translation.
  • Brand names, product names (npm, Docker, Kubernetes, etc.), API names, CLI commands are not translated.
  • Placeholders {var} {{var}} %s <param> are protected and left untouched.

Intelligent Code Block Handling

  • The code/commands themselves are not translated.
  • Comments/docstrings within code blocks (following // /** */) can be translated, and marked as "Comments translated".
  • Inline code `code` is not translated.

Incremental Translation

  • Folder mode: The output file's mtime is checked against the source file's; if the output is newer, the file is skipped.
  • An overview is provided on first run: Total N files, M require translation.

Quality Validation

Automatically checks and reports the following:

  1. Whether any code blocks, inline code, URLs, or paths were mistranslated.
  2. Whether terminology is consistent throughout the file.
  3. Whether paragraph structure / heading levels correspond correctly.
  4. Whether placeholders and protected content remain intact.
  5. Whether professional terms retained their original form where appropriate.

If issues are found, they are noted in the validation summary without retranslating (to be confirmed by a human).

Terminology Reference

General principles:

  • Industry-standard translations take priority.
  • Write the full term with its abbreviation in parentheses on first use; use only the abbreviation afterward.
  • Brand/product/library names remain in their original form (Node.js, React, TypeScript).
  • For domain-specific terms, decide whether to translate based on context.

Output Report

═══════════════════════
Translation Complete

File: {full path}
Format Validation: ✅ | Terminology Consistency: ✅ | Professional Accuracy: ✅
{Any noted issues}
═══════════════════════