ASR Text Correction Safety
БесплатноЗапускает вложенные скриптыНе проверенUse when writing, reviewing, or debugging any layer that rewrites text after recognition — dictation cleanup, OCR correction, autocorrect, transliteration…
от y16689540962-cloud323 установки в других каталогахОб этом скилле
Text-correction safety
A correction layer sits between recognition and the user. Its failures are asymmetric and that asymmetry decides every design question in this document:
| failure | cost |
|---|---|
| false negative — a mis-hearing survives | the user edits one word; they can see it is wrong |
| false positive — correct text is rewritten | the user's sentence silently means something else, and they may never notice |
So the invariant is not "correct as much as possible". It is:
Never corrupt text that was already correct. Accuracy is the second objective.
Every rule below exists because a real implementation violated it. The numbers are from an adversarial audit of a shipping dictation-correction layer that found nine defect classes; section "How to find these defects" describes the method that found them.
Rule 1 — Never match by sound alone
The most attractive design for correcting terminology is phonetic indexing: convert your
glossary to pinyin (or any phonetic key), convert the recognized text the same way, and
replace every phonetic match with the canonical spelling. It appears to generalize — add
工作台 once and every mis-hearing of it (工作太, 公作台) resolves itself.
It is unsound, and the reason is arithmetic, not tuning. A short phonetic key matches every word with that pronunciation, and Mandarin is dense with legitimate homophones:
| pinyin | all of these are correct words |
|---|---|
| rènwù | 人物 / 任务 |
| yībù | 一部 / 异步 |
| xìntiáo | 信条 / 心跳 |
| biànyī | 便衣 / 编译 |
| jiēdiǎn | 接点 / 接口 |
| pèizhì | 配制 / 配置 |
Shipped as twelve two-syllable pairs, this rewrote 160,454 distinct two-character strings — the blast radius was the language. Observed damage:
人物关系很复杂 → 任务关系很复杂
这是一部好电影 → 这是异步好电影
信条很重要 → 心跳很重要
一步一步来 → 异步异步来
No threshold fixes this. The match is exact on pronunciation and wrong on meaning. The information that selects 人物 over 任务 is sentence context, and the phonetic key has already discarded it. Raising the threshold only converts false positives into false negatives inside the same broken space.
What is safe instead
Narrow the claim until it is checkable. The safe subset is cross-script: a Chinese
mis-hearing of a Latin term (哈里斯 → Harness). There is no same-script collision
because the canonical form is in another writing system. Three guards make it sound:
- ≥3 syllables. Bare
哈里(hālǐ) is also an ordinary word (哈里发), so short entries are rejected before they can match. - Complete reading for the whole span. If any character in the span has no phonetic
entry, the key silently shortens and a 3-character span can match a 2-syllable key.
Require
readings.length === span.length. - Exact key match over the whole span. No partial spans, no fuzzy edges.
For same-script terminology, use exact string matching on observed spellings. It does
not generalize, and that is the point: flcash → FlClash is a fact you observed, not an
inference you made.
The sub-rule that matters most
A heard variant that is itself an ordinary word must not be listed. A glossary that
recorded grade under Gradle, harris under Harness and cloud under Claude rewrote:
my grade is A → my Gradle is A
the cloud is down → the Claude is down
harris county → Harness county
upgrade to the new version → Gradle to the new version
Rule 2 — Mask protected spans before any rewriting pass
Any rewriting pass will eventually meet a file path, URL, email, version string or code
fragment. harness.git inside cd ~/projects/harness.git is a repository name, not a
mis-hearing of "Harness".
Mask them once, before every pass, and restore at the end:
const { masked, restore } = maskProtected(text);
// ... every pass operates on `masked` ...
return restore(text);
const PROTECTED = [
/[a-z][a-z0-9+.-]*:\/\/[^\s]+/gi, // scheme://…
/(?:^|[\s([<"'`])(?:~|\/|\.{1,2}\/)[^\s)\]}>"'`]*/g, // absolute/relative paths
/[A-Za-z]:\\[^\s]*/g, // Windows paths
/[\w.+-]+@[\w-]+\.[\w.-]+/g, // emails
/\bv?\d+(?:\.\d+)+(?:[-+][\w.]+)?\b/g, // v1.2.3
/--?[a-z][a-z0-9-]*/gi, // CLI flags
/`[^`\n]*`/g, // inline code
/\b[\w-]+\.(?:js|ts|py|json|ya?ml|md|toml|sh|apk|onnx|wav)\b/gi,
];
The mechanism matters more than the pattern list: one mask covering all passes, not each pass maintaining its own "is this a path?" check. A per-pass check will be forgotten in the pass you add next month.
Rule 3 — Idempotence is a correctness property
A correction layer runs more than once on the same text: retry, re-insert, provider switch, re-render. Any non-idempotent pass grows text without bound.
The worst real case: a phrase pass emitted `Cocos Creat
Установить ASR Text Correction Safety в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл ASR Text Correction Safety?
Use when writing, reviewing, or debugging any layer that rewrites text after recognition — dictation cleanup, OCR correction, autocorrect, transliteration, terminology normalization, or filler removal — to verify it cannot silently change what the user actually said. Also use when a phonetic, pinyin, fuzzy, or edit-distance matcher is proposed for correcting recognized text.
Как установить скилл ASR Text Correction Safety?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ASR Text Correction Safety запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic