mac-trans
翻译文本或者翻译文件内容的工具,支持多种语言翻译。使用方式:trans 命令
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/abcnull/mac-transWhat This Skill Does
The mac-trans skill is a powerful command-line interface wrapper for the Translate Shell utility, integrated directly into OpenClaw. It serves as a versatile translation engine for your macOS environment, allowing for seamless conversion of text snippets or entire documents. Whether you need to bridge the gap between English and Chinese or explore dozens of other supported global languages, this tool streamlines the translation process. By utilizing high-quality translation engines like Bing, it provides accurate, context-aware results without needing to switch windows or use web-based translation tools.
Installation
To begin using the mac-trans skill, ensure you have Homebrew installed on your macOS system. Run the following command in your terminal to install the underlying translate-shell dependency:
brew install translate-shell
Once the dependency is ready, you can install the OpenClaw skill using the following command:
clawhub install openclaw/skills/skills/abcnull/mac-trans
Ensure that your environment variables are configured correctly so that OpenClaw can locate the trans executable.
Use Cases
This skill is ideal for developers, researchers, and general power users. Use it to translate documentation files, parse specific segments of large log files, or quickly convert foreign-language text streams into your native language. It is particularly effective for automating workflows where file contents need to be ingested in one language and processed in another.
Example Prompts
- "Translate the file at ~/Desktop/notes.txt into Chinese and save the output."
- "What are the first 15 lines of ~/project/README.md translated into Japanese?"
- "Translate this text to Spanish: 'OpenClaw is a powerful automation agent for your local machine.'"
Tips & Limitations
- Language Codes: Use the
trans -R -e bingcommand to see a full list of ISO codes (e.g., :ja for Japanese, :fr for French) to ensure your target language is supported. - Performance: For very large files, avoid translating the entire document at once to prevent high memory usage. Instead, use
head,tail, orsedto pipe specific ranges of the file into the translator. - Error Handling: Always provide the full absolute path to files (e.g., /Users/username/doc.txt) to avoid path resolution errors. If a translation fails, check if the language code provided is valid and supported by the bing engine.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-abcnull-mac-trans": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read