Skip to content

mxyhi/ok-skills / bopomofo-rescue

bopomofo-rescue

Verified

Detect and recover text that was accidentally typed with the Taiwanese Bopomofo / Zhuyin (注音) keyboard while the input method (IME) was stuck in English/ASCII mode — what Taiwanese users call 注音亂碼 or 注音文 — producing meaningless-looking letter+digit sequences such as "su3cl3a8", "cl3", "g4", "2k7", "vu,4", or such garbled runs embedded in an otherwise normal request (e.g. "help me fix su3cl3a8", "看看這個 PR qk4ru.6", "幫我改 su3cl3a8xk7"). Use this skill whenever a user message contains short ASCII tokens that look like keyboard gibberish, do not form real English words, and cannot be understood normally — especially tokens with digits interspersed among letters (tone keys 3/4/6/7 or vowel keys 8/9/0), which are a strong sign of Mandarin phonetic keystrokes typed in the wrong input mode. Run scripts/decode_bopomofo.py to deterministically map the keystrokes back to 注音 symbols with a confidence score, then interpret the intended Traditional Chinese in context and continue the user's original request without making them retype. Do NOT trigger on genuine technical strings — code, file paths, URLs, git hashes, CLI flags, package names, version numbers — the script's exclusion rules and confidence tiers already filter these out. Especially valuable for Taiwanese developers who forget to switch input methods when prompting AI coding agents.

FileKindSize
LICENSEother1.1 KB
SKILL.mdskill md8.6 KB
references/exclusion-rules.mdmarkdown2.3 KB
references/keyboard-layout.mdmarkdown2.6 KB

references/exclusion-rules.md

View on GitHub
# 排除規則:哪些字串不該被當成注音誤打

因為 26 個字母全部落在注音鍵上,很多正常英文/技術字串也「看起來像」注音按鍵。
若不排除,這個 skill 會熱心到把 `npm run dev` 翻成中文,造成實際傷害。
`scripts/decode_bopomofo.py` 的 `exclusion_reason()` 實作了以下規則。

## 直接跳過(硬排除)

| 規則 | 原因 | 例子 |
|------|------|------|
| 含大寫字母 | 注音誤打一定是小寫;大寫多為 camelCase/常數/hash | `GitHub`、`API_KEY`、`aB3f9` |
| 含注音鍵盤以外字元 | `@ # $ % & * + = _ ?` 等,或中日韓字 | `user@host`、`a=1`、`你好` |
| 含 `://` | 網址 | `https://x.com` |
| 路徑樣式 | 開頭 `~ . /`、含 `//` 或 `\`、drive letter `C:` | `./src/app.py`、`C:\tmp` |
| CLI flag | 開頭 `-` 或 `--` | `-m`、`--verbose` |
| 純數字/版本號 | 全是數字與 `.`/`,` | `2024`、`3.14.1`、`721` |
| 檔名樣式 | `name.ext`(副檔名 1–6 字) | `config.py`、`index.tsx` |

程式碼區塊(``` ``` ```)與行內 code(`` ` ``)在進入分析前就被遮罩掉,不會被碰。

## 軟判斷(靠信心分數)

通過硬排除後,還要「能完整切成合法國語音節」才算候選。再用信心分數分級:

- **含數字**(聲調 3/4/6/7 或韻母 8/9/0)+能切音節 → 強訊號,通常 `high`。
  英文單字幾乎不會在字中夾數字,這是最好用的判準。
- **純字母**(無數字)→ 本質曖昧。`npm`、`git`、`html`、`css` 都能硬切成音節,
  所以上限壓在 0.60,永遠不會靜默觸發;交給有上下文的 LLM 判斷。

## 已知會被正確放過的技術字串

`npm`、`git`、`http`、`html`、`css`、`run`、`dev`、`commit`、`install`、
`fix`、`config.py`、`./src/app.py`、`--verbose`、`2024.1`、`issue721`、
`GitHub`、`user@host` …等(見 `tests/cases.tsv` 的反例集)。

## 已知限制(phase 2 再處理)

- **英文與注音黏在一起沒空白**(如 `fixsu3cl3a8`)目前以整個 token 判斷,
  可能整段被放過。之後可加子字串切分。
- **純字母的真注音誤打**(如 工=`ej/`,全一聲無數字)會被壓成 `low`,
  可能需要上下文才救得回來。加入離線詞典(phase 2)後可大幅改善。
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 323kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 323kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 323kUpdated Claude CodeCodexVerifiedInstall