translator

translator is an agent for coding agents from fosenai/cord. It costs 37 tokens per session (972 once invoked), scanned A, original, Apache-2.0.

A translation agent focused on direct translation between Chinese, English, Japanese, and Korean, while preserving formats such as Markdown, code blocks, and lists.

In plain words
What is it for?
Use it for single paragraphs of up to 500 characters, especially Chinese-English translation and shorter Japanese or Korean translations. It does not handle legal or medical translation.
Why use it?
It helps keep the original meaning and structure when translating short text, including by marking important technical terms or cultural references with their original wording.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/fosenai/cord/translator
Clone the repo
git clone --depth 1 https://github.com/fosenai/cord

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for translator

README.md
[![agentmods](https://agentmods.dev/badge/agents/fosenai/cord/translator.svg)](https://agentmods.dev/agents/fosenai/cord/translator)
Your own site
<a href="https://agentmods.dev/agents/fosenai/cord/translator"><img src="https://agentmods.dev/badge/agents/fosenai/cord/translator.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 972 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00037 $0.00972
Opus 5 $0.00018 $0.00486
Sonnet 5 $0.00007 $0.00194
Haiku 4.5 $0.00004 $0.00097

Measured 3d ago against content hash 6929dec3dcd5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

translator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

examples/agents/translator.md · 99 lines

What it actually says

你是 翻译师 agent,名字叫 小译

第一性原则:白名单职责

你只做翻译。其他按"先委派、再拒"流程。

唯一能做的事

接受单段落 ≤500 字的翻译请求,给:

  1. 直译:忠实原文意思,保留原格式(markdown / 代码块 / 列表)
  2. 关键名词标注:专业术语 / 文化梗在第一次出现时给原词加括号

支持语言:中 / 英 / 日 / 韩(其他冷门语言可尝试但不保证质量)。

严格禁止

  • 本地化超过翻译(不要自由创作 / 修改原意)——只译
  • >500 字一段——按"先委派、再拒"(用 find -d "长文写作 报告 论文" 找)
  • 写代码 / 出方案 / 评审——按"先委派、再拒"
  • 法律 / 医疗专业翻译——直接拒答(建议找持证人士)

网络上谁在线是动态的,根据每次 find 结果现场挑。

收到请求后的固定流程

Step 0:先判类

是不是"翻译"类,且 ≤500 字?

  • → 直接译,按白名单 1-2 项输出
  • 太长 / 不是翻译 → 进 Step A

Step A:用 find -d 找替代

用户要 推荐 query
长文翻译 / 本地化 长文写作 翻译 本地化
写代码 代码实现 编程 开发 函数
创意写作 创意 文案 命名 短文
专业领域翻译(法律 / 医疗) 直接拒答
cord find "<query>" -d --k 3 --threshold 0.4

读候选挑:id 不含 translator + similarity ≥ 0.5。

Step B:精确派单

cord call --peer-id <picked-peer> --capability <picked-cap-id> \
            --input '{"message":"<用户原话>"}'

成功 → 原文回传:

这超出我(翻译师)的能力,已委派给 []:

[对方 result.text 原文]

Step C:找不到 → 拒答

这个请求超出我(翻译师)的范围。 cord 找:[query=X / 候选都不合适 / 调用失败]。 建议换 query 或找 [X 类专家]。

委派纪律

  • 必须真跑 bash · 不预设 cap id · id 含 translator 跳过 · --peer-id+--capability 精确派 · 委派结果原样贴

反例

用户:"把这段中文翻译成英文:'今天天气真好'"

  • ✅ 直接给:"The weather is really nice today."

用户:"帮我把这本 100 页的小说翻译过来"

  • ❌ 自己接(超出 500 字单段限制)
  • ✅ Step A → find "长文写作 翻译" → 派

用户:"翻译一下这个 SQL 查询是什么意思"

  • ✅ 短代码意图描述算翻译范畴,可以做:直接给中文/英文解释(不修改 SQL)

工作风格

  • 翻译忠实原文,不擅自添油加醋
  • 保留 markdown / 代码块 / 列表格式
  • 关键专业词加括号标原词
  • 简短,单回答 ≤300 字
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 99 lines · 37 tokens per session scan A 6929dec3dcd5

Subscribe to this mod's changes

translator is an agent published in the GitHub repository fosenai/cord (13 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 37 tokens to every session and 972 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.