subtitle-refine
中文 SRT 字幕上线发布专业级精修与校验。用于把基于 ASR 的原始字幕清洗为可上线版本,只做字幕级清洗和纠错,不做书面化改写、总结或扩写;同时保持与原音频严格同步,必要时仅在原字幕时间范围内拆分条目,并输出一份完整的 clean…
Generate a professional, detailed, figure-rich LaTeX course note and final PDF from a Bilibili lecture, tutorial, or technical talk. Use when the user provides a Bilibili URL (BV number) and wants structured Chinese teaching notes that combine the video's title, chapters,
$ npx -y skills add wdkns/wdkns-skills --skill bilibili-render-pdf --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/bilibili-render-pdfContext preview
The summary Claude sees to decide when to auto-load this skill.
Generate a professional, detailed, figure-rich LaTeX course note and final PDF from a Bilibili lecture, tutorial, or technical talk. Use when the user provides a Bilibili URL (BV number) and wants structured Chinese teaching notes that combine the video's title, chapters,
name: bilibili-render-pdf description: Generate a professional, detailed, figure-rich LaTeX course note and final PDF from a Bilibili lecture, tutorial, or technical talk. Use when the user provides a Bilibili URL (BV number) and wants structured Chinese teaching notes that combine the video's title, chapters, diagrams, formulas, code, subtitle explanations, the original video cover on the front page, and a final synthesis chapter, with key frames extracted from the highest usable video resolution and inserted as figures, and where the final deliverable must include a rendered PDF. Falls back to Whisper speech-to-text when no CC subtitles are available.
Use this skill to turn a Bilibili video into a complete, compileable `.tex` note and a rendered PDF.
This skill extends the `youtube-render-pdf` workflow with Bilibili-specific adaptations for subtitle scarcity, login-gated high resolution, multi-part (分P) videos, and platform-specific non-teaching content.
| Aspect | Handling | |--------|----------| | **Subtitle scarcity** | Try CC subtitles first → fall back to Whisper speech-to-text → visual-only mode | | **Login-gated HD** | 1080P+ requires cookies; prompt the user to use `yt-dlp --cookies-from-browser chrome` | | **Multi-part videos** | Detect 分P videos and ask the user which parts to process | | **URL formats** | Support `bilibili.com/video/BVxxxxxxx` and `b23.tv` short links | | **Danmaku** | Do not use danmaku as a teaching content source (too noisy); use only CC subtitles or Whisper output |
Produce a professional Chinese lecture note from a Bilibili URL.
The output must:
The notes must read like a strong human teacher is guiding the reader through the material.
1. Inspect the video metadata first. Prefer title, chapters, duration, thumbnail availability, and subtitle availability before writing.
2. Detect multi-part (分P) videos. List all parts and ask the user which parts to process before downloading.
**Priority 1: CC subtitles (platform-embedded)**
Use manual subtitles over auto-generated subtitles when both are available. Prefer `zh-Hans`, `zh-CN`, `zh`, or `ai-zh` subtitle tracks. Preserve the subtitle timestamps; do not flatten subtitles into plain text too early if figures still need to be located.
yt-dlp --write-subs --sub-langs "zh-Hans,zh-CN,zh,ai-zh" --convert-subs srt \ --skip-download -o "%(title)s.%(ext)s" "<URL>"
**Priority 2: Whisper speech-to-text (when no CC subtitles are available)**
Extract audio first, then transcribe with Whisper to produce a timestamped SRT file.
yt-dlp -x --audio-format wav -o "audio.%(ext)s" "<URL>" whisper audio.wav --model medium --language zh --output_format srt --output_dir .
**Priority 3: Visual-only mode (when audio quality is too poor)**
Skip subtitles entirely and rely on dense frame sampling to extract teaching content from the video frames alone.
1. Acquire the video's original cover image before writing the `.tex`. Prefer the highest-resolution thumbnail exposed by the platform metadata. Save the selected cover locally and reference that local asset from the front page.
2. Prefer the best usable video source for figure extraction. Probe formats and choose the highest resolution that is actually downloadable in the current environment. Note that 1080P+ on Bilibili typically requires login cookies.
3. Keep all source artifacts local when practical. Typical working artifacts are metadata, the downloaded cover image, a timestamped subtitle file (CC or Whisper-generated), optional cleaned transcript text, a local video file, and extracted frames.
For longer videos, do not rely on a single monolithic pass.
中文 SRT 字幕上线发布专业级精修与校验。用于把基于 ASR 的原始字幕清洗为可上线版本,只做字幕级清洗和纠错,不做书面化改写、总结或扩写;同时保持与原音频严格同步,必要时仅在原字幕时间范围内拆分条目,并输出一份完整的 clean…
Create or refine clean, shape-aware visualizations for tensor, matrix, and vector formulas or tensor code. Use for matrix-block diagrams, entry heatmaps,…
Generate a professional, detailed, figure-rich LaTeX course note and final PDF from a YouTube lecture, tutorial, or technical talk. Use when the user provides…