Claude-skill-registry-data macos-dictionary
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry-data
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry-data "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/macos-dictionary" ~/.claude/skills/majiayu000-claude-skill-registry-data-macos-dictionary && rm -rf "$T"
manifest:
data/macos-dictionary/SKILL.mdsource content
macOS 多語字典查詢
使用 macOS DictionaryServices API 查詢多語字典。
支援的字典
| 字典 | 查詢方向 | 提供資料 |
|---|---|---|
| スーパー大辞林 | 日→日 | 讀音、詞性、日文定義 |
| ウィズダム和英辞典 | 日→英 | 英文翻譯 |
| ウィズダム英和辞典 | 英→日 | 日文翻譯 |
| 國語辭典 | 中→中 | 注音、解釋 |
| 譯典通英漢雙向字典 | 英↔中 | 翻譯 |
使用方式
# JSON 格式(預設) uv run scripts/lookup-dictionary.py 食べる # 原始字典文字 uv run scripts/lookup-dictionary.py 食べる --raw # 英文查詢 uv run scripts/lookup-dictionary.py "national debt" # 中文查詢(繁體) uv run scripts/lookup-dictionary.py 經濟
輸出格式
{ "query": "食べる", "found": true, "sources": { "daijirin": true, "waei": true }, "data": { "reading": "たべる", "kanji": "食べる", "pos": "動詞", "pos_details": "一段動詞(下一段)", "definition_ja": "食物を口に入れ...", "definition_en": "eat; have a meal" } }
回應流程
- 執行腳本查詢詞彙
- 解析 JSON 結果
- 依據詞彙類型選擇適當格式回應
- 加入 AI 補充的中文翻譯和例句
回應格式詳見:references/output-format.md
特殊情況處理
中日共用漢字
某些漢字詞彙在中文和日文意思不同(如「勉強」「大丈夫」),字典可能返回中文結果。
處理方式:
- 用
檢查結果是否包含注音符號--raw - 若為中文結果,改用假名重新查詢
- 若仍無法取得日文結果,使用 AI 知識補充
查不到的情況
- 專有名詞、新詞、複合詞可能查不到
- 簡體字查不到(需轉換為繁體)
- 使用 AI 知識回答,並標註「字典未收錄」
限制
- 僅限 macOS
- 需在「字典」應用程式中啟用日文字典
技術文檔
詳細 API 說明:
doc/macos-dictionary-services.md