translate-init

translate-init is a command for Claude Code, OpenCode from roshaw/claude-translation-agency. It costs 175 tokens per session (2,582 once invoked), scanned A, original, MIT.

A step-by-step setup wizard for creating a project's translation.config.json file. That file records how a project should be translated and is placed in the project being translated.

In plain words
What is it for?
Use it to register a project, choose its source language and file formats, and create or update the translation configuration.
Why use it?
It removes the guesswork from configuring translation before running the translation command. It can detect and prefill some project settings.

Command for Claude CodeOpenCode

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

Good fit Use it to register a project, choose its source language and file formats, and create or update the translation configuration.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/roshaw/claude-translation-agency/translate-init"><img src="https://agentmods.dev/badge/commands/roshaw/claude-translation-agency/translate-init.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 175 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,582 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.00175 $0.02582
Opus 5.5 $0.00070 $0.01033
Sonnet 5.5 $0.00035 $0.00516
Haiku 4.5 $0.00017 $0.00258

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

Security

Grade A, and why

translate-init 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-init.md · 149 lines

How it starts

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

translate-init

A guided wizard that builds translation.config.json at the root of the project being translated (the target project — the folder with the source files) and registers that folder as a tracked project. It asks about each option one step at a time, explaining what the option does and what to put, and pre-fills what it can detect. Run it once per project, then run /translate.

Placement is the whole point. The file goes in the target project, not in the Translation Agency toolkit folder. Pointing at C:\Projects\MyApp writes C:\Projects\MyApp\translation.config.json.

Invocation

/translate-init                    # set up the current folder as the target project
/translate-init --path <dir>       # set up a specific project, e.g. --path C:\Projects\MyApp
/translate-init <path>             # shorthand for --path

Step 0 — Resolve the target project root

--path / bare <path> → that folder; else the current directory (accept an absolute computer path as given). This root is where the config is written. If a translation.config.json already exists, read it and offer to update it (its current values become the defaults) — never silently clobber.

Step 1 — Detect, so defaults are pre-filled (don't ask what you can infer)

Using Glob/Grep/Read (never shell loops), infer: source language (messages.en.ts, en/, .en.md, -en.po, or a content sample; default en); existing target languages already present; formats present (JS/TS or JSON catalogs, WordPress .pot/.po, i18next/.arb, MD/MDX/HTML trees, subtitles, CSV); a likely include set (where translatable files actually live); a verify command (npx tsc --noEmit if there's a tsconfig); and any WordPress text domain. Print a short "here's what I found" summary before asking anything.

Step 2 — Walk the operator through each option (the guided part)

Ask about the settings one at a time, each with a one-line explanation of what it controls and what to enter, and the detected value pre-filled as the default. Use an interactive question (batching a few related ones per screen is fine), but always include the explanation so the operator understands the choice. If the session is unattended, skip the prompts, use detected defaults + general + inplace + first-run research + report queries, and state the assumptions.

Read the full file on GitHub · 149 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 · 149 lines · 175 tokens per session scan A 77b9d2413bd8

Subscribe to this mod's changes

translate-init is a command published in the GitHub repository roshaw/claude-translation-agency (2 stars, last pushed 1mo ago), licensed MIT. It adds 175 tokens to every session and 2,582 once invoked, about $0.0007 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.