Hammerspoon AI Translator — AI skill for Claude Code
AI translation plugin for Hammerspoon — select text, hotkey, paste.
How to install Hammerspoon AI Translator
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open Jane-xiaoer/hammerspoon-ai-translator and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Hammerspoon AI Translator does
AI translation plugin for Hammerspoon — select text, hotkey, paste. Chinese ↔ English auto-detected.
Alternatives in AI
- Coralline — 🪸 Powerlevel10k-inspired statusline for Claude Code — paste one prompt and your AI interviews you, then insta 541 ★
- Yt Transcriber — CLI app- Give it a YouTube URL and you get a transcription with possible speaker identification and optional s 337 ★
- Setup Watch Skill — One-shot setup for Watch Skill — installs the engine, bootstraps ffmpeg/yt-dlp, registers the MCP server in ev 315 ★
README
AI Translator for Hammerspoon
A macOS input helper that translates selected text using AI — Chinese ↔ English, auto-detected.
No switching apps. No copy-pasting to a translation window. Just select, hotkey, paste.
How it works
Select text → Option+Q → (AI translates) → Option+W → pasted
- Chinese selected → outputs English
- English selected → outputs Chinese
- Works in any app: WeChat, browser, notes, email
Install
**Requirements:** macOS, [Homebrew](https://brew.sh)
git clone https://github.com/Jane-xiaoer/hammerspoon-ai-translator
cd hammerspoon-ai-translator
bash install.sh
Then edit `~/.hammerspoon/ai-translator/config.lua` and fill in your API key.
Configuration
Open `config.lua` and set your provider and key:
-- Choose provider: "gemini" | "openai" | "custom"
config.provider = "gemini"
config.gemini = {
api_key = "YOUR_GEMINI_API_KEY", -- https://aistudio.google.com/app/apikey
model = "gemini-2.5-flash",
}
Supported providers
| Provider | Where to get key | Recommended model |
|---|---|---|
| Gemini (Google) | aistudio.google.com | gemini-2.5-flash |
| OpenAI | platform.openai.com | gpt-4o-mini |
| Custom | Any OpenAI-compatible endpoint | your model |
Change hotkeys
config.hotkey_translate = {{"alt"}, "q"} -- change to whatever you like
config.hotkey_paste = {{"alt"}, "w"}
First-time setup
- Run
install.sh - Fill in API key in
config.lua - Open Hammerspoon → click Reload Config
- macOS will ask for Accessibility permission — allow it (required for hotkeys to work in all apps)
License
MIT
📱 关注作者 / Follow Me
如果这个仓库对你有帮助,欢迎关注我。后面我会持续更新更多 AI Skill、桌面自动化、翻译工作流和效率工具。
If this repo helped you, follow me for more AI skills, desktop automation, translation workflows, and productivity tools.
- X (Twitter): [@x
Related Skills
Claude Korean Translator
claude.ai 한↔영 자동 번역 Chrome 확장 — 한국어로 쓰면 영어로 전송, Claude의 영어 답변을 한국어로 표시. 본인 Anthropic API 키(Haiku)로 동작 (BYOK).
Video To Text
Turns YouTube and Twitter/X videos into readable articles (PT-BR + English) — local transcription via Whisper,
Snap2Link
Paste screenshots into Claude Code, Cursor, or any terminal AI. Hotkey → region capture → public link in your
Text Writing
Write or rewrite text so it reads human and avoids AI-detected patterns
Humanizer Hk
去 AI 味 · Strip the AI tells out of written Chinese. Hong Kong Traditional. Claude Code skill + paste-anywhere
Aelf-skills Contribution Guide (Adding New Skills)
This guide is the hard gate for both human contributors and AI agents. Chinese is the primary version; this fi
Related Agents
Biblical Translator
Act as a biblical translator. Translate English into corrected/improved version of text in a biblical dialect,
English Enforcer
Checks the project for non-English text (source comments, docs, string literals, commit-facing text) and trans
PRD Specialist
Use when the user provides a requirement outline for a Chinese vocational-college (高等职业教育院校) product, asks for