clip-hand-skill
できること
このスキルは、yt-dlpでのダウンロード、Whisperでの文字起こし、SRT字幕の作成、ffmpegでの切り出しなど、短い動画クリップを作る専門的な手順を示します。同じツールのオプションは、シェルの構文の違いを除き、Windows、macOS、Linuxで使えます。
使う場面
- ✓長いオンライン動画から、短いクリップを切り出したいとき。
- ✓動画の音声から字幕を作りたいとき。
- ✓自分のコンピューターでffmpegを使って動画ファイルを処理したいとき。
スキルのリンク
https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-hands/bundled/clip/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“このインタビュー動画を文字起こしし、字幕付きの短いクリップを3つ作ってください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
スキルは、元の動画のダウンロード、音声の文字起こし、字幕ファイルの作成、ffmpegによるセグメントの切り取りを案内します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Video Clipping Expert Knowledge
Cross-Platform Notes
All tools (ffmpeg, ffprobe, yt-dlp, whisper) use identical CLI flags on Windows, macOS, and Linux. The differences are only in shell syntax:
| Feature | macOS / Linux | Windows (cmd.exe) |
|---|---|---|
| Suppress stderr | 2>/dev/null |
2>NUL |
| Filter output | | grep pattern |
| findstr pattern |
| Delete files | rm file1 file2 |
del file1 file2 |
| Null output device | -f null - |
-f null - (same) |
| ffmpeg subtitle paths | subtitles=clip.srt |
subtitles=clip.srt (relative OK, absolute needs C\\:/path) |
IMPORTANT: ffmpeg filter paths (-vf "subtitles=...") always need forward slashes. On Windows with absolute paths, escape the colon: subtitles=C\\:/Users/me/clip.srt
Prefer using file_write tool for creating SRT/text files instead of shell echo/heredoc.
yt-dlp Reference
Download with Format Selection
# Best video up to 1080p + best audio, merged
yt-dlp -f "bv[height<=1080]+ba/b[height<=1080]" --restrict-filenames -o "source.%(ext)s" "URL"
# 720p max (smaller, faster)
yt-dlp -f "bv[height<=720]+ba/b[height<=720]" --restrict-filenames -o "source.%(ext)s" "URL"
# Audio only (for transcription-only workflows)
yt-dlp -x --audio-format wav --restrict-filenames -o "audio.%(ext)s" "URL"
Metadata Inspection
# Get full metadata as JSON (duration, title, chapters, available subs)
yt-dlp --dump-json "URL"
# Key fields: duration, title, description, chapters, subtitles, automatic_captions
YouTube Auto-Subtitles
# Download auto-generated subtitles in json3 format (word-level timing)
yt-dlp --write-auto-subs --sub-lang en --sub-format json3 --skip-download --restrict-filenames -o "source" "URL"
# Download manual subtitles if available
yt-dlp --write-subs --sub-lang en --sub-format srt --skip-download --restrict-filenames -o "source" "URL"
# List available subtitle languages
yt-dlp --list-subs "URL"
Useful Flags
--restrict-filenames— safe ASCII filenames (no spaces/special chars) — important on all platforms--no-playlist— download single video even if URL is in a playlist-o "template.%(ext)s"— output template (%(ext)s auto-detects format)--cookies-from-browser chrome— use browser cookies for age-restricted content--extract-audio/-x— extract audio only--audio-format wav— convert audio to wav (for whisper)
Whisper Transcription Reference
Audio Extraction for Whisper
# Extract mono 16kHz WAV (whisper's preferred input format)
ffmpeg -i source.mp4 -vn -ar 16000 -ac 1 -y audio.wav
Basic Transcription
# Standard transcription with word-level timestamps
whisper audio.wav --model small --output_format json --word_timestamps true --language en
# Faster alternative (same flags, 4x speed)
whisper-ctranslate2 audio.wav --model small --output_format json --word_timestamps true --language en
Model Sizes
| Model | VRAM | Speed | Quality | Use When |
|---|---|---|---|---|
| tiny | ~1GB | Fastest | Rough | Quick previews, testing pipeline |
| base | ~1GB | Fast | OK | Short clips, clear speech |
| small | ~2GB | Good | Good | Default — best balance |
| medium | ~5GB | Slow | Better | Important content, accented speech |
| large-v3 | ~10GB | Slowest | Best | Final production, multiple languages |
Note: On macOS Apple Silicon, consider mlx-whisper as a faster native alternative.
JSON Output Structure
{
"text": "full transcript text...",
"segments": [
{
"id": 0,
"start": 0.0,
"end": 4.52,
"text": " Hello everyone, welcome back.",
"words": [
{"word": " Hello", "start": 0.0, "end": 0.32, "probability": 0.95},
{"word": " everyone,", "start": 0.32, "end": 0.78, "probability": 0.91},
{"word": " welcome", "start": 0.78, "end": 1.14, "probability": 0.98},
{"word": " back.", "start": 1.14, "end": 1.52, "probability": 0.97}
]
}
]
}
segments[].words[]gives word-level timing when--word_timestamps trueprobabilityindicates confidence (< 0.5 = likely wrong)
YouTube json3 Subtitle Parsing
Format Structure
{
"events": [
{
"tStartMs": 1230,
"dDurationMs": 5000,
"segs": [
{"utf8": "hello ", "tOffsetMs": 0},
{"utf8": "world ", "tOffsetMs": 200},
{"utf8": "how ", "tOffsetMs": 450},
{"utf
よくある質問
どのツールを使いますか?
ダウンロードにyt-dlp、音声の文字起こしにWhisper、クリップの切り出しと字幕の追加にffmpegを使います。
Windowsでも使えますか?
はい。ツールは、Windows、macOS、Linuxで同じオプションを使い、シェルの違いは小さいとスキルは述べています。
字幕ファイルのパスは面倒ですか?
はい。ffmpegの字幕パスにはスラッシュが必要で、絶対Windowsパスではコロンのエスケープが必要です。
詳細
作者による元の説明
Expert knowledge for AI video clipping — yt-dlp downloading, whisper transcription, SRT generation, and ffmpeg processing
repo: RightNow-AI/openfang
人気
- GitHubのスター
- 18k
- ランキング
- #10654
- ライセンス
- Apache-2.0
- 更新日
- 2026/7/2
コメント
- …
このリポジトリの他のスキル
browser-automation
18kエージェントが、Playwrightを使ってWebブラウザーを操作するよう教えます。CSSセレクターでボタン、フォーム、リンクを見つけます。
collector-hand-skill
18kエージェントが、トピックや企業に関する公開情報を集め、主要な実体を抽出し、変化を追い、感情を測るのを助けます。
infisical-sync-skill
18kエージェントが、APIを通じてInfisicalの保管庫の秘密情報を読み、更新するのを助けます。ログインの手順と明確なエラー処理を含みます。
lead-hand-skill
18kエージェントが、Web検索、企業情報の補完、重複の削除を通じて、見込み客を見つけて採点するのを助けます。
似ているスキル
taste-application
280kエージェントが、特定のスタイルの動画を作成するのを助けます。参考動画の編集のリズムを真似したり、新しいシーンを生成したり、色味を調整したりして、他の素材と合わせて編集できます。
taste-distillation
280kエージェントが動画を分析して、スタイルパックを作成できるようにします。色味、カットのリズム、ビジュアル要素などを含み、同じ雰囲気の新しい動画を作るときに再利用できます。
ui-demo
280kエージェントに、洗練されたUIのデモ動画を録画させます。チュートリアルの作成や、Webアプリの動作の紹介に役立ちます。