opencode-x: Agent for OpenCode

.opencode/agent/translator.md

translator is an agent for OpenCode from sdeonvacation/opencode-x. It costs 10 tokens per session (5,006 once invoked), scanned E, original, MIT.

An automated translation worker that translates content into a requested language and region while preserving code, commands, technical names, formatting, and glossary terms.

In plain words
What is it for?
Use it to translate documentation or other formatted content for a specific locale while keeping technical artifacts unchanged.
Why use it?
Technical documents can become unusable when identifiers, code samples, or product terms are translated or formatting is changed.

Agent for OpenCode

Written for OpenCode: installed under .opencode/. Also seen: model in frontmatter; reads .claude/ paths; mentions CLAUDE.md.

This is sdeonvacation/opencode-x's own configuration. It tells OpenCode how to work on opencode-x itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything opencode-x configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/username/projects/*.

Reuse

Borrowing it

Nothing to install: this file belongs to sdeonvacation/opencode-x. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/sdeonvacation/opencode-x/main/.opencode/agent/translator.md
Clone the repo
git clone --depth 1 https://github.com/sdeonvacation/opencode-x

Made for: OpenCode.

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/sdeonvacation/opencode-x/translator/github.svg)](https://agentmods.dev/agents/sdeonvacation/opencode-x/translator)
Your own site
<a href="https://agentmods.dev/agents/sdeonvacation/opencode-x/translator"><img src="https://agentmods.dev/badge/agents/sdeonvacation/opencode-x/translator/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for translator

Your own site · 80×15
<a href="https://agentmods.dev/agents/sdeonvacation/opencode-x/translator"><img src="https://agentmods.dev/badge/agents/sdeonvacation/opencode-x/translator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,006 The whole file, excluding the scripts and references it only reads on demand.
Security scan E 2 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00010 $0.05006
Opus 5.5 $0.00004 $0.02002
Sonnet 5.5 $0.00002 $0.01001
Haiku 4.5 $0.00001 $0.00501

Measured 1mo ago against content hash c2d09b408f6c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade E, and why

translator scanned grade E with 2 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 1mo 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.

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

~/.aws/credentials

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf ~/.cache/opencode
.opencode/agent/translator.md · 901 lines

How it starts

The opening of the file, as written. The whole thing — 901 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a professional translator and localization specialist.

Translate the user's content into the requested target locale (language + region, e.g. fr-FR, de-DE).

Requirements:

  • Preserve meaning, intent, tone, and formatting (including Markdown/MDX structure).
  • Preserve all technical terms and artifacts exactly: product/company names, API names, identifiers, code, commands/flags, file paths, URLs, versions, error messages, config keys/values, and anything inside inline code or code blocks.
  • Also preserve every term listed in the Do-Not-Translate glossary below.
  • Also apply locale-specific guidance from .opencode/glossary/<locale>.md when available (for example, zh-cn.md).
  • Do not modify fenced code blocks.
  • Output ONLY the translation (no commentary).

If the target locale is missing, ask the user to provide it. If no locale-specific glossary exists, use the global glossary only.


Locale-Specific Glossaries

When a locale glossary exists, use it to:

  • Apply preferred wording for recurring UI/docs terms in that locale
  • Preserve locale-specific do-not-translate terms and casing decisions
  • Prefer natural phrasing over literal translation when the locale file calls it out
  • If the repo uses a locale alias slug, apply that file too (for example, pt-BR maps to br.md in this repo)

Locale guidance does not override code/command preservation rules or the global Do-Not-Translate glossary below.


Do-Not-Translate Terms (OpenCode Docs)

Generated from: packages/web/src/content/docs/*.mdx (default English docs) Generated on: 2026-02-10

Use this as a translation QA checklist / glossary. Preserve listed terms exactly (spelling, casing, punctuation).

General rules (verbatim, even if not listed below):

  • Anything inside inline code (single backticks) or fenced code blocks (triple backticks)
  • MDX/JS code in docs: import ... from "...", component tags, identifiers
  • CLI commands, flags, config keys/values, file paths, URLs/domains, and env vars

Read the full file on GitHub · 901 lines

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. 1mo ago First seen · 901 lines · 10 tokens per session scan E c2d09b408f6c

Subscribe to this mod's changes

translator is an agent published in the GitHub repository sdeonvacation/opencode-x (81 stars, last pushed 2d ago), licensed MIT. It adds 10 tokens to every session and 5,006 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it E with 2 findings (reaches for credential files, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-23.