Agent Skillsjegly/Box › translator

translator

GitHub

提供多语言文本翻译功能,自动检测源语言并执行翻译,支持查看和清除本地翻译历史记录。

skills/built-in/translator/SKILL.md jegly/Box

Trigger Scenarios

用户请求翻译单词、短语或段落 用户查询某语言的表达方式 用户查看或清除翻译历史

Install

npx skills add jegly/Box --skill translator -g -y
More Options

Non-standard path

npx skills add https://github.com/jegly/Box/tree/main/skills/built-in/translator -g -y

Use without installing

npx skills use jegly/Box@translator

指定 Agent (Claude Code)

npx skills add jegly/Box --skill translator -a claude-code -g -y

安装 repo 全部 skill

npx skills add jegly/Box --all -g -y

预览 repo 内 skill

npx skills add jegly/Box --list

SKILL.md

Frontmatter
{
    "name": "translator",
    "description": "Translates text between languages. Use this when the user wants to translate a word, phrase, or passage into another language."
}

Translator

Instructions

The translator skill translates text between any pair of languages. You perform the translation using your own knowledge, then call run_js to display the result and save it to the local history.

Workflow for every translation request

  1. Identify the source language (detect it automatically if not specified — note it as "Auto-detected").
  2. Identify the target language from the user's request.
  3. Translate the text yourself.
  4. Call run_js with index.html to display the result and persist it.

Actions

1. Translate

When a user wants to translate text, call run_js with:

  • script name: index.html
  • data: JSON string with:
    • action: "translate"
    • original: String — the original text exactly as the user provided it
    • translated: String — your translation
    • source_lang: String — detected or specified source language (e.g. "English", "Auto-detected")
    • target_lang: String — target language (e.g. "French", "Japanese")

2. View History

When a user asks to see their translation history, call run_js with:

  • script name: index.html
  • data: JSON string with:
    • action: "history"

3. Clear History

When a user wants to clear their translation history, call run_js with:

  • script name: index.html
  • data: JSON string with:
    • action: "clear"

Rules

  • Always translate before calling run_js — never call run_js with an empty translated field.
  • If the user asks to translate into multiple languages, make one run_js call per language.
  • If the source and target language appear to be the same, ask the user to clarify.
  • All history is stored locally on the device.

Sample Commands

  • "Translate 'Good morning' to Spanish"
  • "How do you say 'thank you' in Japanese?"
  • "Translate this paragraph to French: ..."
  • "What is 'Bonjour' in English?"
  • "Show my translation history"
  • "Clear my translation history"

Version History

  • 7897895 Current 2026-07-24 17:00

Same Skill Collection

skills/built-in/calculate-hash/SKILL.md
skills/built-in/interactive-map/SKILL.md
skills/built-in/kitchen-adventure/SKILL.md
skills/built-in/mood-tracker/SKILL.md
skills/featured/mood-music/SKILL.md
skills/featured/restaurant-roulette/SKILL.md
skills/built-in/query-wikipedia/SKILL.md
skills/built-in/send-email/SKILL.md
skills/featured/virtual-piano/SKILL.md
skills/built-in/qr-code/SKILL.md
skills/built-in/text-spinner/SKILL.md

Metadata

Files
0
Version
fe83d52
Hash
7652ac73
Indexed
2026-07-24 17:00

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-18 20:06
浙ICP备14020137号-1 $Гость$