360 Secure SkillHub
360 安全技能中心

Crazyrouter Translate

该 Skill 提供 Node 命令行脚本,通过 Crazyrouter 外部服务调用 AI 模型,把文本或文件在任意语言之间互译。可指定源语言、目标语言、模型和输出文件,并支持保留 Markdown 格式。运行前需设置 CRAZYROUTER_API_KEY 环境变量,翻译内容会发送至外部服务。

xujfcn
xujfcn
热度 43.82
最近更新 2026-05-11 17:29:37
分类:效率依赖:代码执行 / 读写文件 / 第三方 API / 内部调用大模型应用场景:翻译 / 文件转换

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add crazyrouter-translate
Metadata
name
crazyrouter-translate
description
AI-powered translation via Crazyrouter. Translate text between any languages using GPT-5, Claude, DeepSeek, or Qwen. Supports file translation and multi-model comparison. Use when user asks to translate text, documents, or compare translations. Requires environment variable CRAZYROUTER_API_KEY (get at https://crazyrouter.com).

AI Translation via Crazyrouter

Translate text between any languages using the best AI models through Crazyrouter.

Script Directory

Agent Execution:

  1. SKILL_DIR = this SKILL.md file's directory
  2. Script path = ${SKILL_DIR}/scripts/main.mjs

Step 0: Check API Key ⛔ BLOCKING

[ -n "${CRAZYROUTER_API_KEY}" ] && echo "key_present" || echo "not_set"
Result Action
key_present Continue
not_set Ask user to set CRAZYROUTER_API_KEY. Get key at https://crazyrouter.com

Usage

# Basic translation
node ${SKILL_DIR}/scripts/main.mjs --text "Hello world" --to zh

# Translate file
node ${SKILL_DIR}/scripts/main.mjs --input article.md --to ja --output article_ja.md

# Use specific model
node ${SKILL_DIR}/scripts/main.mjs --text "Bonjour le monde" --to en --model deepseek-r1

# Specify source language
node ${SKILL_DIR}/scripts/main.mjs --text "你好世界" --from zh --to ko

# Keep formatting (Markdown)
node ${SKILL_DIR}/scripts/main.mjs --input README.md --to ja --output README_ja.md --format markdown

Options

Option Description Default
--text <text> Text to translate —
--input <file> Read from file —
--output <file> Save to file stdout
--from <lang> Source language auto-detect
--to <lang> Target language (required) —
--model <id> AI model gpt-4o-mini
--format <fmt> plain or markdown plain

Language Codes

en, zh, ja, ko, es, fr, de, pt, ru, ar, vi, th, id, tr, it, pl, nl, sv, hi, ...