[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BNNDJXXAP2YQT7YFZ3F82P":3,"skill-same:01M7BNNDJXXAP2YQT7YFZ3F82P":45},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7BNNDJXXAP2YQT7YFZ3F82P","skilltta-task-guidance",null,"Temporary guidance for the Video Silence Remover task — focuses on correct audio-based silence detection, timestamp alignment with smoothing windows, and producing a valid compression_report.json plus compressed_video.mp4.","linyouxue\u002Fskill-repair-benchmark","linyouxue","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F216151464?v=4","01M7BJEVCXKD74KH6FG9CBVSQB","林宥学","01M7BJEVE02NP217V93BKZFC0J",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fcontrolled-skill-repair-experiments\u002Fresult\u002Fskilltta-claude4.7\u002Ftasks\u002Fsingle-video-silence-remover-RI-001\u002Frepaired_skill\u002Fskilltta-task-guidance\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: skilltta-task-guidance\ndescription: Temporary guidance for the Video Silence Remover task — focuses on correct audio-based silence detection, timestamp alignment with smoothing windows, and producing a valid compression_report.json plus compressed_video.mp4.\n---\n\n# Task Guidance: Video Silence Remover\n\n## Goal\nProduce two deliverables in the workspace:\n1. `compressed_video.mp4` — input video with opening + long silences (>2s) removed.\n2. `compression_report.json` — metadata following the exact schema in the prompt.\n\n## Known Problem Area (from location hint)\nThe failing region is around the smoothing-window ↔ timestamp mapping in:\n- `silence-detector\u002FSKILL.md`\n- `silence-detector\u002Fscripts\u002Fdetect_silence.py`\n- `video-processor\u002FSKILL.md` (how it calls the detector)\n\nTypical bugs to look for and fix:\n- A rolling\u002Fmoving-average smoothing of RMS energy is applied, but the resulting silence start\u002Fend indices are **not shifted back** to compensate for the window offset. If window size = `W` samples (or frames), the smoothed value at index `i` represents samples `[i-W\u002F2, i+W\u002F2]`. Index-to-time must use `t = (i - W\u002F2) * hop \u002F sr`, otherwise every reported segment is late\u002Fearly by `W\u002F(2*sr)` seconds.\n- Using `np.convolve(..., mode='same')` vs `'valid'` changes the index base; make sure the time axis you build matches the mode you chose.\n- Hop length \u002F frame length confusion: time per index must be `hop_length \u002F sample_rate`, not `frame_length \u002F sample_rate`.\n- The video-processor skill may pass raw frame indices to ffmpeg instead of seconds, or may double-apply the window compensation.\n\nFix the detector so that returned `(start, end)` are in **seconds, aligned to the original audio timeline**, independent of smoothing window size. Add a unit sanity check: a known-silent clip at `t=5.0s` should be reported starting at ~5.0s regardless of `W`.\n\n## Recommended Pipeline\n1. **Probe duration** with `ffprobe` to get `original_duration_seconds`.\n2. **Extract audio** to mono 16kHz WAV via `ffmpeg -i input.mp4 -ac 1 -ar 16000 -vn audio.wav`.\n3. **Compute RMS** with librosa (`frame_length=2048, hop_length=512`) or raw numpy.\n4. **Smooth** RMS (e.g., moving average window ~0.3s). Convert to dB.\n5. **Threshold** at e.g. `max_db - 30` (or absolute `-40 dB`). Mark frames below as silent.\n6. **Group** consecutive silent frames into intervals.\n7. **Convert indices → seconds correctly**: `t = idx * hop_length \u002F sr`. Do NOT add any window-size offset if you used `mode='same'`; verify with a synthetic test.\n8. **Opening removal**: treat the first non-silent region's start as the opening cutoff; if the first `>N` seconds are silent\u002Fstatic, remove `[0, first_speech_start]`.\n9. **Filter** silence segments: keep only those with `duration > 2.0` seconds.\n10. **Cut and concatenate** kept segments with ffmpeg. Prefer the `select`\u002F`aselect` filter with `setpts`\u002F`asetpts` for a single-pass cut:\n   ```\n   ffmpeg -i input.mp4 -vf \"select='\u003Cexpr>',setpts=N\u002FFRAME_RATE\u002FTB\" \\\n          -af \"aselect='\u003Cexpr>',asetpts=N\u002FSR\u002FTB\" compressed_video.mp4\n   ```\n   where `\u003Cexpr>` is a disjunction of `between(t,start,end)` for KEPT intervals.\n11. **Write report** with consistent math: `original ≈ compressed + removed` (allow \u003C0.5s tolerance).\n\n## compression_report.json schema (must match exactly)\n```json\n{\n  \"original_duration_seconds\": \u003Cfloat>,\n  \"compressed_duration_seconds\": \u003Cfloat>,\n  \"removed_duration_seconds\": \u003Cfloat>,\n  \"compression_percentage\": \u003Cfloat>,  \u002F\u002F (removed\u002Foriginal)*100\n  \"segments_removed\": [\n    {\"start\": \u003Cfloat>, \"end\": \u003Cfloat>, \"duration\": \u003Cfloat>}\n  ]\n}\n```\n\n## Patterns Borrowed from Prior Working Solutions\n- **Explicit schema construction** (as in the JSON-writing example): build the dict in Python, dump with `json.dump`, and save under `os.getcwd()` to guarantee the file lands in the workspace.\n- **Guard clauses first** (as in the DataFrame analyzer): before processing, verify `input_video.mp4` exists, audio stream exists, and ffmpeg\u002Fffprobe are callable. Fail fast with a clear message.\n- **Preprocessing-before-vectorization pattern** (as in the CountVectorizer example): clean\u002Fnormalize the raw signal (strip DC, drop near-zero frames) before thresholding, analogous to dropping empty sentences before vectorizing. This prevents degenerate silence detections.\n\n## Sanity Checks Before Returning\n- Sum of `segments_removed` durations ≈ `removed_duration_seconds` (±0.1s).\n- `compressed_duration_seconds` ≈ ffprobe duration of the output file (±0.5s).\n- No segment overlaps; all are in `[0, original_duration]`; all have `duration > 0`.\n- Compression percentage is reasonable (typically 5–40% for a 10-min teaching video).\n- Teaching content audible on spot-check at a few timestamps.\n\n## Minimal Smoothing\u002FTimestamp Reference Snippet\n```python\nimport numpy as np, librosa\ny, sr = librosa.load('audio.wav', sr=16000, mono=True)\nhop = 512\nrms = librosa.feature.rms(y=y, frame_length=2048, hop_length=hop)[0]\n# times for each RMS frame — THIS is the canonical mapping\ntimes = librosa.frames_to_time(np.arange(len(rms)), sr=sr, hop_length=hop)\n# smoothing: 'same' keeps len == len(rms), so times[] still aligns 1:1\nW = max(1, int(0.3 * sr \u002F hop))\nrms_s = np.convolve(rms, np.ones(W)\u002FW, mode='same')\ndb = 20*np.log10(rms_s + 1e-9)\nthr = db.max() - 30\nsilent = db \u003C thr\n# derive intervals from `silent` using `times` — never add extra W\u002F2 offset\n```\nUse `times[i]` directly; do not re-apply any window compensation afterwards.\n","# Task Guidance: Video Silence Remover\n\n## Goal\nProduce two deliverables in the workspace:\n1. `compressed_video.mp4` — input video with opening + long silences (>2s) removed.\n2. `compression_report.json` — metadata following the exact schema in the prompt.\n\n## Known Problem Area (from location hint)\nThe failing region is around the smoothing-window ↔ timestamp mapping in:\n- `silence-detector\u002FSKILL.md`\n- `silence-detector\u002Fscripts\u002Fdetect_silence.py`\n- `video-processor\u002FSKILL.md` (how it calls the detector)\n\nTypical bugs to look for and fix:\n- A rolling\u002Fmoving-average smoothing of RMS energy is applied, but the resulting silence start\u002Fend indices are **not shifted back** to compensate for the window offset. If window size = `W` samples (or frames), the smoothed value at index `i` represents samples `[i-W\u002F2, i+W\u002F2]`. Index-to-time must use `t = (i - W\u002F2) * hop \u002F sr`, otherwise every reported segment is late\u002Fearly by `W\u002F(2*sr)` seconds.\n- Using `np.convolve(..., mode='same')` vs `'valid'` changes the index base; make sure the time axis you build matches the mode you chose.\n- Hop length \u002F frame length confusion: time per index must be `hop_length \u002F sample_rate`, not `frame_length \u002F sample_rate`.\n- The video-processor skill may pass raw frame indices to ffmpeg instead of seconds, or may double-apply the window compensation.\n\nFix the detector so that returned `(start, end)` are in **seconds, aligned to the original audio timeline**, independent of smoothing window size. Add a unit sanity check: a known-silent clip at `t=5.0s` should be reported starting at ~5.0s regardless of `W`.\n\n## Recommended Pipeline\n1. **Probe duration** with `ffprobe` to get `original_duration_seconds`.\n2. **Extract audio** to mono 16kHz WAV via `ffmpeg -i input.mp4 -ac 1 -ar 16000 -vn audio.wav`.\n3. **Compute RMS** with librosa (`frame_length=2048, hop_length=512`) or raw numpy.\n4. **Smooth** RMS (e.g., moving average window ~0.3s). Convert to dB.\n5. **Threshold** at e.g. `max_db - 30` (or absolute `-40 dB`). Mark frames below as silent.\n6. **Group** consecutive silent frames into intervals.\n7. **Convert indices → seconds correctly**: `t = idx * hop_length \u002F sr`. Do NOT add any window-size offset if you used `mode='same'`; verify with a synthetic test.\n8. **Opening removal**: treat the first non-silent region's start as the opening cutoff; if the first `>N` seconds are silent\u002Fstatic, remove `[0, first_speech_start]`.\n9. **Filter** silence segments: keep only those with `duration > 2.0` seconds.\n10. **Cut and concatenate** kept segments with ffmpeg. Prefer the `select`\u002F`aselect` filter with `setpts`\u002F`asetpts` for a single-pass cut:\n   ```\n   ffmpeg -i input.mp4 -vf \"select='\u003Cexpr>',setpts=N\u002FFRAME_RATE\u002FTB\" \\\n          -af \"aselect='\u003Cexpr>',asetpts=N\u002FSR\u002FTB\" compressed_video.mp4\n   ```\n   where `\u003Cexpr>` is a disjunction of `between(t,start,end)` for KEPT intervals.\n11. **Write report** with consistent math: `original ≈ compressed + removed` (allow \u003C0.5s tolerance).\n\n## compression_report.json schema (must match exactly)\n```json\n{\n  \"original_duration_seconds\": \u003Cfloat>,\n  \"compressed_duration_seconds\": \u003Cfloat>,\n  \"removed_duration_seconds\": \u003Cfloat>,\n  \"compression_percentage\": \u003Cfloat>,  \u002F\u002F (removed\u002Foriginal)*100\n  \"segments_removed\": [\n    {\"start\": \u003Cfloat>, \"end\": \u003Cfloat>, \"duration\": \u003Cfloat>}\n  ]\n}\n```\n\n## Patterns Borrowed from Prior Working Solutions\n- **Explicit schema construction** (as in the JSON-writing example): build the dict in Python, dump with `json.dump`, and save under `os.getcwd()` to guarantee the file lands in the workspace.\n- **Guard clauses first** (as in the DataFrame analyzer): before processing, verify `input_video.mp4` exists, audio stream exists, and ffmpeg\u002Fffprobe are callable. Fail fast with a clear message.\n- **Preprocessing-before-vectorization pattern** (as in the CountVectorizer example): clean\u002Fnormalize the raw signal (strip DC, drop near-zero frames) before thresholding, analogous to dropping empty sentences before vectorizing. This prevents degenerate silence detections.\n\n## Sanity Checks Before Returning\n- Sum of `segments_removed` durations ≈ `removed_duration_seconds` (±0.1s).\n- `compressed_duration_seconds` ≈ ffprobe duration of the output file (±0.5s).\n- No segment overlaps; all are in `[0, original_duration]`; all have `duration > 0`.\n- Compression percentage is reasonable (typically 5–40% for a 10-min teaching video).\n- Teaching content audible on spot-check at a few timestamps.\n\n## Minimal Smoothing\u002FTimestamp Reference Snippet\n```python\nimport numpy as np, librosa\ny, sr = librosa.load('audio.wav', sr=16000, mono=True)\nhop = 512\nrms = librosa.feature.rms(y=y, frame_length=2048, hop_length=hop)[0]\n# times for each RMS frame — THIS is the canonical mapping\ntimes = librosa.frames_to_time(np.arange(len(rms)), sr=sr, hop_length=hop)\n# smoothing: 'same' keeps len == len(rms), so times[] still aligns 1:1\nW = max(1, int(0.3 * sr \u002F hop))\nrms_s = np.convolve(rms, np.ones(W)\u002FW, mode='same')\ndb = 20*np.log10(rms_s + 1e-9)\nthr = db.max() - 30\nsilent = db \u003C thr\n# derive intervals from `silent` using `times` — never add extra W\u002F2 offset\n```\nUse `times[i]` directly; do not re-apply any window compensation afterwards.\n",{"name":5,"description":7},"main","cdcb6d230f3b15c3c33f8a2bdd16439f43602cbe","controlled-skill-repair-experiments\u002Fresult\u002Fskilltta-claude4.7\u002Ftasks\u002Fsingle-video-silence-remover-RI-001\u002Frepaired_skill\u002Fskilltta-task-guidance",1,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark","https:\u002F\u002Fgithub.com\u002Flinyouxue","2026-11-14 20:28:35",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add linyouxue\u002Fskill-repair-benchmark --skill skilltta-task-guidance",{"tool":37,"command":38},"bunx","bunx skills add linyouxue\u002Fskill-repair-benchmark --skill skilltta-task-guidance",{"tool":40,"command":41},"pnpm","pnpm dlx skills add linyouxue\u002Fskill-repair-benchmark --skill skilltta-task-guidance","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fcontrolled-skill-repair-experiments\u002Fresult\u002Fskilltta-claude4.7\u002Ftasks\u002Fsingle-video-silence-remover-RI-001\u002Frepaired_skill\u002Fskilltta-task-guidance\u002FSKILL.md",true,[],[46,53,60,67,72,77],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":19},"01M7E1HGVRY73NBJ022CJG13X6","video-frame-extraction","Extract frames from video files and save them as images using OpenCV","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7E1HAG5R7CJ9C8NYJS771MB","openai-vision","Analyze images and multi-frame sequences using OpenAI GPT vision models","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7E1H7DADKB6QBWKC2KQ63SZ","image-ocr","Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[],{"skillNo":68,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7E1H0WBNT43TENGQY7AVZHD","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":73,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7E1GTC7D4N4Q2EF03875J9E","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":78,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7E1GQ92CWFMGH53KSSE4WER","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[]]