CLI tool to generate customized prompt2eng skills for AI agents.
bun install -g prompt2engbunx prompt2engRun the CLI without any arguments to start the interactive installer:
prompt2eng-
Select AI Tool
opencode— for OpenCode CLIclaude code— for claude.ai / Claude Codeother— support.agentsandAGENTS.md, like Codex, Gemini...
-
Select Language (BCP-47 tag)
- Choose from supported languages: zh, ja, ko, es, ru, fr, de, pt, it
-
Select Region (if multiple options)
- For languages with multiple regions, select the appropriate one
- Single-region languages (ja, ko, ru, pt) are auto-selected
-
Select CEFR Level
- A1–C2 (default: B2)
-
Confirm — Review and generate
$ prompt2eng
Prompt To english Skill Generator
? Which AI tool are you using? OpenCode
→ config: ~/.config/opencode/AGENTS.md skills: ~/.config/opencode/skills/prompt2eng
? Your language tag (type to search): zh
? Region for zh? TW
✓ BCP-47 tag: zh-TW
? Target English level (CEFR): B2 — Upper Intermediate (recommended)
Tool: opencode
Language: zh-TW
CEFR: B2
Skills: ~/.config/opencode/skills/prompt2eng
? Generate skill with these settings? Yes
- Skills directory:
~/.config/opencode/skills/prompt2eng/ - Config file:
~/.config/opencode/AGENTS.md
- Skills directory:
~/.claude/skills/prompt2eng/ - Config file:
~/.claude/CLAUDE.md
- Skills directory:
~/.agents/skills/prompt2eng/ - Config file:
~/.agents/AGENTS.md
The CLI will:
- Scan for existing
CLAUDE.mdorAGENTS.md - If found: Ask whether to add the skill to
## Required Skills - If not found: Print a snippet for you to add manually
If no config file exists, add this to your AGENTS.md or CLAUDE.md:
## Required Skills
- **prompt2eng**: Use when the user's prompt contains [Language] text that needs translation to English before processing. Translates [Language] to CEFR [Level] English while preserving existing English, technical terms, and proper nouns.| Level | Name | Description |
|---|---|---|
| A1 | Beginner | Basic phrases and familiar everyday expressions |
| A2 | Elementary | Simple sentences and frequently used expressions |
| B1 | Intermediate | Clear standard communication on familiar matters |
| B2 | Upper Intermediate | Complex texts and technical discussion (default) |
| C1 | Advanced | Fluent expression without much searching |
| C2 | Proficient | Near-native precision and nuance |
| Language | BCP-47 Tag | Description |
|---|---|---|
| Chinese | zh-TW |
Traditional Chinese (Taiwan) |
| Chinese | zh-HK |
Traditional Chinese (Hong Kong) |
| Chinese | zh-CN |
Simplified Chinese (China) |
| Japanese | ja-JP |
Japanese (Japan) |
| Korean | ko-KR |
Korean (South Korea) |
| Spanish | es-ES |
Spanish (Spain) |
| Spanish | es-MX |
Spanish (Mexico) |
| Russian | ru-RU |
Russian (Russia) |
| French | fr-FR |
French (France) |
| French | fr-CA |
French (Canada) |
| German | de-DE |
German (Germany) |
| German | de-CH |
German (Switzerland) |
| Portuguese | pt-BR |
Portuguese (Brazil) |
| Italian | it-IT |
Italian (Italy) |
| Italian | it-CH |
Italian (Switzerland) |
bun installbun run buildbun run testEdit templates/languages.json to add or modify translation examples. Each language key contains an array of {input, output} pairs:
{
"zh": [
{ "input": "請幫我寫一個 Python script", "output": "Please help me write a Python script" },
...
],
"ja": [...],
...
}Edit templates/SKILL.md.hbs to modify the skill structure:
- {{skillName}} — Name of the skill
- {{languageName}} — Human-readable language name
- {{cefrLevel}} — CEFR level (A1–C2)
- {{cefrDescription}} — Description of the level
- {{#each examples}} — Loop through examples