AReaL: Command for Claude Code

.claude/commands/translate-doc-zh.md

translate-doc-zh is a command for Claude Code from areal-project/AReaL. It costs 24 tokens per session (745 once invoked), scanned A, original, Apache-2.0.

A command for translating an English AReaL project documentation file into Chinese. Documentation files are written instructions for using or developing a project.

In plain words
What is it for?
Use it with an English Markdown file under docs/en/ when you need a corresponding translation under docs/zh/.
Why use it?
It provides a defined destination and checks for an existing Chinese version, so updates can be translated consistently instead of creating duplicate or misplaced files.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions Claude Code; mentions OpenCode.

This is areal-project/AReaL's own configuration. It tells Claude Code how to work on AReaL 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 AReaL configures →

About the project

AReaL is an infrastructure system for training large language models with reinforcement learning, connecting model training to applications built around AI agents. Researchers and developers use it to train reasoning and agentic models through asynchronous workflows, and the catalogue add-ons support working with AReaL.

areal-project/AReaL · 5,739 stars · on GitHub · areal-ai.io

Reuse

Borrowing it

Nothing to install: this file belongs to areal-project/AReaL. 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/areal-project/AReaL/main/.claude/commands/translate-doc-zh.md
Clone the repo
git clone --depth 1 https://github.com/areal-project/AReaL

Made for: Claude Code.

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-doc-zh

README.md
[![agentmods](https://agentmods.dev/badge/commands/areal-project/areal/translate-doc-zh/github.svg)](https://agentmods.dev/commands/areal-project/areal/translate-doc-zh)
Your own site
<a href="https://agentmods.dev/commands/areal-project/areal/translate-doc-zh"><img src="https://agentmods.dev/badge/commands/areal-project/areal/translate-doc-zh/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-doc-zh

Your own site · 80×15
<a href="https://agentmods.dev/commands/areal-project/areal/translate-doc-zh"><img src="https://agentmods.dev/badge/commands/areal-project/areal/translate-doc-zh.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 745 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.00024 $0.00745
Opus 5 $0.00012 $0.00373
Sonnet 5 $0.00005 $0.00149
Haiku 4.5 $0.00002 $0.00075

Measured 10d ago against content hash 0f5c92b493a6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

translate-doc-zh 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 10d 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.

.claude/commands/translate-doc-zh.md · 107 lines

How it starts

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

Document Translation (EN → ZH)

Translate English documentation to Chinese for the AReaL project.

Usage

/translate-doc-zh $ARGUMENTS

Arguments ($ARGUMENTS):

  • Path to English document (e.g., docs/en/tutorial/quickstart.md)

Document to Translate

!if [ -f "$ARGUMENTS" ]; then echo "File: $ARGUMENTS"; echo ""; head -50 "$ARGUMENTS"; else echo "ERROR: File not found: $ARGUMENTS"; echo "Please provide a valid path to an English document in docs/en/"; fi

Workflow

Step 1: Validate the Path

  1. Check if $ARGUMENTS exists
  2. Verify it is inside docs/en/ directory and ends with .md
  3. If invalid, inform user and stop

Step 2: Determine Output Path

  • Input: $ARGUMENTS (e.g., docs/en/tutorial/quickstart.md)
  • Output: Replace docs/en/ with docs/zh/ (e.g., docs/zh/tutorial/quickstart.md)

Step 3: Check if Chinese Document Exists

  • If docs/zh/<path> exists → Modification Scenario
  • If docs/zh/<path> does NOT exist → Full Translation Scenario

Scenario 1: Modification (Chinese Document Exists)

Use when Chinese document already exists.

Workflow

  1. Read both English and Chinese documents
  2. Compare differences to identify:
    • New sections in English
    • Modified sections in English
    • Deleted sections
  3. Translate only changed parts
  4. Preserve all other Chinese content unchanged

Translation Rules:

  • Preserve English technical terms: FSDP, FSDP2, GRPO, PPO, DAPO, MoE, LLM, RL, RLVR, Claude Code, OpenCode, Megatron, Archon, SGLang, vLLM, PyTorch, HuggingFace, Transformers, etc.
  • File paths and code examples remain unchanged
  • Professional and rigorous terminology
  • Preserve Markdown format, code blocks, tables

Scenario 2: Full Translation (Chinese Document Does NOT Exist)

Use when Chinese document does not exist.

Workflow

  1. Read the English source document
  2. Translate entire document to Chinese

Read the full file on GitHub · 107 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. 10d ago First seen · 107 lines · 24 tokens per session scan A 0f5c92b493a6

Subscribe to this mod's changes

translate-doc-zh is a command published in the GitHub repository areal-project/AReaL (5,739 stars, last pushed today), licensed Apache-2.0. It adds 24 tokens to every session and 745 once invoked, about $0.0001 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.