Auto backup: 2026-02-20 13:01

This commit is contained in:
Krilly
2026-02-20 13:01:46 +00:00
parent fa9191136f
commit 6337dac343
24 changed files with 13594 additions and 149 deletions

Binary file not shown.

View File

@@ -17,9 +17,12 @@ class N8nClient:
"""n8n API client"""
def __init__(self, base_url: str = None, api_key: str = None):
self.base_url = base_url or os.getenv('N8N_BASE_URL')
raw_base = base_url or os.getenv('N8N_BASE_URL')
self.base_url = raw_base.rstrip('/') if raw_base else None
self.api_key = api_key or os.getenv('N8N_API_KEY')
if not self.base_url:
raise ValueError("N8N_BASE_URL not found in environment")
if not self.api_key:
raise ValueError("N8N_API_KEY not found in environment")

View File

@@ -0,0 +1,7 @@
{
"version": 1,
"registry": "https://clawhub.ai",
"slug": "youtube-transcript-analyzer",
"installedVersion": "1.0.0",
"installedAt": 1771592050248
}

View File

@@ -0,0 +1,82 @@
---
name: youtube-transcript
description: Extract and analyze YouTube video transcripts without watching the video. Use when users request video summaries, ask to "analyze this YouTube video", want transcripts extracted, or need to understand video content quickly. Handles any YouTube URL and provides cleaned transcripts plus AI analysis.
---
# YouTube Transcript Analysis
Extract, clean, and analyze YouTube video transcripts to understand content without watching.
## Overview
This skill enables rapid analysis of YouTube videos by extracting transcripts and providing comprehensive summaries. Perfect for research, content review, or understanding video material without time investment.
## Quick Workflow
1. **Extract**: Use `scripts/extract_transcript.sh` to get clean text from YouTube URL
2. **Read**: Load the extracted transcript file
3. **Analyze**: Provide structured summary based on content type
4. **Format**: Present findings in scannable, organized format
## Extraction Process
Use the bundled script for any YouTube video:
```bash
scripts/extract_transcript.sh "https://www.youtube.com/watch?v=VIDEO_ID" output.txt
```
The script automatically:
- Downloads yt-dlp if not present
- Extracts captions (auto-generated or manual)
- Cleans VTT formatting to plain text
- Provides character count and preview
## Analysis Approach
### Content Type Recognition
Identify video type first, then tailor analysis:
**Educational/Tutorial**: Step-by-step breakdown, key concepts, prerequisites
**Product Review**: Comparisons, pros/cons, recommendations, specifications
**News/Commentary**: Main topics, key arguments, sources cited
**Entertainment**: Highlights, key moments, recurring themes
### Structure Your Analysis
**For any video type:**
- **Title/Topic**: Clear description of video content
- **Duration insight**: Brief/detailed based on transcript length
- **Key points**: 3-7 main takeaways in bullet format
- **Notable quotes**: Important statements (if applicable)
- **Action items**: Next steps or recommendations (if present)
**For technical content:**
- Include specific terminology, version numbers, tools mentioned
- Note any code examples or configurations discussed
- Identify prerequisites or dependencies
### Quality Considerations
**Auto-generated transcripts may have:**
- Repetitive phrases
- Transcription errors for technical terms
- Missing punctuation
- Filler words ("um", "uh", "you know")
Filter and interpret accordingly - focus on clear, coherent content.
## Advanced Analysis
For detailed analysis patterns and content-specific approaches, see [analysis-patterns.md](references/analysis-patterns.md).
## Error Handling
**If extraction fails:**
- Video may lack captions
- May be private/restricted
- Network connectivity issues
- Age-restricted content
**Fallback approach:** Use web_fetch on the YouTube URL to get basic video information, then inform user about transcript limitations.

View File

@@ -0,0 +1,6 @@
{
"ownerId": "kn70p7web844540j9h6pt290sd818htj",
"slug": "youtube-transcript-analyzer",
"version": "1.0.0",
"publishedAt": 1771206844131
}

View File

@@ -0,0 +1,53 @@
# YouTube Transcript Analysis Patterns
## Common Analysis Tasks
### Video Summaries
- **Structure**: Intro → Main Points → Key Takeaways
- **Focus on**: Numbered lists, major topics, specific recommendations
- **Include**: Timestamps for longer videos, action items if present
### Educational Content
- **Extract**: Core concepts, steps in processes, key facts
- **Format**: Bullet points for easy scanning
- **Highlight**: Definitions, formulas, examples
### Product Reviews/Comparisons
- **Organize by**: Products compared, pros/cons, final verdict
- **Include**: Specific features mentioned, pricing if discussed
- **Note**: Personal opinions vs objective facts
### Tutorial/How-to Videos
- **Structure**: Step-by-step instructions
- **Include**: Prerequisites, tools needed, common mistakes
- **Format**: Numbered steps with key details
## Text Cleaning Notes
### Common Transcript Issues
- **Repetition**: Auto-generated transcripts often repeat phrases
- **Music tags**: `[music]` tags indicate background music
- **Filler words**: "uh", "um", "you know" are common
- **Missing punctuation**: Transcripts lack proper sentence structure
### Quality Indicators
- **Good quality**: Clear sentences, proper nouns correctly transcribed
- **Medium quality**: Some repetition, occasional word errors
- **Poor quality**: Heavy repetition, many transcription errors, missing words
## Analysis Tips
### For Technical Content
- Look for specific terminology, model names, version numbers
- Note any code examples or configuration details
- Identify prerequisites and dependencies mentioned
### For Opinion/Commentary
- Distinguish between facts and opinions
- Note sources cited or referenced
- Identify main arguments and supporting evidence
### For Entertainment Content
- Focus on key moments, reactions, highlights
- Note recurring themes or running jokes
- Identify guest appearances or special segments

View File

@@ -0,0 +1,69 @@
#!/bin/bash
# YouTube Transcript Extractor
# Extracts and cleans transcript from YouTube video URL
set -e
if [ $# -eq 0 ]; then
echo "Usage: $0 <youtube-url> [output-file]"
echo "Example: $0 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' transcript.txt"
exit 1
fi
VIDEO_URL="$1"
OUTPUT_FILE="${2:-transcript.txt}"
# Check if yt-dlp exists
if ! command -v yt-dlp &> /dev/null; then
# Try to find it in home directory
if [ -f "$HOME/yt-dlp" ]; then
YT_DLP="$HOME/yt-dlp"
else
echo "Error: yt-dlp not found. Installing to ~/yt-dlp..."
curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o "$HOME/yt-dlp"
chmod +x "$HOME/yt-dlp"
YT_DLP="$HOME/yt-dlp"
fi
else
YT_DLP="yt-dlp"
fi
echo "Extracting transcript from: $VIDEO_URL"
# Extract transcript as VTT subtitle file
$YT_DLP --write-auto-sub --write-sub --sub-lang en --skip-download --sub-format vtt "$VIDEO_URL" -o "temp_transcript" --quiet 2>/dev/null || {
echo "Warning: Some warnings occurred during extraction, but continuing..."
}
# Check if transcript was extracted
if [ ! -f "temp_transcript.en.vtt" ]; then
echo "Error: Failed to extract transcript. Video may not have captions available."
exit 1
fi
echo "Cleaning transcript..."
# Clean up the VTT format to extract just the text
grep -v "^[0-9]" temp_transcript.en.vtt | \
grep -v "^WEBVTT" | \
grep -v "^Kind:" | \
grep -v "^Language:" | \
grep -v "^\s*$" | \
grep -v "align:start" | \
sed 's/<[^>]*>//g' | \
tr '\n' ' ' | \
sed 's/ */ /g' | \
sed 's/^ *//g' | \
sed 's/ *$//g' > "$OUTPUT_FILE"
# Clean up temporary file
rm -f temp_transcript.en.vtt
echo "Transcript saved to: $OUTPUT_FILE"
echo "Character count: $(wc -c < "$OUTPUT_FILE")"
# Show first few lines as preview
echo -e "\nPreview:"
head -c 200 "$OUTPUT_FILE"
echo -e "...\n"