跳到主要内容
知仓学习社ZHICANG

translate

Document translation: quick/normal/refined modes with chunked parallel subagents and glossary support.

不碰外部(只输出文字)无严重或高危命中notque/vexjoy-agent

它会碰到什么

扫了多少3 个文本文件,17 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

Translate Skill

Translate documents across languages using one of three modes: quick (single-pass), normal (analyze-then-translate), or refined (full four-step with polish). Core principle: rewrite as a skilled native writer, not word-for-word conversion.

Reference Loading Table

| Signal | Load These Files | Why |

|---|---|---|

| Any translation task | references/modes.md | Mode detection, chunking algorithm, parallel dispatch pattern |

| "technical", "specialized", "glossary", "terms", or domain vocabulary in request | references/glossary-template.md | Glossary build, chunk injection, term-preservation rules |


Phase 1: DETECT MODE AND PREPARE

Goal: Identify mode, language pair, and document scale before any translation work.

Step 1: Infer mode from request language

| Request contains | Mode |

|---|---|

| "quick", "fast", "draft", "rough" | quick |

| "professional", "publication-quality", "polished", "refined" | refined |

| anything else | normal (default) |

Step 2: Detect language pair

  • Source language: identify from content if not stated; flag ambiguity to user.
  • Target language: take from request; ask if absent.

Step 3: Load references

  • Load references/modes.md for all modes.
  • Load references/glossary-template.md when the request contains "technical", "specialized", "glossary", "terms", or a domain-specific vocabulary word.

Step 4: Assess document size

  • Count approximate words.
  • Flag documents over 2000 words for chunked parallel translation (details in references/modes.md).

Gate: Mode, language pair, and size class confirmed. Proceed only when gate passes.


Phase 2: ANALYZE

Goal: Extract structural and stylistic facts that guide accurate translation. Skip this phase in quick mode.

Step 1: Language and dialect

State the identified source language and dialect (e.g., Brazilian Portuguese vs European Portuguese, Simplified vs Traditional Chinese).

Step 2: Register and tone

Classify as one of: academic, technical, narrative, marketing, casual, legal. Register determines word-choice formality in the target language.

Step 3: Document type

Classify as one of: article, code comments, game text, marketing copy, legal text, UI strings, chat/informal. Document type determines sentence length conventions and formatting expectations in the target.

Step 4: Specialized terminology

List domain-specific terms that need consistent translation or should stay in the source language. For technical content, build an initial glossary using the format in references/glossary-template.md.

Gate: Language/dialect, register, document type, and terminology list complete. Proceed only when gate passes.


Phase 3: TRANSLATE

Goal: Produce the translation using mode-specific approach from references/modes.md.

Translation principles (apply in all modes):

  • Use idiomatic target-language word order, not source-language structure.
  • Break long source sentences at natural target-language pause points.
  • Render metaphors by their intended meaning, not literal equivalent.
  • Annotate specialized terms on first occurrence: "machine learning (机器学习)".
  • Match the register (formal/informal) established in Phase 2.
  • Preserve source-language terms for proper nouns, brand names, and internationally recognized technical identifiers.

For documents over 2000 words: apply the chunking algorithm from references/modes.md — split at heading or paragraph boundaries, build a session glossary, dispatch parallel subagent calls per chunk with glossary injected, reassemble preserving document structure.

Output file: write translation to {source-file-stem}-{target-lang}.md when a source file is present. For inline text, deliver in-response.

Gate: All chunks translated, glossary consistent across chunks, document structure intact. Proceed only when gate passes.


Phase 4: POLISH

Goal: Improve register consistency and idiomatic flow. Apply in refined mode only.

Step 1: Register consistency scan

Read the full translated output. Flag passages where formality level shifts unexpectedly.

Step 2: Idiom review

Identify literal-sounding constructions that a skilled native writer would phrase differently. Rewrite each flagged passage.

Step 3: Specialized term audit

Confirm every specialized term is handled consistently: annotated on first use, same translation throughout, source-language terms preserved where appropriate.

Gate: Register consistent, idiomatic constructions improved, term handling verified. Proceed only when gate passes.


Phase 5: DELIVER

Goal: Report outcome with full traceability.

Deliver a brief summary:

Source: {source-file or "inline text"} ({source-language})
Target: {output-file or "inline"} ({target-language})
Mode: {quick | normal | refined}
Words translated: ~{count}
Chunks: {N} (if chunked)
Untranslated terms: {list with reasons, or "none"}

For multi-chunk documents, list any terms that differ between chunks and confirm the session glossary resolved them.


Error Handling

Ambiguous source language

Ask the user to confirm before translating. Guessing produces plausible but wrong output for closely related languages (Serbian vs Croatian, Malay vs Indonesian).

Untranslatable term

Preserve the source-language term, add a bracketed explanation in target language on first use, and list the term in the delivery summary with the reason it was kept.

Inconsistency detected across chunks

Re-translate the inconsistent chunk with the session glossary injected, replace the passage, and note the correction in the delivery summary.

Source file has mixed languages

Treat each section by its actual language. Flag the structure to the user in the delivery summary.


References

  • references/modes.md — Mode detection table, quick/normal/refined workflow, chunk detection threshold, chunking algorithm, parallel dispatch pattern
  • references/glossary-template.md — Glossary format, build procedure, chunk injection, term-preservation rules, example glossary

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 419
本站分层T2
该仓技能数122
原文件路径skills/content/translate/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 122 个技能