Token导航 LogoToken导航

Agent Skill · 效率

smart-translate-txt(智能翻译 txt)

smart-translate-txt 用于补充效率相关能力,适合在 OpenClaw 中需要让 Agent 承接效率相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

smart-translate-txt 是效率类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为接触敏感数据;许可证为 MIT-0,第三方扫描已通过,按安装量在效率类的 21,003 个 Skill 里排第 18,740。

总安装 2,257周安装 95GitHub Stars 公开资料未说明下载 790核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
1.0.1

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:smart-translate-txt(智能翻译 txt)
来源仓库:https://github.com/litousteven/smart-translate-txt
安装命令:
openclaw skills install smart-translate-txt
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install smart-translate-txt

这个 Skill 是做什么的

效率类 Skill 把重复的整理、汇总、转换工作交给助手完成,减少手工复制粘贴。

使用 OpenAI 兼容 API 翻译文本文件,支持 SiliconFlow、DeepSeek 等平台。适用于 txt 文件批量翻译与中英日等多语种互转需求。自动识别源语言并调用最优模型保证翻译质量一致性。在 OpenClaw 中处理外语材料时自动触发翻译流程。

使用前请配置有效 API 密钥并注意各服务商字符计费标准差异。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install smart-translate-txt;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

smart-translate-txt 怎么安装?

在终端执行 openclaw skills install smart-translate-txt。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

smart-translate-txt 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

smart-translate-txt 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

smart-translate-txt 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

smart-translate-txt 用的人多吗?

公开数据是累计安装 2,257 次,近一周安装 95 次,下载 790 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

smart-translate-txt 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理效率类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

效率类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
github

GitHub 代码协作 · OpenClaw

7,632,918545需要联网MIT-0通过
nano-pdf

Nano PDF 文档 · OpenClaw

4,249,476231需要联网MIT-0通过
auto-updater

自动更新程序 · OpenClaw

2,964,063386操作浏览器MIT-0通过
video-frames

视频帧 · OpenClaw

2,621,304112需要联网MIT-0通过
gemini

Gemini 助手 · OpenClaw

2,547,39648需要联网MIT-0有提醒
smart-translate-txt

智能翻译 txt · 本页

2,257—接触敏感数据MIT-0通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
translate-txt
description
|
Triggers
翻译txt文件, 翻译文本, translate txt, translate file, 文件翻译, txt翻译.
metadata
config
description
API key for the translation service
required
true
description
Base URL for OpenAI-compatible API
default
https://api.siliconflow.cn/v1
description
Model name to use
default
Qwen/Qwen2.5-7B-Instruct

translate-txt Skill

Translate .txt files using any OpenAI-compatible API. Defaults to SiliconFlow with Qwen model, translating foreign languages to Chinese.

Features

  • Supports any OpenAI-compatible API (SiliconFlow, DeepSeek, OpenAI, etc.)
  • Auto-detects source language, defaults to translating into Chinese
  • Handles large files by chunking at paragraph/sentence boundaries
  • Concurrent translation — multiple chunks translated in parallel
  • Sliding-window context — each chunk gets glossary + background from nearby chunks; new terms auto-propagate, stale context naturally fades as the window slides
  • Automatic retry with exponential backoff on timeout and transient errors
  • Preserves original formatting and structure

File Structure

translate-txt/
├── SKILL.md              # Skill definition
├── .env                  # User configuration (created by setup)
├── setup.sh              # Setup script (interactive & non-interactive)
└── scripts/
    └── translate.py      # Translation script

Configuration

The script reads config from the .env file in the skill root directory, falling back to environment variables.

VariableDefaultDescription
TRANSLATE_API_KEY(none, required)API key for the translation service
TRANSLATE_BASE_URLhttps://api.siliconflow.cn/v1Base URL for OpenAI-compatible API
TRANSLATE_MODELQwen/Qwen2.5-7B-InstructModel name to use
TRANSLATE_THINKINGautoThinking mode: auto/disabled (recommended) or enabled
TRANSLATE_MAX_TOKENS4096Max output tokens per chunk
TRANSLATE_TEMPERATURE1Model temperature
TRANSLATE_TIMEOUT300API request timeout in seconds

Priority: environment variables > .env file > defaults.

How to Use

Step 1: Check & Setup Configuration

Before first use, check if the API key is configured. The script loads config from the .env file in the skill directory, falling back to environment variables.

If .env does not exist or TRANSLATE_API_KEY is empty, ask the user for their API key and preferred provider, then run:

# Non-interactive setup (for AI agent):
bash ~/.comate/skills/translate-txt/setup.sh --api-key <KEY> --provider <PROVIDER>

# Providers: siliconflow (default), deepseek, openai
# Or specify full config:
bash ~/.comate/skills/translate-txt/setup.sh --api-key <KEY> --base-url <URL> --model <MODEL>

Examples:

# SiliconFlow (default)
bash ~/.comate/skills/translate-txt/setup.sh --api-key sk-xxx --provider siliconflow

# DeepSeek
bash ~/.comate/skills/translate-txt/setup.sh --api-key sk-xxx --provider deepseek

# OpenAI
bash ~/.comate/skills/translate-txt/setup.sh --api-key sk-xxx --provider openai

# Custom endpoint
bash ~/.comate/skills/translate-txt/setup.sh --api-key sk-xxx --base-url https://my-api.example.com/v1 --model my-model

The user can also run the interactive setup manually:

bash ~/.comate/skills/translate-txt/setup.sh

On success, the script outputs CONFIG_SAVED:<path>. If the API key is already configured, skip to Step 2.

Step 2: Run Translation

python3 ~/.comate/skills/translate-txt/scripts/translate.py <input_file> [options]

Options:

  • --output <path> - Output file path (default: <input>_translated.txt)
  • --target-lang <lang> - Target language (default: Chinese)
  • --source-lang <lang> - Source language hint (default: auto for auto-detect)
  • --chunk-size <int> - Max characters per chunk (default: 3000)
  • --concurrency <int> - Max concurrent API calls (default: 3)
  • --context-window <int> - Number of preceding chunks for sliding context (default: 3)

Examples:

# Translate a file to Chinese (default)
python3 ~/.comate/skills/translate-txt/scripts/translate.py document.txt

# Translate to Japanese
python3 ~/.comate/skills/translate-txt/scripts/translate.py document.txt --target-lang Japanese

# Specify output path
python3 ~/.comate/skills/translate-txt/scripts/translate.py document.txt --output result.txt

Step 3: Report Result

After the script completes successfully, it outputs the translated file path in the format OUTPUT:<path>. Report this to the user.

If the script fails, check the error output:

  • CONFIG_ERROR - API key not configured. Ask user for their API key, then run setup.sh --api-key <KEY> --provider <PROVIDER>
  • FILE_ERROR - Input file not found or empty
  • API_ERROR - API call failed (check key, URL, model, and network)

How It Works

The script uses a three-step approach for multi-chunk files:

Step 1: Keyword extraction — Each chunk is processed concurrently with a lightweight prompt to extract proper nouns and domain terms with their translations.

Step 2: Build per-chunk context — For each chunk, the script merges keywords from a sliding window of N preceding chunks (default --context-window 3). This means:

  • New terms introduced in later chapters automatically appear in context for subsequent chunks
  • Context naturally shifts as the window slides forward (e.g., chunk 10's context reflects chunks 7-10, not chunks 1-3)
  • A background description is inferred from initial chunks and prepended to all contexts

Step 3: Translation — All chunks are translated concurrently, each with its own window-scoped context.

Use --context-window to control the window size. Larger windows provide more context but may include irrelevant terms from distant sections.

Progress is reported on stderr:

  • KEYWORDS:chunk N/M / KEYWORDS_DONE:chunk N/M (Step 1)
  • TRANSLATING:chunk N/M / DONE:chunk N/M (Step 3)

Results are reassembled in original order.

Model Selection & Performance

Model choice has a dramatic impact on translation speed. The main factor is whether the model uses thinking/reasoning mode — thinking models spend significant time on internal reasoning, which is unnecessary for translation and makes them 5-10x slower.

Recommended models (fast, good quality):

ModelProvider/EndpointSpeedQualityNotes
deepseek-v3 / deepseek-v3.2DeepSeek or compatibleFast (~1.5min/28K chars)GoodBest choice for translation
gpt-4o-miniOpenAIFastGoodCost-effective
Qwen/Qwen2.5-7B-InstructSiliconFlowModerateDecentDefault, good balance

Models to avoid for translation:

ModelWhy
kimi-k2.5Thinking model — ~13min/28K chars, 8x slower
kimi-k2-thinkingSame issue, even more reasoning overhead
deepseek-r1Reasoning model, slow for straightforward translation

Tips:

  • The script passes enable_thinking: false by default (TRANSLATE_THINKING=auto). If your API doesn't support this, switch to a non-thinking model.
  • For batch translations or large files, prefer deepseek-v3 or deepseek-v3.2.

Notes

  • The script uses only Python standard library (no pip install needed)
  • Translation quality depends on the model; larger models generally produce better translations
  • Keyword extraction adds one API call per chunk but ensures every term is captured
  • Set --concurrency 1 to disable parallel translation if the API has strict rate limits
  • The script preserves original text formatting (paragraphs, line breaks) in the translation
  • Avoid thinking/reasoning models for translation — much slower with no quality benefit
  • Sliding-window context scales to any text length — 10 chunks or 1000 chunks work the same way

平台分布

OpenClaw

75.2%
按下载量换算594

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills