Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计未展示

openakita%2fskills%40youtube-summarizeropenakita%2fskills%40youtube 摘要

Agent Skill

openakita%2fskills%40youtube-summarizer 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

376

周安装

16

GitHub Stars

1,672

下载量

132
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:openakita%2fskills%40youtube-summarizer(openakita%2fskills%40youtube 摘要)
来源仓库:https://github.com/openakita/openakita
仓库路径:skills/openakita%2Fskills%40youtube-summarizer
安装命令:
npx skills add https://github.com/openakita/openakita --skill openakita/skills@youtube-summarizer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/openakita/openakita --skill openakita/skills@youtube-summarizer

简介

用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词快速定位候选结果。
  • 通过 npx skills add 命令从 GitHub 安装使用。
  • 安装前需确认权限范围和维护状态,注意是否触发联网或文件读写。
  • openakita%2fskills%40youtube-summarizer 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

YouTube Video Summarizer

Extract transcripts from YouTube videos and generate structured, actionable summaries using the STAR + R-I-S-E framework.

When to Use This Skill

  • User shares a YouTube link and asks "summarize this" or "what's this video about"
  • User wants key takeaways or study notes from a lecture/talk
  • User needs timestamped highlights from a long video
  • User wants a structured breakdown of a tutorial or presentation
  • User asks to compare content across multiple YouTube videos
  • User wants to extract quotes or specific segments from a video

Prerequisites

Install Required Package

pip install youtube-transcript-api

If pip is not available, try:

pip3 install youtube-transcript-api

Verify installation:

from youtube_transcript_api import YouTubeTranscriptApi
print("youtube-transcript-api is ready")

Supported Python Versions

  • Python 3.8+
  • No additional system dependencies required

Instructions

Step 1: Extract the Video ID

YouTube URLs come in many formats. Parse all of them to extract the 11-character video ID:

URL FormatExampleExtraction
Standardhttps://www.youtube.com/watch?v=dQw4w9WgXcQQuery param v
Shorthttps://youtu.be/dQw4w9WgXcQPath segment
Embedhttps://www.youtube.com/embed/dQw4w9WgXcQPath after /embed/
Livehttps://www.youtube.com/live/dQw4w9WgXcQPath after /live/
Shortshttps://www.youtube.com/shorts/dQw4w9WgXcQPath after /shorts/
With timestamphttps://youtu.be/dQw4w9WgXcQ?t=120Ignore query params
With playlisthttps://www.youtube.com/watch?v=dQw4w9WgXcQ&list=PLxxUse only v param
Mobilehttps://m.youtube.com/watch?v=dQw4w9WgXcQSame as standard
Bare IDdQw4w9WgXcQUse directly
import re
from urllib.parse import urlparse, parse_qs

def extract_video_id(url_or_id: str) -> str:
    """Extract YouTube video ID from various URL formats."""
    url_or_id = url_or_id.strip()

    # Bare video ID (11 chars, alphanumeric + dash + underscore)
    if re.match(r'^[A-Za-z0-9_-]{11}$', url_or_id):
        return url_or_id

    parsed = urlparse(url_or_id)

    # youtu.be short links
    if parsed.hostname in ('youtu.be',):
        return parsed.path.lstrip('/')

    # Standard, mobile, embed, live, shorts
    if parsed.hostname in ('www.youtube.com', 'youtube.com', 'm.youtube.com'):
        if parsed.path == '/watch':
            qs = parse_qs(parsed.query)
            return qs.get('v', [None])[0]
        for prefix in ('/embed/', '/live/', '/shorts/', '/v/'):
            if parsed.path.startswith(prefix):
                return parsed.path[len(prefix):].split('/')[0]

    raise ValueError(f"Cannot extract video ID from: {url_or_id}")

Step 2: Fetch the Transcript

from youtube_transcript_api import YouTubeTranscriptApi

def fetch_transcript(video_id: str, preferred_langs=None):
    """
    Fetch transcript with language fallback.

    Args:
        video_id: The 11-character YouTube video ID
        preferred_langs: Ordered list of language codes, e.g. ['zh-Hans', 'zh', 'en']
                        Defaults to ['en'] if not specified

    Returns:
        List of transcript segments with 'text', 'start', 'duration' keys
    """
    if preferred_langs is None:
        preferred_langs = ['en']

    try:
        transcript_list = YouTubeTranscriptApi.list_transcripts(video_id)

        # Try manually created transcripts first (more accurate)
        for lang in preferred_langs:
            try:
                transcript = transcript_list.find_manually_created_transcript([lang])
                return transcript.fetch()
            except Exception:
                continue

        # Fall back to auto-generated transcripts
        for lang in preferred_langs:
            try:
                transcript = transcript_list.find_generated_transcript([lang])
                return transcript.fetch()
            except Exception:
                continue

        # Last resort: get any available transcript and translate
        for transcript in transcript_list:
            try:
                if 'en' in preferred_langs:
                    return transcript.translate('en').fetch()
                return transcript.fetch()
            except Exception:
                continue

        raise RuntimeError("No transcript available in any language")

    except Exception as e:
        raise RuntimeError(f"Failed to fetch transcript for {video_id}: {e}")

Step 3: Generate the Summary

Use the STAR + R-I-S-E combined framework for maximum clarity:

STAR Framework (for factual/process content)

  • Situation — What context does the video establish?
  • Task — What problem or question is being addressed?
  • Action — What steps, methods, or arguments are presented?
  • Result — What conclusions, outcomes, or calls to action are given?

R-I-S-E Framework (for opinion/analysis content)

  • Reference — What sources, data, or authorities are cited?
  • Insight — What unique perspectives or non-obvious points are made?
  • Summary — What are the essential takeaways?
  • Evaluation — What are the strengths and weaknesses of the arguments?

Prompt Template for Summary Generation

When generating the summary from the transcript, use this structure:

You are summarizing a YouTube video transcript. Follow these rules strictly:

1. TITLE & METADATA
   - Video title (if known)
   - Estimated duration from timestamps
   - Primary topic/category

2. EXECUTIVE SUMMARY (2-3 sentences)
   - The single most important takeaway
   - Who should watch this and why

3. KEY POINTS (bulleted, with timestamps)
   - [MM:SS] Point description
   - Maximum 10 key points
   - Each point should be self-contained and actionable

4. DETAILED NOTES (organized by topic/section)
   - Group related content under headers
   - Include specific examples, numbers, quotes
   - Preserve technical accuracy

5. STAR ANALYSIS
   - Situation: ...
   - Task: ...
   - Action: ...
   - Result: ...

6. ACTIONABLE TAKEAWAYS
   - What the viewer should do after watching
   - Resources mentioned in the video

Workflows

Workflow 1: Quick Summary

User says: "Summarize this video: https://youtube.com/watch?v=..."

  1. Extract video ID from URL
  2. Fetch English transcript (fall back to auto-generated)
  3. Generate executive summary + key points with timestamps
  4. Present in clean markdown format

Workflow 2: Deep Dive Notes

User says: "I need detailed study notes from this lecture"

  1. Extract video ID
  2. Fetch transcript in preferred language
  3. Generate full STAR + R-I-S-E analysis
  4. Include all timestamps, quotes, and specific data points
  5. Add a "Review Questions" section at the end

Workflow 3: Multi-Language Summary

User says: "Summarize this Chinese/Japanese/Korean video in English"

  1. Extract video ID
  2. List available transcript languages
  3. Fetch best available transcript
  4. Translate content if needed (use transcript API's built-in translation)
  5. Generate summary in the user's preferred language

Workflow 4: Batch Processing

User provides multiple URLs:

  1. Extract all video IDs
  2. Fetch transcripts sequentially (respect rate limits)
  3. Generate individual summaries
  4. Create a comparison table if videos are related
  5. Highlight common themes and unique points

Workflow 5: Timestamp Navigation

User says: "Find where they talk about X in this video"

  1. Fetch full transcript
  2. Search for relevant keywords/concepts
  3. Return matching segments with precise timestamps
  4. Format as clickable timestamp links: [MM:SS](https://youtu.be/ID?t=SECONDS)

Output Format

Standard Summary Output

# 📺 Video Summary: [Title]

**Duration**: ~XX minutes | **Language**: English | **Category**: Technology

## Executive Summary
[2-3 sentence overview]

## Key Points
- **[0:00]** Introduction and context setting
- **[2:15]** First major point with supporting evidence
- **[8:30]** Key technical concept explained
- **[15:00]** Practical demonstration
- **[22:45]** Conclusion and call to action

## Detailed Notes

### Section 1: [Topic] (0:00 - 5:30)
[Detailed notes with specific information]

### Section 2: [Topic] (5:30 - 12:00)
[Detailed notes with specific information]

## STAR Analysis
- **Situation**: [Context]
- **Task**: [Problem/Question]
- **Action**: [Methods/Steps]
- **Result**: [Outcomes/Conclusions]

## Actionable Takeaways
1. [First action item]
2. [Second action item]
3. [Third action item]

## Resources Mentioned
- [Resource 1](url)
- [Resource 2](url)

Common Pitfalls

1. Transcript Unavailable

Problem: Some videos have no transcript (auto-generated or manual).

Solutions:

  • Check if the video is a music video, live stream, or very short clip — these often lack transcripts
  • Try different language codes: ['en', 'en-US', 'en-GB']
  • If auto-generated is disabled by the uploader, there's no workaround via this API

Error handling:

try:
    transcript = fetch_transcript(video_id)
except RuntimeError as e:
    if "disabled" in str(e).lower():
        print("Subtitles are disabled for this video by the uploader.")
    elif "no transcript" in str(e).lower():
        print("No transcript available. Try a different video.")
    else:
        print(f"Unexpected error: {e}")

2. Age-Restricted or Private Videos

Problem: Age-restricted videos require authentication; private videos are inaccessible.

Solution: Inform the user that these videos cannot be processed without authentication cookies. The youtube-transcript-api does not support cookie-based auth natively.

3. Rate Limiting

Problem: Fetching many transcripts in quick succession may trigger rate limits.

Solutions:

  • Add a 1-2 second delay between requests when batch processing
  • Cache transcripts locally to avoid re-fetching
  • Handle HTTP 429 errors with exponential backoff
import time

def fetch_with_retry(video_id, max_retries=3):
    for attempt in range(max_retries):
        try:
            return fetch_transcript(video_id)
        except Exception as e:
            if '429' in str(e) and attempt < max_retries - 1:
                wait = 2 ** (attempt + 1)
                time.sleep(wait)
                continue
            raise

4. Transcript Quality Issues

Problem: Auto-generated transcripts may contain errors, especially for technical terms, proper nouns, or non-English content.

Solutions:

  • Prefer manually created transcripts when available
  • Flag to the user that auto-generated transcripts may have inaccuracies
  • Use context clues to correct obvious errors in the summary

5. Very Long Videos

Problem: Videos over 2 hours may produce extremely long transcripts that exceed context limits.

Solutions:

  • Chunk the transcript into segments (e.g., 15-minute blocks)
  • Summarize each chunk independently, then create an overall summary
  • Let the user specify a time range to focus on
def chunk_transcript(transcript, chunk_minutes=15):
    """Split transcript into time-based chunks."""
    chunks = []
    current_chunk = []
    chunk_end = chunk_minutes * 60

    for segment in transcript:
        if segment['start'] >= chunk_end and current_chunk:
            chunks.append(current_chunk)
            current_chunk = []
            chunk_end += chunk_minutes * 60
        current_chunk.append(segment)

    if current_chunk:
        chunks.append(current_chunk)

    return chunks

6. Invalid or Expired URLs

Problem: Shortened URLs, expired links, or non-YouTube URLs.

Solution: Validate the extracted video ID format (11 characters, [A-Za-z0-9_-]) before making API calls. Return a clear error message for invalid inputs.


Advanced: Combining with Video Metadata

For richer summaries, consider fetching video metadata (title, channel, description) using the YouTube Data API v3 or by parsing the video page. This adds context but requires either an API key or HTML parsing.

The transcript-only approach used here is intentionally lightweight — no API key needed, no OAuth, minimal dependencies.


Language Support

The youtube-transcript-api supports all languages that YouTube provides transcripts for. Common language codes:

LanguageCodeAuto-generated
EnglishenYes
Chinese (Simplified)zh-HansYes
Chinese (Traditional)zh-HantYes
JapanesejaYes
KoreankoYes
SpanishesYes
FrenchfrYes
GermandeYes
PortugueseptYes
RussianruYes

To get all available languages for a video:

transcript_list = YouTubeTranscriptApi.list_transcripts(video_id)
for t in transcript_list:
    print(f"{t.language} ({t.language_code}) - {'manual' if not t.is_generated else 'auto'}")

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.74%
按下载量换算46

Claude

27.4%
按下载量换算36

Cursor

18.91%
按下载量换算25

Gemini CLI

9.68%
按下载量换算13

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills