← 返回 Skills 市场
147
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install mac-trans
功能描述
翻译文本或者翻译文件内容的工具,支持多种语言翻译。使用方式:trans 命令
使用说明 (SKILL.md)
mac-trans skill
用于文本内容,或者文件内容自动翻译,支持多种语言翻译。
安装
# 一行安装
brew search translate-shell
功能描述
支持自动中英文识别。
支持能力:
- 翻译用户输入的文本
- 翻译指定的全部文件内容
- 翻译文件内容中指定的行
- 翻译成指定语言,默认中英互译
使用方式
# 翻译文本。自动检测英文 → 中文,或者中文 → 英文
trans -e bing -b "要被翻译的文本内容"
# 举例子:翻译 "Hello world"
trans -e bing -b "Hello world"
# 翻译文件内容。自动检测英文 → 中文,或者中文 → 英文
trans -e bing -b "文件在mac中的路径"
# 举例子:翻译 ~/document.txt 文件内容
trans -e bing -b ~/document.txt
# 比如 翻译前 10 行
head -b -n 10 ~/document.txt | trans -e bing
# 翻译特定行
sed -n '5,20p' ~/document.txt | trans -e bing
# 可查询支持翻译成的语言。比如其中展示了某种语言,`Japanese - ja` 表示支持翻译成日文
trans -R -e bing
# 举例子:将 "Hello world" 翻译成日文
trans -e bing -b :ja "Hello world"
异常处理
- brew 未安装,则提示用户安装
- translate-shell 安装失败,则提醒用户自行安装
- 当用户没有提供完整地址,并且被翻译的文件找不到,则提示用户提供文件完整地址
- 当用户要求翻译的语言不在 trans 支持的列表中,则提示用户选择支持的语言
安全使用建议
This skill is a thin wrapper describing how to use the translate-shell ('trans') tool and is internally consistent. Before installing or using it: (1) correct the install step — run 'brew install translate-shell' (or follow the project's official install instructions); (2) be aware that translate-shell may send text to third-party translation backends (e.g., Bing) — do not translate sensitive secrets or private files unless you trust the service and network behavior; (3) examples in the SKILL.md contain minor typos (flags and characters) so test commands on a non-sensitive file first; (4) no credentials are requested by the skill itself, so there's no hidden credential exfiltration indicated. If you need the skill to operate entirely offline, confirm translate-shell's local-offline capabilities before using it with private data.
功能分析
Type: OpenClaw Skill
Name: mac-trans
Version: 1.0.1
The mac-trans skill provides instructions for an AI agent to use the legitimate 'translate-shell' command-line utility for text and file translation. The SKILL.md file outlines standard usage of the 'trans' command with the Bing engine and common Unix utilities like 'sed' and 'head', with no evidence of malicious intent, data exfiltration, or suspicious execution patterns.
能力评估
Purpose & Capability
The name/description (translate text or files) matches the SKILL.md: it documents use of the translate-shell 'trans' command to translate text or file contents. The operations shown (translating text, whole files, or selected lines) are coherent with the stated purpose. Minor mismatch: the installation snippet uses 'brew search translate-shell' rather than an actual install command (brew install), which is a usability/documentation error but not a security mismatch.
Instruction Scope
Instructions stay within the translation task: they show piping file contents (head/sed) into 'trans' or passing a file path to 'trans'. The skill does not instruct the agent to read unrelated system files or environment variables. Notes: there are typos/odd flags (e.g., 'head -b', full-width tilde '~') and the example uses 'trans -e bing' (meaning translate-shell will contact an external translation backend like Bing) — the SKILL.md does not discuss privacy/network behavior.
Install Mechanism
This is an instruction-only skill with no install spec and no code files, so there is no code download or archive extraction risk. The doc points users to Homebrew but only shows 'brew search' instead of a concrete 'brew install' command. Low install risk because nothing is written by the skill itself.
Credentials
No environment variables, credentials, or config paths are requested. That is proportionate for a simple translation helper. One caveat: the examples use a remote backend ('bing') — translating via external services may transmit file contents to third-party servers even though no credentials are requested; the skill does not disclose this.
Persistence & Privilege
always is false, autonomous invocation is allowed (the platform default). The skill does not request persistent presence or modify other skills or system configurations. No elevated privileges are requested.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install mac-trans - 安装完成后,直接呼叫该 Skill 的名称或使用
/mac-trans触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Updated skill description to highlight support for multiple languages.
- Clarified and expanded functional descriptions for language translation capabilities.
- Improved error handling instructions for installation issues and unsupported languages.
- Minor wording adjustments for clarity and consistency.
v1.0.0
mac-trans 1.0.0 Changelog
- Initial release of mac-trans, a tool for translating text and file contents via the `trans` command.
- Supports automatic Chinese-English detection and translation in both directions.
- Users can translate plain text, entire files, or specific lines within files.
- Allows specifying target language; defaults to Chinese/English.
- Provides clear error messages for missing dependencies, install failures, file not found, and unsupported languages.
元数据
常见问题
mac trans 是什么?
翻译文本或者翻译文件内容的工具,支持多种语言翻译。使用方式:trans 命令. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 147 次。
如何安装 mac trans?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install mac-trans」即可一键安装,无需额外配置。
mac trans 是免费的吗?
是的,mac trans 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
mac trans 支持哪些平台?
mac trans 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 mac trans?
由 Ray S(@abcnull)开发并维护,当前版本 v1.0.1。
推荐 Skills