agentleFS
real-link-techreal-link-tech/reallink-skills/skills/video-summary/SKILL.md

video-summary

Skill4 starsChanged 3 months agoMITView on GitHub

Extract subtitles from YouTube and Bilibili videos and generate comprehensive summaries with key points. This skill processes existing subtitles only (no audio transcription) and uses a segmented approach for long videos followed by a macro review. Trigger this skill when users: - Ask to "总结视频" (summarize video) - Ask to "分析视频" (analyze video) - Say "视频讲了什么" (what does this video say) - Share YouTube or Bilibili links - Ask for "视频总结" (video summary) - Request "summarize this video" or "video…

4 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 11 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ask to "总结视频" (summarize video)

    line 16
  2. Distinctive:

    Ask to "分析视频" (analyze video)

    line 17
  3. Distinctive:

    Ask for "视频总结" (video summary)

    line 20
  4. Distinctive:

    Check if subtitles exist (if empty, inform user no subtitles available)

    line 65
  5. Distinctive:

    Use the summarization script if needed:

    line 81
  6. Distinctive:

    Follow the instructions to get your SESSDATA

    line 141
  7. Distinctive:

    When you run the script for the first time with a Bilibili URL, it will prompt you for SESSDATA:

    line 152
  8. Very specific:

    Delete config/auth.json at any time to clear credentials

    line 165
  9. Distinctive:

    If the video has no subtitles or closed captions:

    line 170
  10. Distinctive:

    If Bilibili authentication is needed:

    line 181
  11. Distinctive:

    Always verify subtitle availability: before attempting summarization

    line 225
  12. Distinctive:

    Generate macro review last: after all segments are processed

    line 227

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Video Summary Skill

Overview

Extract subtitles from YouTube and Bilibili videos and generate comprehensive summaries with key points. This skill processes existing subtitles only (no audio transcription) and uses a segmented approach for long videos followed by a macro review.

When to Use

Trigger this skill when users:

  • Ask to "总结视频" (summarize video)
  • Ask to "分析视频" (analyze video)
  • Say "视频讲了什么" (what does this video say)
  • Share YouTube or Bilibili links
  • Ask for "视频总结" (video summary)
  • Request "summarize this video" or "video summary"

Quick Reference

Supported Platforms

  • YouTube: youtube.com, youtu.be
  • Bilibili: bilibili.com, b23.tv

Workflow

  1. Detect video platform from URL
  2. Extract video metadata and subtitles using Python scripts
  3. Segment subtitles by time windows
  4. Summarize each segment
  5. Generate macro review from all segments
  6. Output structured summary

Execution Steps

Step 1: URL Detection

Identify the platform from the URL pattern:

  • YouTube: youtube.com/watch?v=, youtu.be/
  • Bilibili: bilibili.com/video/BV, b23.tv/

Step 2: Extract Video Information

Execute the extraction script:

python scripts/extract_video_info.py "<video_url>"

The script returns JSON with:

  • platform: Video platform (youtube/bilibili)
  • title: Video title
  • author: Channel/UP主 name
  • duration: Duration in seconds
  • duration_formatted: Human-readable duration
  • subtitles: Array of subtitle segments with text and timestamps
  • segments: Pre-segmented subtitle chunks for processing

Step 3: Process Video Data

Parse the JSON output:

  • Check if subtitles exist (if empty, inform user no subtitles available)
  • Calculate number of segments based on duration
  • Prepare segments for individual summarization

Segmentation rules:

  • <10 minutes: 1 segment
  • 10-30 minutes: 2-3 segments
  • 30 minutes: 1 segment per 10 minutes, max 8-10 segments

Step 4: Summarize Segments

For each segment, generate a summary covering:

  • Main topics discussed
  • Key points and arguments
  • Important quotes or data

Use the summarization script if needed:

python scripts/summarize_text.py --segments '<json_segments>'

Or perform summarization directly using LLM capabilities.

Step 5: Generate Macro Review

Combine all segment summaries into a comprehensive macro review:

  • Overall theme and purpose
  • Key narrative arc
  • Core arguments and conclusions
  • Target audience and value proposition

Reference references/summarization-guide.md for macro review strategies.

Step 6: Output Structured Summary

Present results in this format:

## 📺 视频总结

**标题:** [Video Title]
**作者:** [Author/Channel]
**时长:** [Duration]
**平台:** [YouTube/Bilibili]

### 📝 整体概述
[Macro review - 200-300 words comprehensive overview]

### ⏱️ 分段要点

**00:00 - 05:00** [Section Theme]
- Key point 1
- Key point 2
- ...

**05:00 - 10:00** [Section Theme]
- ...

### 💡 核心观点
1. [Core insight 1]
2. [Core insight 2]
3. [Core insight 3]

### 🏷️ 关键词
[Keyword 1], [Keyword 2], [Keyword 3]

Bilibili Authentication

Bilibili videos require authentication to access subtitles. You need to provide your Bilibili SESSDATA.

Get SESSDATA

Method 1: Follow the documentation

  1. Visit: https://nemo2011.github.io/bilibili-api/#/get-credential
  2. Follow the instructions to get your SESSDATA
  3. Copy the SESSDATA and provide it when prompted

Method 2: Browser DevTools

  1. Login to bilibili.com in your browser
  2. Press F12 to open Developer Tools
  3. Go to: Application → Cookies → https://www.bilibili.com
  4. Find the "SESSDATA" field and copy its value

First-time Setup

When you run the script for the first time with a Bilibili URL, it will prompt you for SESSDATA:

python scripts/extract_video_info.py "https://bilibili.com/video/BVxxx"
# Script will ask: "请粘贴 SESSDATA: "

Just paste your SESSDATA and it will be saved to config/auth.json for future use.

Security Note

  • SESSDATA is your login credential, never share it with others
  • Credentials are stored locally in config/auth.json (excluded from git via .gitignore)
  • Delete config/auth.json at any time to clear credentials

Error Handling

No Subtitles Available

If the video has no subtitles or closed captions:

⚠️ 该视频没有可用的字幕。此技能仅处理带有字幕或CC字幕的视频。

建议:
1. 检查视频是否开启CC字幕
2. 寻找带字幕的版本
3. 使用其他支持音频转录的工具

Bilibili Authentication Required

If Bilibili authentication is needed:

⚠️  需要 Bilibili 登录认证

该视频的字幕需要登录后才能访问。

获取 SESSDATA 的方法:
1. 访问: https://nemo2011.github.io/bilibili-api/#/get-credential
2. 或浏览器 F12 → Application → Cookies → bilibili.com → 复制 SESSDATA
3. 重新运行脚本并粘贴 SESSDATA

Invalid URL

❌ 无法识别该链接。请提供有效的 YouTube 或 Bilibili 视频链接。

支持的格式:
- YouTube: https://youtube.com/watch?v=XXX 或 https://youtu.be/XXX
- Bilibili: https://bilibili.com/video/BVXXX 或 https://b23.tv/XXX

Video Unavailable

❌ 无法访问该视频。可能的原因:
- 视频已删除或设为私有
- 地区限制
- 网络连接问题

Additional Resources

Reference Files

  • references/platform-apis.md - Detailed API documentation for YouTube (yt-dlp) and Bilibili subtitle extraction
  • references/summarization-guide.md - Long text summarization strategies, segmentation approaches, and macro review methodologies

Scripts

  • scripts/extract_video_info.py - Main video information extraction script supporting both platforms
  • scripts/summarize_text.py - Text summarization utility for processing segments
  • scripts/requirements.txt - Python dependencies (yt-dlp, bilibili-api-python)

Best Practices

  1. Always verify subtitle availability before attempting summarization
  2. Use time-based segmentation to maintain context and narrative flow
  3. Generate macro review last after all segments are processed
  4. Preserve timestamps in output for user reference
  5. Handle errors gracefully with clear, actionable messages

Limitations

  • Requires existing subtitles/CC (no audio transcription)
  • YouTube: Requires video to have manual captions or auto-generated CC
  • Bilibili:
    • Some videos require Bilibili login (sessdata) to access subtitles
    • Official videos and premium content often have this restriction
    • Skill will detect this and provide clear error message
  • Very long videos (>2 hours) may hit token limits; consider summarizing in chunks

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.