@kolbo/kolbo-code-darwin-x64-baseline 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/bin/kolbo +0 -0
  2. package/package.json +14 -0
  3. package/skills/frontend-design/SKILL.md +42 -0
  4. package/skills/kolbo/SKILL.md +216 -0
  5. package/skills/remotion-best-practices/SKILL.md +61 -0
  6. package/skills/remotion-best-practices/rules/3d.md +86 -0
  7. package/skills/remotion-best-practices/rules/animations.md +27 -0
  8. package/skills/remotion-best-practices/rules/assets/charts-bar-chart.tsx +173 -0
  9. package/skills/remotion-best-practices/rules/assets/text-animations-typewriter.tsx +100 -0
  10. package/skills/remotion-best-practices/rules/assets/text-animations-word-highlight.tsx +103 -0
  11. package/skills/remotion-best-practices/rules/assets.md +78 -0
  12. package/skills/remotion-best-practices/rules/audio-visualization.md +198 -0
  13. package/skills/remotion-best-practices/rules/audio.md +169 -0
  14. package/skills/remotion-best-practices/rules/calculate-metadata.md +134 -0
  15. package/skills/remotion-best-practices/rules/can-decode.md +81 -0
  16. package/skills/remotion-best-practices/rules/charts.md +120 -0
  17. package/skills/remotion-best-practices/rules/compositions.md +154 -0
  18. package/skills/remotion-best-practices/rules/display-captions.md +184 -0
  19. package/skills/remotion-best-practices/rules/extract-frames.md +229 -0
  20. package/skills/remotion-best-practices/rules/ffmpeg.md +38 -0
  21. package/skills/remotion-best-practices/rules/fonts.md +152 -0
  22. package/skills/remotion-best-practices/rules/get-audio-duration.md +58 -0
  23. package/skills/remotion-best-practices/rules/get-video-dimensions.md +68 -0
  24. package/skills/remotion-best-practices/rules/get-video-duration.md +60 -0
  25. package/skills/remotion-best-practices/rules/gifs.md +141 -0
  26. package/skills/remotion-best-practices/rules/images.md +134 -0
  27. package/skills/remotion-best-practices/rules/import-srt-captions.md +69 -0
  28. package/skills/remotion-best-practices/rules/light-leaks.md +73 -0
  29. package/skills/remotion-best-practices/rules/lottie.md +70 -0
  30. package/skills/remotion-best-practices/rules/maps.md +412 -0
  31. package/skills/remotion-best-practices/rules/measuring-dom-nodes.md +34 -0
  32. package/skills/remotion-best-practices/rules/measuring-text.md +140 -0
  33. package/skills/remotion-best-practices/rules/parameters.md +109 -0
  34. package/skills/remotion-best-practices/rules/sequencing.md +118 -0
  35. package/skills/remotion-best-practices/rules/sfx.md +30 -0
  36. package/skills/remotion-best-practices/rules/subtitles.md +36 -0
  37. package/skills/remotion-best-practices/rules/tailwind.md +11 -0
  38. package/skills/remotion-best-practices/rules/text-animations.md +20 -0
  39. package/skills/remotion-best-practices/rules/timing.md +179 -0
  40. package/skills/remotion-best-practices/rules/transcribe-captions.md +70 -0
  41. package/skills/remotion-best-practices/rules/transitions.md +197 -0
  42. package/skills/remotion-best-practices/rules/transparent-videos.md +106 -0
  43. package/skills/remotion-best-practices/rules/trimming.md +51 -0
  44. package/skills/remotion-best-practices/rules/videos.md +171 -0
  45. package/skills/remotion-best-practices/rules/voiceover.md +99 -0
  46. package/skills/video-production/SKILL.md +152 -0
  47. package/skills/youtube-clipper/SKILL.md +187 -0
@@ -0,0 +1,187 @@
1
+ ---
2
+ name: youtube-clipper
3
+ description: >
4
+ YouTube video smart clipping tool. Downloads video and subtitles, uses AI to analyze
5
+ and generate fine-grained chapters (2-5 minute segments), lets user select clips,
6
+ then auto-clips, translates subtitles to bilingual format, burns subtitles, and generates
7
+ summary copy. Use when: clipping YouTube videos, generating short clips, making bilingual
8
+ subtitle versions, creating Shorts/Reels/TikTok from long-form video.
9
+ Keywords: video clip, YouTube, subtitle translation, bilingual subtitles, video download,
10
+ shorts, reels, tiktok, yt-dlp, ffmpeg, clip video
11
+ allowed-tools:
12
+ - Read
13
+ - Write
14
+ - Bash
15
+ - Glob
16
+ - AskUserQuestion
17
+ ---
18
+
19
+ # YouTube Video Smart Clipper
20
+
21
+ ## Workflow — 6 Phases
22
+
23
+ ### Phase 1: Environment Check
24
+
25
+ Verify required tools are installed:
26
+
27
+ ```bash
28
+ yt-dlp --version
29
+ ffmpeg -version
30
+ ffmpeg -filters 2>&1 | grep subtitles # verify libass for subtitle burn
31
+ python3 -c "import pysrt; print('ok')"
32
+ ```
33
+
34
+ **If missing**:
35
+ - yt-dlp: `brew install yt-dlp` or `pip install yt-dlp`
36
+ - FFmpeg without libass (macOS): `brew install ffmpeg-full`
37
+ - Python deps: `pip install pysrt`
38
+
39
+ > **Note**: Standard Homebrew FFmpeg lacks libass. On macOS install `ffmpeg-full`. On Windows, gyan.dev FFmpeg builds include libass.
40
+
41
+ ---
42
+
43
+ ### Phase 2: Download Video
44
+
45
+ Ask user for YouTube URL, then download video + English subtitles:
46
+
47
+ ```bash
48
+ yt-dlp -f "bestvideo[height<=1080][ext=mp4]+bestaudio/best" \
49
+ --write-auto-sub --sub-lang en --convert-subs srt \
50
+ -o "%(id)s.%(ext)s" <youtube_url>
51
+ ```
52
+
53
+ Show user: title, duration, file size, download path.
54
+
55
+ **Output**: `<id>.mp4` + `<id>.en.srt`
56
+
57
+ **If 429 rate limit on subtitles**: download video first (`--no-write-subs`), then retry subtitle download separately after a delay.
58
+
59
+ ---
60
+
61
+ ### Phase 3: AI Chapter Analysis
62
+
63
+ Parse the subtitle file and analyze content semantically:
64
+
65
+ 1. Read full subtitle text with timestamps
66
+ 2. Identify natural topic transitions
67
+ 3. Generate chapters at **2-5 minute granularity** (not coarse 30-minute cuts)
68
+
69
+ For each chapter provide:
70
+ - **Title**: concise topic summary (10-20 words)
71
+ - **Time range**: start → end (MM:SS or HH:MM:SS)
72
+ - **Summary**: 1-2 sentences on what this segment covers
73
+ - **Keywords**: 3-5 key concepts
74
+
75
+ Show numbered chapter list with all segments covered, no gaps.
76
+
77
+ ---
78
+
79
+ ### Phase 4: User Selection
80
+
81
+ Ask user which chapters to clip (multi-select by number).
82
+
83
+ Also ask:
84
+ - Generate bilingual subtitles? (original + translated)
85
+ - Burn subtitles into video? (hardcoded)
86
+ - Generate summary copy for social media?
87
+
88
+ ---
89
+
90
+ ### Phase 5: Process Selected Clips
91
+
92
+ For each selected chapter:
93
+
94
+ #### 5.1 — Cut clip
95
+ ```bash
96
+ ffmpeg -i input.mp4 -ss <start> -to <end> -c copy clip.mp4
97
+ ```
98
+
99
+ #### 5.2 — Extract subtitle segment
100
+ Filter subtitle entries within the time range, reset timestamps to start from 00:00:00.
101
+
102
+ #### 5.3 — Translate subtitles (if requested)
103
+ Batch translate in groups of 20 entries to minimize API calls. Target language: user's preferred language. Keep technical terms accurate; use natural spoken language suitable for short video.
104
+
105
+ #### 5.4 — Generate bilingual SRT (if requested)
106
+ Merge original + translated lines into dual-language SRT (original on top, translation below).
107
+
108
+ #### 5.5 — Burn subtitles (if requested)
109
+ ```bash
110
+ ffmpeg -i clip.mp4 -vf "subtitles=subs.srt:force_style='FontSize=24,MarginV=30,Bold=1'" \
111
+ -c:v libx264 -crf 18 -c:a copy output_with_subs.mp4
112
+ ```
113
+
114
+ > **Windows path fix**: copy files to `tempfile.mkdtemp()` before running FFmpeg to avoid subtitle filter failures on paths with spaces.
115
+
116
+ #### 5.6 — Generate summary copy (if requested)
117
+ Based on chapter title, summary, and keywords — generate social media copy (title, key points, platform-appropriate format).
118
+
119
+ ---
120
+
121
+ ### Phase 6: Output Results
122
+
123
+ Organize output under `./youtube-clips/<datetime>/`:
124
+ ```
125
+ <chapter-title>/
126
+ ├── clip.mp4 # raw cut
127
+ ├── clip_with_subtitles.mp4 # burned subtitle version
128
+ ├── bilingual.srt # bilingual subtitle file
129
+ └── summary.md # social media copy
130
+ ```
131
+
132
+ Show file list with sizes and quick-open commands. Ask if user wants to clip more chapters.
133
+
134
+ ---
135
+
136
+ ## 9:16 Vertical (Shorts / Reels / TikTok)
137
+
138
+ When user requests vertical format — use blurred background fill, never crop:
139
+
140
+ ```
141
+ [0:v]split[bg][fg];
142
+ [bg]scale=1080:1920:force_original_aspect_ratio=increase,crop=1080:1920,gblur=sigma=40[blurred];
143
+ [fg]scale=1080:1920:force_original_aspect_ratio=decrease,pad=1080:1920:(ow-iw)/2:(oh-ih)/2:color=black@0[front];
144
+ [blurred][front]overlay=0:0,subtitles=subs.srt:force_style='FontSize=28,MarginV=120,Bold=1'
145
+ ```
146
+
147
+ **Rules**:
148
+ - Never crop original content — presenter/slides must be fully visible
149
+ - Place subtitles in the lower blurred area (MarginV=120)
150
+ - Black letterbox padding is not acceptable — blurred background only
151
+
152
+ ---
153
+
154
+ ## RTL Subtitles (Hebrew / Arabic)
155
+
156
+ Basic burn with SRT works for simple subtitles. For per-word karaoke highlight with RTL:
157
+
158
+ - Each word needs its own ASS `Dialogue` line with `\pos(x,y)` — no inline tags within a text run
159
+ - Use PIL to measure word widths with `~0.74` scale factor (PIL→libass calibration)
160
+ - Use `Alignment=7` and `Encoding=177` (Hebrew) in ASS style
161
+ - Render punctuation as separate positioned elements to the left of the last word
162
+ - Use two named ASS styles (e.g., White + Yellow) instead of inline `\c` color tags
163
+
164
+ **Critical**: Inline ASS tags (`\c`, `\K`, etc.) between RTL words break Unicode bidi in libass — causing words to render left-to-right. Always use separate Dialogue lines per word.
165
+
166
+ ---
167
+
168
+ ## Shorts Mode (~40s clips)
169
+
170
+ When user wants highlights rather than full chapters, identify:
171
+
172
+ 1. **Strong hook** — opening line that grabs attention immediately
173
+ 2. **Pain point** — relatable problem statement
174
+ 3. **WOW moment** — impressive demo or revelation
175
+ 4. **Core value prop** — clear, concise statement of the main idea
176
+ 5. **Counter-intuitive insight** — breaks common assumptions
177
+
178
+ For each candidate clip provide: timestamps, content summary, why it works as a short, suggested title.
179
+
180
+ ---
181
+
182
+ ## Key Technical Notes
183
+
184
+ - **Batch translation** (20 entries/call) saves ~95% API calls vs per-entry
185
+ - **Chapter granularity**: semantic topic transitions, not mechanical time splits
186
+ - **File naming**: strip special chars (`/ \ : * ? " < > |`), replace spaces with `_`, max 100 chars
187
+ - **Windows encoding**: set `PYTHONIOENCODING=utf-8` when running Python scripts that print Unicode