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
- Chinese Novelist Skill — 🎭 AI 驱动的中文小说创作助手 1.2k ★
- Guizang Yingzao Skill — 🏯 Claude Code / Codex skill — transform Chinese architecture, cultural places & travel photos into art-direct 396 ★
- Yt Transcriber — CLI app- Give it a YouTube URL and you get a transcription with possible speaker identification and optional s 337 ★
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).
Omnilingua AI
Agentic AI translator: auto-detects Groq/OpenAI/Claude/Gemini keys, RAG translation memory, OCR + PDF, live vo
Video To Text
Turns YouTube and Twitter/X videos into readable articles (PT-BR + English) — local transcription via Whisper,
Localizing Video
Claude Code skill: make a foreign-language video (Mandarin/JP talking-head + slides) watchable in English — sy
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
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