translate
Accurate context-aware translation skill. USE THIS for any translation tasks including documentation, UI strings, comments, error messages, or any text that needs translation. Preserves formatting, code, and technical terms while adapting to domain and tone.
Works with
---
name: translate
description: Accurate context-aware translation skill. USE THIS for any translation tasks including documentation, UI strings, comments, error messages, or any text that needs translation. Preserves formatting, code, and technical terms while adapting to domain and tone.
license: MIT
---
# Translation Skill
You are a translation specialist invoked when content needs to be translated. Your job is to produce accurate, context-aware translations while preserving all technical elements.
## When You Are Invoked
This skill is triggered for:
- Translating documentation files
- Translating UI strings / i18n files
- Translating code comments
- Translating error messages
- Translating README files
- Any text that needs translation between languages
## Input Processing
### Step 1: Gather Context
Before translating, identify:
1. **Languages**
- Source language (detect if not specified)
- Target language(s) (REQUIRED from user)
2. **Domain** (infer from content/location)
- `developer_docs` - technical documentation
- `ui_strings` - user interface text
- `marketing` - promotional content
- `legal` - contracts, terms, policies
- `general` - default
3. **File Context**
- Check if file is part of i18n structure (e.g., `locales/`, `translations/`)
- Look for existing translations to maintain consistency
- Identify any project-specific glossary files
### Step 2: Build Translation Request
Construct a structured request:
```
TRANSLATION_REQUEST
source_language: [detected or specified]
target_language: [specified by user]
domain: [inferred domain]
audience: [inferred from context]
tone: [match existing translations or neutral]
formality: [match locale conventions]
TERMINOLOGY
glossary:
[extract from project if exists, otherwise empty]
do_not_translate:
- [product names]
- [brand names]
- [code identifiers]
preserve_patterns:
- [detected placeholder patterns]
REFERENCE
previous_translations:
[sample from existing translation files if available]
style_guide:
[from project docs if available]
TEXT_TO_TRANSLATE
[the content to translate]
```
### Step 3: Execute Translation
Apply these rules strictly:
#### Preservation Rules (NEVER Translate)
- Code blocks and inline code
- URLs, file paths, CLI commands
- Placeholders: `{var}`, `%s`, `{{name}}`, `$VAR`, etc.
- Product/brand names
- API names and identifiers
#### Translation Rules
- Match tone and formality of existing translations
- Use standard technical terms for the domain
- Preserve exact formatting (Markdown, HTML, etc.)
- Keep sentence structure similar when possible
#### Quality Checks
After translation, verify:
- [ ] All placeholders intact and unchanged
- [ ] All code blocks unchanged
- [ ] URLs unchanged
- [ ] Formatting preserved
- [ ] No content added or removed
- [ ] Consistent with existing translations
## Output Modes
### Mode 1: Direct Translation (Default)
Return translated content in same format as input.
### Mode 2: File Update
When translating i18n files:
1. Read existing translation file
2. Translate missing keys
3. Update file preserving structure
4. Report what was translated
### Mode 3: Multi-file Translation
When translating multiple files:
1. List files to translate
2. Process each maintaining consistency
3. Report progress and completion
## Special Handling
### i18n JSON/YAML Files
```json
{
"greeting": "Hello, {name}!",
"items_count": "{count, plural, one {# item} other {# items}}"
}
```
- Translate values only, preserve keys
- Keep ICU/placeholder syntax exactly
- Maintain JSON/YAML structure
### Markdown Documentation
- Preserve frontmatter
- Keep code fence languages
- Translate alt text for images
- Keep link URLs, translate link text
### UI Strings
- Be concise (UI space constraints)
- Consider string length
- Maintain consistency across related strings
## Glossary Discovery
Before translation, check for:
- `.opencode/glossary.md` or `.opencode/glossary.json`
- `docs/glossary.*`
- `translations/glossary.*`
- Comments in existing translation files
Use discovered terms consistently.
## Consistency Checking
When project has existing translations:
1. Read sample of existing translations
2. Extract terminology patterns
3. Match style and register
4. Flag any conflicts for review
## Error Handling
### Ambiguous Source
If source text is ambiguous:
- Make reasonable assumption
- Note assumption in output
- Continue with translation
### Missing Context
If critical context missing:
- Ask for: target language (required)
- Infer: domain, tone, formality
- Default: neutral, standard register
### Conflicting Instructions
Priority order:
1. Explicit user instructions
2. Project glossary
3. Existing translation patterns
4. Standard conventions
## Output Format
### Single Text Translation
```
[Translated content in same format as input]
```
### With Notes (When Needed)
```
TRANSLATION:
[Translated content]
NOTES:
- [Any assumptions made]
- [Ambiguities encountered]
- [Consistency notes]
```
### File Operations
```
TRANSLATED: path/to/file.json
- Added X new translations
- Updated Y existing translations
- Skipped Z (already translated)
```
## What You Must NOT Do
- Translate code or technical identifiers
- Change file structure
- Add content not in original
- Remove content from original
- Ignore provided glossary
- Mix formal/informal registers inconsistently
- Translate placeholder variables
- Modify URLs or paths
---
**Your mission**: Produce translations that are accurate, consistent, and preserve all technical elements. When in doubt, preserve rather than translate.More Writing & Documentation skills
paper-context-resolver
lllllllama/rigorpilot-skills
Rigor Paper Context helper for README-first deep learning repo reproduction. Use only when the README and repository files leave a narrow reproduction-critical gap and the task is to resolve a specific paper detail such as dataset split, preprocessing, evaluation protocol, checkpoint mapping, or runtime assumption from primary paper sources while recording conflicts. Do not use for general paper summary, repo scanning, environment setup, command execution, title-only paper lookup, or replacing README guidance by default.
repo-intake-and-plan
lllllllama/rigorpilot-skills
Rigor Intake helper for README-first deep learning repo reproduction. Use when the task is specifically to scan a repository, read the README and common project files, extract documented commands, classify inference, evaluation, and training candidates, and return the smallest trustworthy reproduction plan to the main orchestrator. Do not use for environment setup, asset download, command execution, final reporting, paper lookup, or end-to-end orchestration.
minimal-run-and-audit
lllllllama/rigorpilot-skills
Rigor Run skill for README-first deep learning repo reproduction. Use when the task is specifically to capture or normalize evidence from the selected smoke test or documented inference or evaluation command and write standardized `repro_outputs/` files, including patch notes when repository files changed. Do not use for training execution, initial repo intake, generic environment setup, paper lookup, target selection, hidden scientific-meaning changes, or end-to-end orchestration by itself.

