English Autocomplete for Claude Code
A plugin that shows English word suggestions above the Claude Code prompt box and inserts one with Tab. Work terms come first, and one-letter typos get fixed. I built it alone and published it on GitHub.
Typo fixes
59/60
right word within 5 suggestions, 46/60 as the first
Vocabulary
~25,000 words
including about 900 work terms
What I did
- Planned, built and published it alone, using an AI coding agent as an implementation partner.
- Used a Claude Code plugin event to show suggestions in the prompt box, and registered shortcuts as a tool so Claude can edit them on request.
- Codex CLI has no extension point, so I patched its prompt box in Rust and shipped a separate executable.
Problem
Writing prompts in English, the flow breaks when the spelling of a word does not come to mind right away. This lets you pick the word without leaving the prompt box.
What I built
- Up to 5 suggestions that start with the word being typed, inserted with Tab. Everything runs locally, with no LLM call.
- Up to 3 role-based work terms (about 900 in all) come first, and the rest are general words by frequency (about 25,000 from wordfreq).
- When nothing matches, it offers a
typo?suggestion that fixes one letter (changed, added, dropped or swapped). - Frequent sentences are saved as shortcuts, editable with the
/shortcutcommand or by asking Claude. - The GitHub repo doubles as a Claude Code plugin marketplace, so it installs with one command. GitHub repo
Trial and error
- The frequency trap: Ranking by frequency alone pushed everyday words above work terms. Up to 3 work terms now lead, but only 1 for 3 letters or fewer, so typing “the” still shows “they”, “their” and “there”.
- Typo false alarms: Typo fixes run only when nothing matches, from 4 letters, assuming the first letter is right, and only for a one-letter difference. Even so, 14 of 30 correct words missing from the dictionary showed
typo?, which is left as the next improvement. - Measuring again: To recheck the first accuracy figure, I fixed a 60-item test set in advance with a seed and a hash, then re-measured. The right word came first 46/60 times and within 5 suggestions 59/60 times, with 0/60 false alarms on correct words.
- Speed: A linear scan takes about 0.4 ms per keystroke, so there is no index yet; a first-letter index is the plan if it ever slows down.
- Codex support: Codex CLI has no official extension point, so I patched its prompt box in Rust. A newer version broke the patch build, so version syncing is paused.
Quality
- The plugin has 13 tests (10 for completion, 3 for shortcuts). On the Codex side, 16 completion tests sit among 412 prompt-box tests.
- The word list’s license (CC BY-SA 4.0) is credited, and the Codex patch keeps its Apache-2.0 notice as an unofficial modified build.