← Back to Skills Marketplace
147
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install mac-trans
Description
翻译文本或者翻译文件内容的工具,支持多种语言翻译。使用方式:trans 命令
README (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 支持的列表中,则提示用户选择支持的语言
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install mac-trans - After installation, invoke the skill by name or use
/mac-trans - Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Frequently Asked Questions
What is mac trans?
翻译文本或者翻译文件内容的工具,支持多种语言翻译。使用方式:trans 命令. It is an AI Agent Skill for Claude Code / OpenClaw, with 147 downloads so far.
How do I install mac trans?
Run "/install mac-trans" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is mac trans free?
Yes, mac trans is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does mac trans support?
mac trans is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created mac trans?
It is built and maintained by Ray S (@abcnull); the current version is v1.0.1.
More Skills