translate-add-locale

translate-add-locale is a command for Claude Code, OpenCode from roshaw/claude-translation-agency. It costs 201 tokens per session (1,451 once invoked), scanned A, original, MIT.

A command that adds a new interface language, also called a locale, to a codebase by wiring its settings and copying the source-language message files. It leaves placeholders for a separate translation step.

In plain words
What is it for?
Use it to register a locale, set language metadata, create its message catalog, and prepare the application to build and render in that language.
Why use it?
It removes the repetitive setup work needed before translating an application. It also makes clear that adding the language is not the same as translating its text.

Command for Claude CodeOpenCode

Written for OpenCode and Claude Code: installed under .opencode/, but also a Claude Code command (commands/*.md). Also seen: mentions subagents; mentions OpenCode.

Good fit Use it to register a locale, set language metadata, create its message catalog, and prepare the application to build and render in that language.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/roshaw/claude-translation-agency/translate-add-locale
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.

Clone the repo
git clone --depth 1 https://github.com/roshaw/claude-translation-agency

Made for: Claude Code, 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 translate-add-locale

README.md
[![agentmods](https://agentmods.dev/badge/commands/roshaw/claude-translation-agency/translate-add-locale/github.svg)](https://agentmods.dev/commands/roshaw/claude-translation-agency/translate-add-locale)
Your own site
<a href="https://agentmods.dev/commands/roshaw/claude-translation-agency/translate-add-locale"><img src="https://agentmods.dev/badge/commands/roshaw/claude-translation-agency/translate-add-locale/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 translate-add-locale

Your own site · 80×15
<a href="https://agentmods.dev/commands/roshaw/claude-translation-agency/translate-add-locale"><img src="https://agentmods.dev/badge/commands/roshaw/claude-translation-agency/translate-add-locale.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 201 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,451 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00201 $0.01451
Opus 5.5 $0.00080 $0.00580
Sonnet 5.5 $0.00040 $0.00290
Haiku 4.5 $0.00020 $0.00145

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

Security

Grade A, and why

translate-add-locale 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 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.

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.

.opencode/commands/translate-add-locale.md · 99 lines

How it starts

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

translate-add-locale

A thin orchestrator for adding one interface language to a codebase. The mechanical scaffolding is delegated to the general-purpose subagent; this skill resolves the locale metadata, sanity-checks it isn't a country code, hands off a clean brief, then points at /translate for the real work.

"Scaffolded" ≠ "done." The scaffold makes the build go green and the UI render in the new locale, but every string is still a source-language placeholder. The locale is not done until /translate --full --to <locale> fills it and the completeness gate confirms zero leftovers. The scaffold step reports 🟡 SCAFFOLDED — NOT DONE until then.

What this skill does NOT do

  • Translate. It clones the source language into the new locale's files as placeholders. Real translation + terminology audit is /translate's job, run right after (Step 4 hand-off). Do not hand-translate here and do not spawn the translator panel inline.
  • Add a data/content entity (a new product, country, article). A new language is not a new entity.
  • Change source facts, numbers, or references.
  • Commit or push. Stop on the working branch and let the human commit.

Language code vs country code (read first)

The argument is the language/locale code, never a country code. They diverge often: Greek is el (not gr), Czech cs (not cz), Ukrainian uk (not ua). Regional variants use BCP-47 / WP form as the project already uses them (pt-BR / pt_BR, zh-Hans, en-GB). If the user says "add GR", confirm they mean the Greek language (el), not a Greece entity. RTL check: if the language is right-to-left (ar, he, fa, ur), flag it — the scaffold does not handle dir="rtl", mirrored layout, or font subsetting; those need design work before the locale ships.

Invocation

/translate-add-locale <locale>            # e.g. /translate-add-locale el   or   /translate-add-locale pt-BR

If no locale arg, ask once (an interactive question) for the code and the language's native name.

Read the full file on GitHub · 99 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 · 99 lines · 201 tokens per session scan A 20407923bc6e

Subscribe to this mod's changes

translate-add-locale is a command published in the GitHub repository roshaw/claude-translation-agency (2 stars, last pushed 1mo ago), licensed MIT. It adds 201 tokens to every session and 1,451 once invoked, about $0.0008 per session on Opus 5.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-09-16.