Index of every page on this site: llms.txt
All skills
steelan9199 avatar

/subtitle-corrector-yashu

@9e01957
Run it yourself

本技能专门纠错「音频转文字」生成的纯文本字幕:将文中专有名词的误写归一为正字,并修正其他明显错别字、删除口语填充词。激活条件:用户消息须包含以下关键词之一:`字幕纠错`、`校正音频转文字`、`音频转文字字幕纠错`、`字幕错别字修正`、`字幕校订`。

  • 2 files
  • 8.7 KB
  • Updated 3 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/steelan9199/wechat-publisher/subtitle-corrector-yashu

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈95 tokens for metadata: the name and description. ≈1.2k when used: this file.

Description uses 1.9% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈151 characters, or 1.9%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

字幕纠错 Skill(Subtitle Corrector)· 推断归一版

把一份「音频转文字」产生的纯文本字幕,纠错成干净可读的版本。原始文件绝不被修改,结果写入新文件。

核心原则

  • 原始文件只读:任何情况下不写入、不重命名、不删除用户提供的原 txt。
  • 专有名词只给正字:用户提供的只是一串「正确写法」的专有名词(用逗号 ,、中文逗号 , 或空格分隔)。文中对应的误写(音近/形近)由你(AI)去推断并改成正字。例如用户给 小明,文中若是 小名/晓明,你高置信度地归一为 小明。
  • 高置信度才改(宁漏勿错):只有当你相当确信某处是同一专有名词的误写时才改;拿不准就保留原样,绝不为「通顺」而臆造或误伤正常词。
  • 填充词清理 + 语境增强:删口语填充词,并顺手修其他明显错别字。

工作流

第 1 步:解析用户输入

从用户消息提取两类信息:

  1. 输入文件路径:绝对路径,如 D:\temp\8月17日.txt(Windows 反斜杠原样保留)。
  2. 专有名词清单(仅正字):用户直接给的一串正确写法,用 , / , / 空格 分隔。
    • 例:小明, 李娇, 张总 或 小明 李娇 张总
    • 这些是「标准名」,你需要用它们在文中定位并修正误写。
    • 若用户未提供任何专有名词,仍可执行「填充词清理 + 语境增强」,但不要臆造专有名词。

不要期待用户给出「错→对」格式——他们只给对的那一面,错的那一面由你推断。

第 2 步:AI 语义纠错(核心、必做)

读取原文件全文,做一遍人工复核式的纠错,产出纠错后的文本(先在内存/草稿中):

  1. 专有名词归一:对清单里每个正字,扫描全文,找出高置信度的误写并改成正字。
    • 依据:音近(小名/晓明→小明)、形近、同音字、以及上下文语义一致性。
    • 仅在「高度确信是同一实体/术语的误写」时改;若某正字在文中本就写对,无需处理;若文中出现读音相近但可能是另一个正常词,则保留。
    • 例:用户给 张总,文中 张忠/章总 在语境指同一人 → 归一为 张总。
  2. 其他错别字(语境增强):顺手修正明显音近/形近错别字(如 在见→再见、人工只能→人工智能),同样只改高置信度的。
  3. 保留原段落、空行、标点结构;严禁增删事实或改写用户原意。

边改边记录改动清单(「原词 → 正字」),用于最后汇报。

第 3 步:写入并做确定性后处理

  1. 将第 2 步得到的文本写入 _corrected.txt(与原文件同目录,文件名 原名_corrected.txt,编码 utf-8-sig,保证 Windows 记事本正常显示中文)。
    • 可用 Write 工具直接写出。
  2. 运行本技能目录下的 scripts/correct.py 对该文件再做一遍确定性填充词清理 + 标点规整(脚本只删安全的单字/短语填充词,不会动你已归一好的专有名词):
    python3 "<skill_dir>/scripts/correct.py" -i "D:\temp\8月17日_corrected.txt" -o "D:\temp\8月17日_corrected.txt"
    • 脚本会打印 OUTPUT: 与 REPORT:(含各填充词命中次数),读取以便汇报。
    • 如需自定义填充词,用 --fillers "啊" "额" ...;如要跳过,用 --no-filler。

第 4 步:向用户汇报

简洁说明:

  • 输出文件路径(强调原文件未改动)。
  • 专有名词归一:列「误写 → 正字」若干例(来自第 2 步记录)。
  • 其他错别字修正:举 2-3 个典型(如 在见→再见)。
  • 填充词删除:来自脚本 REPORT 的统计。
  • 提醒:对「高置信度才改」未敢确定的地方,可让用户补充指正。

边界与注意事项

  • 文件很大时,AI 语义纠错可分段阅读、逐段覆盖,但注意保持整体一致;脚本后处理照常处理整文件。
  • 不要为了「通顺」而改变用户已写对的专有名词、数字、术语。
  • 编码默认输出 utf-8 无BOM;若用户要求其他编码,用 --encoding-out 指定。

示例

用户:「帮我纠错字幕 D:\temp\8月17日.txt ,专有名词:小明, 李娇, 张总」

→ AI 读原文,发现 小名/晓明→小明、李叫→李娇、张忠→张总(高置信度),顺手修 在见→再见;写入 D:\temp\8月17日_corrected.txt;再用 correct.py 做填充词+标点清理;最后汇报改动清单。

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 9e01957. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 3 months ago
disable-model-invocation
false

README badge

README badge for steelan9199/wechat-publisher/subtitle-corrector-yashu