Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Cyxj Subfix

ASecurity

达芬奇字幕修正工具:SRT 清理、Gemini 语义初修、Opus 审查把关。 触发词:/字幕修正、修正字幕、字幕错别字、SRT 修正、达芬奇字幕。 当用户提供 SRT 文件路径需要修正时使用此 skill。

6 stars
0 votes
0 copies
0 views
Added 6/13/2026
ai-agentspythonbashapi

Works with

claude codeapi

Security Analysis

A100/100

Scanned 6/13/2026

Install to Claude Code

$npx -y skills add chenyuxiaojin/xiaochen-skills --skill cyxj-subfix --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cyxj Subfix?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Cyxj Subfix
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/chenyuxiaojin-cyxj-subfix/badge)](https://www.skillsdirectory.com/skills/chenyuxiaojin-cyxj-subfix)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: cyxj-subfix
description: >
  达芬奇字幕修正工具:SRT 清理、Gemini 语义初修、Opus 审查把关。
  触发词:/字幕修正、修正字幕、字幕错别字、SRT 修正、达芬奇字幕。
  当用户提供 SRT 文件路径需要修正时使用此 skill。
version: 4.0.0
---

# 达芬奇字幕修正 Skill v4

## 路径约定

`$SKILL_DIR` 指本 SKILL.md 所在目录的绝对路径。运行脚本前先确定:
```bash
SKILL_DIR="$(dirname "$(readlink -f "$0")")"  # 或直接用 SKILL.md 所在目录的绝对路径
```

## 架构原则

**三层分离**:Python 做结构处理,Gemini 做语义初修,Opus 审查把关。

- Python(srt_cleaner.py):HTML 清理、去重、标点替换、合并、拆分、编号、导出纯文本 — 所有时间码操作
- Gemini(srt_corrector.py):同音字修正 + 去口吃 + 去填充词 — API 自动处理,几乎免费
- Opus(对话内):审查 Gemini 的修改清单,纠正错误修正,发现遗漏 — 只看 diff,token 极少

**词典定位**:词典是"已知陷阱"参考,不是主力。同一个词的错误变体太多,词典永远无法穷举。真正的修正靠 Gemini 的语义理解 + 视频主题上下文。Opus 审查后发现的遗漏会反馈到词典,让系统越来越准。

## 使用方法

```
/字幕修正 ~/Desktop/Timeline1.srt                          # 完整流程
/字幕修正 ~/Desktop/Timeline1.srt --topic "Claude Code教程" # 指定主题提高修正准确度
/字幕修正 ~/Desktop/Timeline1.srt --no-regroup             # 跳过合并拆分
/字幕修正 ~/Desktop/Timeline1.srt --premium                # Phase 2a 用高端 Gemini 模型
/字幕修正 --add "错误词" "正确词"                            # 添加词典条目
```

## 显示规则

- 场景:横屏 16:9
- 软上限:18 字符(正常通过)
- 警告区:18-25 字符(输出时标注提醒)
- 硬上限:25 字符(Python 强制拆分,标记需人工校验)
- 字符计算:中文/中文标点=1, ASCII=0.5, 向上取整
- 标点规则:字幕中不用逗号句号(替换为空格),保留?!

## 执行步骤

<steps>

### Phase 1: Python 结构处理

1. **备份**:创建 `.bak` 备份文件
2. **运行 srt_cleaner.py**:
   ```bash
   python3 "$SKILL_DIR/srt_cleaner.py" "<input.srt>" --stats
   ```
   如果用户指定 `--no-regroup`,追加该参数跳过合并拆分。
3. **报告结果**:向用户汇报去重、合并、拆分、超限条目数量

### Phase 2a: Gemini 自动初修

1. **确认主题**:如果用户提供了 `--topic`,以此为语境参考;否则从字幕内容推断主题,向用户确认
2. **运行 srt_corrector.py**:
   ```bash
   python3 "$SKILL_DIR/srt_corrector.py" "<_cleaned.srt>" --topic "主题"
   ```
   如果用户指定 `--premium`,追加该参数使用高端模型。
3. **输出**:
   - `_gemini_fixed.srt`:Gemini 修正后的完整 SRT
   - `_changes.json`:修改清单(原文→修正,带原因)

### Phase 2b: Opus 审查(在对话中)

1. **读取 `_changes.json`**(只看修改清单,不读全文 SRT)
2. **审查 Gemini 的修正**:
   - 检查每项修正是否合理
   - 标记错误的修正(Gemini 改错了的)
   - 发现遗漏的错误(浏览 _gemini_fixed.srt 中 Gemini 未修改的部分,抽查是否有遗漏)
3. **应用最终修正**:
   - 撤销错误的修正
   - 补充遗漏的修正
   - 保存为 `_fixed.srt`
4. **反馈到词典**:
   - 把 Gemini 漏掉的重要错误写入 `dictionary.json` 的 `feedback.gemini_missed` 字段
   - 如果遗漏的错误有通用性(不是偶发的),同时添加到 `corrections` 中

### Phase 3: 导出 IntelliScript 纯文本

Phase 2b 完成后,运行:
```bash
python3 "$SKILL_DIR/srt_cleaner.py" "<_fixed.srt>" --export-txt
```

生成 `_script.txt`(UTF-8 纯文本),供 DaVinci Resolve IntelliScript 使用。

### Phase 4: 输出汇总

向用户说明最终输出文件:
- `_fixed.srt` — 最终修正后的字幕文件
- `_script.txt` — 纯文本逐字稿(给 IntelliScript 用)

中间文件留在同目录供排查:
- `原文件.bak` — 原始备份
- `_cleaned.srt` + `_cleaned_stats.json` — Phase 1 中间产物
- `_gemini_fixed.srt` + `_changes.json` — Phase 2a 中间产物

提醒检查 `splits_needing_review` 和 `over_soft_limit` 条目。

</steps>

## Opus 审查时的权限边界

**可以做:**
- 审查并修正 Gemini 的错误修改
- 补充 Gemini 遗漏的同音字、口吃、填充词修正
- 将遗漏反馈到词典
- 审查合并结果,标记语义问题
- 建议用户添加新词典条目

**绝不可以做:**
- 修改任何时间码
- 合并或拆分条目
- 调整条目顺序
- 删除整条字幕(即使是填充词,也只清空文字保留时间码结构)
- 书面化改写口语表达

## 模型选择

| 用途 | 模型 ID | 价格 | 说明 |
|------|---------|------|------|
| 日常初修 | `gemini-3.5-flash` | $1.50/$9 per M | 默认(3.5 系列目前仅 flash 一档)|
| 高端初修 | `gemini-3.5-flash` | $1.50/$9 per M | 与日常同款,`--premium` 仅保留参数兼容 |
| 审查 | Opus 4.6(对话内) | $15/$75 per M | 只审查 diff |

**注意**:`gemini-3.1-flash-image-preview` 和 `gemini-3-pro-image-preview` 是图片生成专用模型,不用于文本修正。

## 词典管理

添加新的错误映射:
```
/字幕修正 --add "错误词" "正确词"
```

词典结构为"正确词 → 已知错误变体列表",添加时会自动归类到对应的正确词下。

词典路径:`$SKILL_DIR/dictionary.json`

### 反馈机制

`dictionary.json` 的 `feedback.gemini_missed` 字段记录 Gemini 漏掉但 Opus 审查时发现的错误:
```json
{"original": "错误文字", "correct": "正确文字", "context": "错误类型描述", "date": "2026-03-21"}
```

这些记录用于:
1. 优化 Gemini 的 prompt(如果某类错误反复出现)
2. 扩充 corrections 词典(如果错误有通用性)

Attribution

chenyuxiaojinchenyuxiaojin
View sourceMore from chenyuxiaojin →
SSkills DirectorySkills Directory

Know which skills are safe — weekly.

Best new skills + every skill we flagged as malicious. From the team that scanned 103,619.

Join free

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Know which skills are safe — weekly.

Best new skills + every skill we flagged as malicious. From the team that scanned 103,619.

Join free

Related Skills

Caveman

Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.

1023331 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

686011 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3351 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

651 votes

math-skill

A comprehensive mathematical reasoning skill for AI assistants — handles arithmetic to research-level problems with rigorous step-by-step reasoning, systematic verification, and transparent uncertainty handling

381 votes
View all in ai-agents →