← 返回 Skills 市场
178
总下载
2
收藏
1
当前安装
3
版本数
在 OpenClaw 中安装
/install deepl-translate
功能描述
当用户明确要求使用 DeepL 官方 API 时使用,适用于文本翻译、文档翻译、语言与用量查询,以及 glossary v2/v3 管理。仅连接 DeepL 官方 API 域名,使用环境变量中的 DEEPL_API_KEY,不读取其他凭证。
使用说明 (SKILL.md)
DeepL 翻译与 API 工具
当用户明确要求使用 DeepL 官方 API 时,使用这个 skill,而不是普通翻译能力。
Prerequisites
- 需要可用的
python3运行环境。 - 需要在环境变量中设置
DEEPL_API_KEY。 - 如果使用 DeepL Free,可额外设置
DEEPL_API_BASE_URL=https://api-free.deepl.com。 - 脚本仅依赖 Python 标准库,不需要安装额外三方包。
安全边界
- 仅允许请求
https://api.deepl.com或https://api-free.deepl.com。 - 仅使用环境变量
DEEPL_API_KEY进行认证,不读取其他凭证、token 或本地账号配置。 - 不执行 shell、不会下载或运行外部脚本、不会启动子进程。
- 只有在用户显式提供
--text、--file、--stdin、--entries-file或文档翻译文件时,才会读取对应本地内容。 - 读取到的文本、词汇表条目或文档文件,只会发送到 DeepL 官方 API,不会转发到其他域名。
能力范围
当前脚本尽量覆盖 DeepL OpenAPI 中常用且公开的接口能力:
- 核心能力:
- 文本翻译:
/v2/translate - 语言查询:
/v2/languages - 用量查询:
/v2/usage - 文本润色 / 改写:
/write/rephrase
- 文本翻译:
- 扩展能力:
- 文档翻译
- glossary v2 / v3 管理
- 文本翻译:
/v2/translate - 语言查询:
/v2/languages - 用量查询:
/v2/usage - 文本润色 / 改写:
/write/rephrase - 文档翻译:
- 上传:
/v2/document - 状态查询:
/v2/document/{document_id} - 结果下载:
/v2/document/{document_id}/result - 一键闭环:脚本封装的
document-translate
- 上传:
- glossary v2:
- 列表、详情、条目、创建、删除
- 语言对查询:
/v2/glossary-language-pairs
- glossary v3:
- 列表、详情、条目查询
- 创建 glossary
- PATCH 更新 glossary / 合并字典
- PUT 替换指定语言对字典
- 删除指定字典
- 删除 glossary
快速开始
- 设置
DEEPL_API_KEY。 - 默认基础地址为
https://api.deepl.com。 - 如果使用 DeepL API Free,可设置:
export DEEPL_API_BASE_URL=https://api-free.deepl.com
只允许以上两个 DeepL 官方基础地址,其他地址会被脚本拒绝。
- 调用脚本:
cd \x3Cskill-directory>
python3 scripts/deepl_translate.py \x3C子命令> ...
其中 \x3Cskill-directory> 表示当前 skill 的安装目录。
也可以不切换目录,直接执行:
python3 /path/to/deepL-translate/scripts/deepl_translate.py \x3C子命令> ...
为兼容旧用法,如果不写子命令、直接传 --text --target-lang 这类参数,脚本会自动按 translate 处理。
For Agents
- 默认优先使用核心能力:
translate、rephrase、languages、usage。 - 只有在用户明确要求上传文档或管理 glossary 时,再使用扩展能力。
- 如果只是改写语气、商务化表达、同语种润色,优先用
rephrase,不要误用跨语种翻译。 - 需要结构化结果时使用
--json。
For Humans
- 示例命令中的
\x3Cskill-directory>表示当前 skill 的安装目录。 - 如果宿主平台已经帮你切换到 skill 目录,可直接执行
python3 scripts/deepl_translate.py ...。 - 如果宿主平台以绝对路径调用脚本,也可以直接使用
/path/to/.../scripts/deepl_translate.py。
常用命令
文本翻译:
cd \x3Cskill-directory>
python3 scripts/deepl_translate.py translate \
--source-lang EN \
--target-lang ZH \
--text "Hello, world"
兼容旧写法:
cd \x3Cskill-directory>
python3 scripts/deepl_translate.py \
--source-lang EN \
--target-lang ZH \
--text "Hello, world"
查询支持语言:
cd \x3Cskill-directory>
python3 scripts/deepl_translate.py languages --type target --json
查询账户用量:
cd \x3Cskill-directory>
python3 scripts/deepl_translate.py usage --json
文本润色 / 同语种变体改写:
cd \x3Cskill-directory>
python3 scripts/deepl_translate.py rephrase \
--target-lang EN-US \
--writing-style business \
--text "please send me the report soon"
文档翻译闭环:
cd \x3Cskill-directory>
python3 scripts/deepl_translate.py document-translate \
--file ./input.docx \
--target-lang DE \
--output-file ./output_de.docx
创建 v2 glossary:
cd \x3Cskill-directory>
python3 scripts/deepl_translate.py glossary-v2-create \
--name demo-v2 \
--source-lang EN \
--target-lang DE \
--entries-file ./entries.tsv
创建 v3 glossary:
cd \x3Cskill-directory>
python3 scripts/deepl_translate.py glossary-v3-create \
--name demo-v3 \
--dict EN:DE:./en_de.tsv:tsv \
--dict EN:FR:./en_fr.tsv:tsv
使用建议
- 短文本翻译优先使用
translate。 - 如果只是英文变体、美化语气、商务化表达,优先使用
rephrase,不要误用跨语种翻译。 - UI 文案、短句、多义词,尽量传
--context。 - 需要完整返回结构时加
--json。 - 需要 glossary 时,先确认是旧的 v2 单语言对,还是新的 v3 多语言词汇表。
- 文档翻译如果只想拆步骤排查,可分别使用
document-upload、document-status、document-download。
已知约束
translate单次最多 50 个text项,请求体总大小不能超过 128 KiB。glossary_id依赖source_lang。- 文档翻译为异步流程,必须先上传,再轮询状态,最后下载结果。
- 文档翻译、
--file、--stdin、--entries-file会把用户明确提供的内容发送到 DeepL 官方服务。 - 脚本尽量覆盖官方公开接口,但某些新接口字段可能随 DeepL 文档演进而变化。
常见错误
未设置 DEEPL_API_KEY。- 需要先导出
DEEPL_API_KEY再调用命令。
- 需要先导出
DEEPL_API_BASE_URL 仅允许配置为 ...- 只支持
https://api.deepl.com和https://api-free.deepl.com。
- 只支持
未提供输入文本。请使用 --text、--file 或 --stdin。translate和rephrase必须显式提供输入内容。
--glossary-id 需要同时提供 --source-lang。- glossary 翻译调用时,必须同时指定源语言。
文档翻译失败:...- 文档翻译由 DeepL 异步处理,失败原因以返回的错误信息为准。
参考资料
- 若需要接口摘要、端点列表和字段说明,读取 references/deepl_api.md。
安全使用建议
This skill appears to be a normal DeepL CLI wrapper, but take the following precautions before installing or enabling it:
- Verify and set DEEPL_API_KEY yourself; the SKILL.md requires it but the registry metadata does not declare it. Ask the publisher to update metadata so the required env var is explicit.
- Review the full scripts/deepl_translate.py (search for any network calls) and confirm it only contacts https://api.deepl.com or https://api-free.deepl.com. A quick grep for 'api.deepl' and 'http' in the code will help.
- Do not upload sensitive documents or secrets via --file, --stdin or entries files unless you trust the DeepL account tied to the API key; any content you provide will be sent to DeepL.
- Prefer using a limited/rotated DeepL key or a test account when first trying the skill, and monitor usage to detect unexpected requests.
- If you need higher assurance, run the script in a sandboxed environment and monitor outbound connections to confirm only the allowed domains are contacted.
Confidence is medium because only a truncated portion of the script was provided; reviewing the complete script would raise confidence to high.
功能分析
Type: OpenClaw Skill
Name: deepl-translate
Version: 1.0.2
The skill is a comprehensive DeepL API client for translation, document processing, and glossary management. The Python script `scripts/deepl_translate.py` uses only standard libraries and includes an explicit security check to restrict API requests to official DeepL domains (api.deepl.com and api-free.deepl.com). No evidence of malicious intent, unauthorized data exfiltration, or suspicious execution patterns (like eval or subprocess calls) was found.
能力评估
Purpose & Capability
The script and documentation match the advertised purpose (DeepL text/document translation, glossaries, usage queries). However, the registry metadata lists no required environment variables or primary credential while SKILL.md (and the script) require DEEPL_API_KEY (and optionally DEEPL_API_BASE_URL). That metadata omission is an incoherence that should be corrected.
Instruction Scope
SKILL.md explicitly limits network access to DeepL official endpoints, only reads local files when the user explicitly supplies --file/--stdin/--entries-file, and claims not to run shells or spawn subprocesses. The included Python script uses urllib.* (no sign in provided excerpts of shelling out). A remaining risk: any file you provide will be sent to DeepL (document or entries), so do not supply sensitive secrets unless you trust the account/endpoint.
Install Mechanism
No install spec (instruction-only with an included Python script). No downloads or archive extraction — lowest install risk. The script claims to rely only on the Python standard library.
Credentials
The skill needs at least DEEPL_API_KEY (and optionally DEEPL_API_BASE_URL) according to SKILL.md and the script, but the registry metadata lists no required env vars or primary credential. That mismatch is disproportionate and could hide operational requirements or mislead users about what secrets will be used. The number and nature of env vars requested are otherwise appropriate for a DeepL client.
Persistence & Privilege
The skill does not request always:true and has no documented behavior that persists beyond its own files or modifies other skills. It does not declare elevated system privileges.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install deepl-translate - 安装完成后,直接呼叫该 Skill 的名称或使用
/deepl-translate触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
本次更新主要提升了 skill 的通用性和可移植性,不再依赖特定宿主目录结构。
更新内容:
- 将文档中的调用方式改为更通用的 <skill-directory> 写法,适配不同安装环境
- 增加前置条件说明,明确仅依赖 python3、DEEPL_API_KEY 和 Python 标准库
- 增加 For Agents 和 For Humans 两类使用说明,便于不同宿主和用户理解调用方式
- 明确核心能力与扩展能力的分层,方便按场景选择使用
- 补充常见错误说明,降低跨平台接入和排障成本
v1.0.1
本次更新主要针对安全审查信号做了收敛,功能不变,边界更明确。
更新内容:
- 限制网络访问范围,脚本现在仅允许连接 https://api.deepl.com 和 https://api-free.deepl.com
- 移除了可指向任意地址的 --base-url 能力,避免凭证被发送到非官方域名
- 补充了 skill 的安全边界说明,明确只使用 DEEPL_API_KEY,不读取其他凭证或本地账号配置
- 明确声明不会执行 shell、不会下载或运行外部脚本、不会启动子进程
- 明确说明只有在用户显式提供文本、词汇表文件或文档文件时,才会读取对应本地内容
- 明确说明读取到的数据只会发送到 DeepL 官方 API,不会转发到其他服务
兼容性说明:
- 如果你原来通过 DEEPL_API_BASE_URL 在 api-free.deepl.com 和 api.deepl.com 之间切换,仍然可用
- 如果你之前依赖自定义 base-url 指向代理或其他网关,这个版本将不再支持
v1.0.0
- Initial release of deepL-translate skill.
- Provides DeepL API integration for text and document translation, supported language and usage queries, and glossary v2/v3 management.
- Requires DeepL API Key via environment variable.
- Offers command-line script with support for main DeepL OpenAPI endpoints.
- Includes quick start instructions, sample commands, and usage recommendations.
元数据
常见问题
deepL Translate 是什么?
当用户明确要求使用 DeepL 官方 API 时使用,适用于文本翻译、文档翻译、语言与用量查询,以及 glossary v2/v3 管理。仅连接 DeepL 官方 API 域名,使用环境变量中的 DEEPL_API_KEY,不读取其他凭证。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 178 次。
如何安装 deepL Translate?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install deepl-translate」即可一键安装,无需额外配置。
deepL Translate 是免费的吗?
是的,deepL Translate 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
deepL Translate 支持哪些平台?
deepL Translate 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 deepL Translate?
由 liaong(@liaol99)开发并维护,当前版本 v1.0.2。
推荐 Skills