dean9703111/ai-agent-skill-for-video-workflow / .agent/skills/srt-enhancer
SRT Enhancer
VerifiedThis skill should be used when the user asks to "enhance srt subtitles", "optimize srt with original script", "fix srt typos from markdown", "compare srt with origin.md", "improve subtitle accuracy", "add spaces to srt", "優化 srt 逐字稿", "比對原稿修正字幕", or needs to refine SRT subtitle files by comparing them with an original markdown reference document.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.2 KB |
| references/enhancement-rules.md | markdown | 8.5 KB |
| references/spacing-examples.md | markdown | 8.5 KB |
references/spacing-examples.md
View on GitHub# Spacing Examples
This document provides comprehensive examples of spacing rules for English words and numbers in Chinese text.
## Basic Spacing Rules
### Rule 1: Single English Word in Chinese Text
Add half-width space before and after English words.
✅ **Correct**:
- `這是一個 example 範例`
- `我們使用 Python 開發`
- `這個 API 很好用`
- `學習 JavaScript 很重要`
❌ **Incorrect**:
- `這是一個example範例` (no spaces)
- `我們使用Python 開發` (missing space before)
- `這個 API很好用` (missing space after)
- `學習JavaScript很重要` (no spaces)
### Rule 2: Single Number in Chinese Text
Add half-width space before and after numbers.
✅ **Correct**:
- `總共有 3 個步驟`
- `需要 10 分鐘`
- `版本 2.0 發布了`
- `大約 100 人參加`
❌ **Incorrect**:
- `總共有3個步驟` (no spaces)
- `需要10 分鐘` (missing space before)
- `版本 2.0發布了` (missing space after)
- `大約100人參加` (no spaces)
## Complex Spacing Scenarios
### Multiple English Words (Phrase)
Keep English phrases together, add spaces only at boundaries.
✅ **Correct**:
- `使用 machine learning 技術`
- `這是 open source 專案`
- `採用 deep learning 方法`
- `基於 artificial intelligence 開發`
❌ **Incorrect**:
- `使用machine learning技術` (no boundary spaces)
- `使用 machine learning 技術` (extra space within phrase)
- `這是open source專案` (no boundary spaces)
### English Word + Number Combination
Treat as single unit if they form a compound term.
✅ **Correct**:
- `使用 Python 3.9 版本`
- `支援 HTTP 2.0 協議`
- `需要 Node.js 16 以上`
- `基於 ES6 標準`
❌ **Incorrect**:
- `使用Python3.9版本` (no spaces)
- `使用 Python3.9 版本` (missing space between Python and 3.9)
- `支援HTTP 2.0協議` (missing spaces)
### Version Numbers
Add spaces around complete version numbers.
✅ **Correct**:
- `Python 3.9.1 版本`
- `版本 2.0.5 已發布`
- `使用 v1.2.3 進行測試`
- `升級到 4.0.0 版本`
❌ **Incorrect**:
- `Python3.9.1版本` (no spaces)
- `版本2.0.5已發布` (no spaces)
- `使用v1.2.3進行測試` (no spaces)
### Acronyms and Abbreviations
Treat acronyms as single English words.
✅ **Correct**:
- `使用 API 進行整合`
- `透過 REST 介面`
- `支援 HTTP 協議`
- `基於 JSON 格式`
- `使用 AI 技術`
❌ **Incorrect**:
- `使用API進行整合` (no spaces)
- `透過 REST介面` (missing space after)
- `支援HTTP 協議` (missing space before)
- `基於JSON格式` (no spaces)
### Brand Names and Products
Follow brand-specific capitalization and spacing.
✅ **Correct**:
- `使用 iPhone 拍攝`
- `在 macOS 上運行`
- `透過 GitHub 分享`
- `使用 Visual Studio Code 編輯`
- `部署到 AWS 雲端`
❌ **Incorrect**:
- `使用iPhone拍攝` (no spaces)
- `在macOS上運行` (no spaces)
- `透過Github分享` (incorrect capitalization + no spaces)
- `使用Visual Studio Code編輯` (missing spaces)
### Numbers with Units
Add space before number, keep unit attached or spaced based on convention.
✅ **Correct**:
- `需要 10 分鐘` (space before number and unit)
- `大約 5GB 空間` (space before number, unit attached)
- `溫度 25 度` (space before number and unit)
- `長度 100cm` (space before number, unit attached for metric)
**Note**: Unit spacing can vary by convention. Be consistent within document.
### Percentages
Add space before number, percentage sign typically attached.
✅ **Correct**:
- `成功率 95%`
- `增長了 20%`
- `大約 50% 的人`
❌ **Incorrect**:
- `成功率95%` (no space before)
- `增長了20%` (no space before)
- `大約50%的人` (no spaces)
### Ranges and Intervals
Add spaces around range indicators.
✅ **Correct**:
- `需要 3-5 天`
- `支援 Python 3.6 - 3.9`
- `年齡 18~25 歲`
- `範圍 1 到 10`
❌ **Incorrect**:
- `需要3-5天` (no spaces)
- `支援Python 3.6-3.9` (missing spaces)
- `年齡18~25歲` (no spaces)
## Edge Cases
### Punctuation
Do not add extra spaces around punctuation.
✅ **Correct**:
- `使用 Python,JavaScript 和 Ruby`
- `這是 API。它很好用`
- `學習 Python(推薦)`
- `版本 2.0「已發布」`
❌ **Incorrect**:
- `使用 Python , JavaScript 和 Ruby` (extra spaces around comma)
- `這是 API 。它很好用` (extra space before period)
- `學習 Python (推薦)` (extra space before parenthesis)
### Already Spaced Content
Do not add duplicate spaces.
✅ **Correct**:
- `使用 Python 開發` (already has spaces)
❌ **Incorrect**:
- `使用 Python 開發` (duplicate spaces)
### Mixed Chinese and English Sentences
Apply spacing at language boundaries.
✅ **Correct**:
- `Let's use Python 來開發這個 project`
- `這個 feature 很 useful 對吧`
❌ **Incorrect**:
- `Let's usePython來開發這個project` (no spaces)
- `這個feature很useful對吧` (no spaces)
### URLs and Paths
Generally preserve URLs and file paths as-is.
✅ **Correct**:
- `訪問 https://example.com 查看`
- `檔案位於 /usr/local/bin 目錄`
- `參考 www.example.com 網站`
**Note**: Add spaces at boundaries, but don't add spaces within URLs/paths.
### Code Snippets
Preserve code formatting, add spaces at boundaries.
✅ **Correct**:
- `執行 print("Hello") 指令`
- `使用 const x = 10 宣告`
- `呼叫 getData() 函數`
❌ **Incorrect**:
- `執行print("Hello")指令` (no spaces)
- `使用const x = 10宣告` (no spaces)
### Mathematical Expressions
Add spaces around complete expressions.
✅ **Correct**:
- `結果是 2 + 3 = 5`
- `計算 x * y 的值`
- `公式 a² + b² = c²`
❌ **Incorrect**:
- `結果是2 + 3 = 5` (missing space before)
- `計算x * y的值` (no spaces)
### Dates and Times
Add spaces around date/time components.
✅ **Correct**:
- `日期是 2024-01-15`
- `時間 14:30 開始`
- `在 2024 年 1 月`
❌ **Incorrect**:
- `日期是2024-01-15` (no space before)
- `時間14:30開始` (no spaces)
## Special Considerations
### Consecutive English Words
When multiple English words appear consecutively, maintain phrase integrity.
✅ **Correct**:
- `使用 Visual Studio Code 編輯器`
- `基於 Model View Controller 架構`
- `採用 Test Driven Development 方法`
❌ **Incorrect**:
- `使用VisualStudioCode編輯器` (no spaces)
- `使用 Visual Studio Code 編輯器` (extra spaces within phrase)
### Consecutive Numbers
When multiple numbers appear, treat each distinctly.
✅ **Correct**:
- `版本從 1.0 升級到 2.0`
- `支援 Python 3.6, 3.7, 3.8`
- `需要 2 到 3 天`
❌ **Incorrect**:
- `版本從1.0升級到2.0` (no spaces)
- `支援Python 3.6,3.7,3.8` (missing spaces)
### English Possessives
Keep possessive markers attached to English words.
✅ **Correct**:
- `這是 Python's 特性`
- `使用 user's 資料`
❌ **Incorrect**:
- `這是 Python 's 特性` (extra space before possessive)
### Contractions
Keep contractions intact.
✅ **Correct**:
- `這是 don't 的用法`
- `使用 it's 表示`
❌ **Incorrect**:
- `這是 don 't 的用法` (split contraction)
## Validation Checklist
When applying spacing rules, verify:
- [ ] Space before English word/number
- [ ] Space after English word/number
- [ ] No duplicate spaces
- [ ] Phrases kept together
- [ ] Punctuation spacing preserved
- [ ] URLs and paths intact
- [ ] Brand capitalization correct
- [ ] Consistent spacing throughout
## Common Patterns
### Technology Stack
✅ **Correct**:
```
使用 React 和 Node.js 開發
基於 Python Django 框架
採用 Vue.js 3.0 版本
部署到 AWS Lambda 服務
使用 Docker 容器化
透過 Git 版本控制
```
### Version Information
✅ **Correct**:
```
Python 3.9.1 版本
Node.js v16.14.0
React 18.0.0
升級到 2.0 版本
支援 ES6+ 語法
```
### Measurements and Quantities
✅ **Correct**:
```
需要 10GB 空間
大約 5 分鐘
長度 100 公分
重量 2.5kg
溫度 25 度
```
### Technical Terms
✅ **Correct**:
```
使用 RESTful API
基於 JSON 格式
透過 HTTP 協議
採用 OAuth 2.0 認證
支援 WebSocket 連接
```
## Summary
**Golden Rules**:
1. Add half-width space before and after English words in Chinese text
2. Add half-width space before and after numbers in Chinese text
3. Keep English phrases together (don't add spaces within)
4. Preserve punctuation spacing
5. Don't add duplicate spaces
6. Maintain URL and code integrity
7. Follow brand-specific capitalization
**When in Doubt**:
- Prioritize readability
- Be consistent throughout document
- Preserve original spacing if already correct
- Don't over-space or under-space
Focus on creating clean, readable text that flows naturally while maintaining clear boundaries between Chinese and English/numeric content.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 472k | Updated | Claude CodeCodex | Verified | Install |
| 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: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| 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 available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |