youtube-transcript-analysis-api-skill
by @browseract-ai
This skill helps users extract YouTube video transcripts and perform deep competitive analysis on the content. Agent should proactively apply this skill when...
clawhub install youtube-transcript-analysis-api-skillπ About This Skill
name: youtube-transcript-analysis-api-skill description: "This skill helps users extract YouTube video transcripts and perform deep competitive analysis on the content. Agent should proactively apply this skill when users express needs like analyze YouTube video content strategy, perform competitive video content analysis, extract and analyze YouTube subtitles for marketing insights, understand competitor value propositions from their videos, identify target audience from YouTube video content, analyze pain points and needs mentioned in YouTube videos, evaluate competitor CTA strategies in video content, find content gaps in competitor YouTube videos, analyze video narrative structure and hooks, extract key messaging and positioning from YouTube content, benchmark competitor video content quality, research competitor marketing angles through video analysis, identify audience signals and terminology level in videos, analyze emotional tone and persuasion techniques in YouTube content." metadata: {"openclaw":{"emoji":"π","requires":{"bins":["python"],"env":["BROWSERACT_API_KEY"]}}}
YouTube Transcript Analysis API Skill
π Brief
This skill provides an end-to-end YouTube video transcript extraction and deep content analysis service. By extracting video transcripts and then systematically analyzing them, users can understand competitors' core value propositions, target audience profiles, pain point strategies, and content gaps β all without manually watching hours of video.This skill works in two phases: 1. Phase 1 β Transcript Extraction: Uses BrowserAct API to extract raw transcript data (supports single video and batch modes). 2. Phase 2 β Deep Analysis: The Agent performs structured 8-dimension analysis on the extracted transcripts.
β¨ Features
1. No hallucinations, ensuring stable and accurate data extraction: Pre-set workflows avoid AI generative hallucinations, ensuring stable and precise data extraction. 2. No CAPTCHA issues: No need to handle reCAPTCHA or other verification challenges. 3. No IP restrictions or geo-blocking: No need to handle regional IP restrictions or geofencing. 4. Faster execution: Tasks execute faster compared to pure AI-driven browser automation solutions. 5. Extremely high cost-efficiency: Significantly lowers data acquisition costs compared to high-token-consuming AI solutions.π API Key Guide
Before running, check theBROWSERACT_API_KEY environment variable. If not set, do not take other measures; ask and wait for the user to provide it.
Agent must inform the user:
> "Since you haven't configured the BrowserAct API Key yet, please go to the BrowserAct Console to get your Key."π οΈ Input Parameters
The Agent should determine the extraction mode based on the user's needs:Mode A: Single Video Analysis
Use when the user provides a specific YouTube video URL.1. TargetURL
- Type: string
- Description: The URL of the YouTube video to extract and analyze.
- Example: https://www.youtube.com/watch?v=st534T7-mdE
- Required: Yes
Mode B: Batch Video Analysis
Use when the user wants to search and analyze multiple videos by keyword.1. KeyWords
- Type: string
- Description: The keyword to search for on YouTube.
- Example: AI Automation, SaaS Marketing
- Required: Yes
2. Upload_date
- Type: string
- Description: Filter for the upload date of the videos.
- Example: This week
- Default: This week
3. Datelimit
- Type: number
- Description: The number of videos to extract and analyze.
- Example: 3
- Default: 3
Optional Analysis Parameters
These parameters are set by the user's intent, not script arguments:4. Analysis Language
- Type: string
- Description: The language the analysis report should be written in. Defaults to the same language as the user's request.
- Example: Chinese, English
5. Analysis Focus
- Type: string
- Description: The user may specify an analysis focus. The Agent must dynamically adjust the depth of specific dimensions based on this focus. For example:
- *Competitor Analysis* -> Deep dive into Dim 7 (Business Model) and Dim 8 (Gaps).
- *Viral Deconstruction* -> Deep dive into Dim 1 (Hook), Dim 4 (Emotional Arc), and Dim 5 (Viral Drivers).
- *Audience Research* -> Deep dive into Dim 3 (Persona & Intent) and Dim 4 (Pain Points).
- Default: All 8 dimensions balanced.
- Example: Competitor Analysis, Viral Deconstruction, Audience Research
π Invocation Method
The Agent should execute the unified extraction script based on the mode:Mode A β Single Video:
python -u ./scripts/youtube_transcript_analysis_api.py single "TargetURL"
Mode B β Batch Videos:
python -u ./scripts/youtube_transcript_analysis_api.py batch "keywords" "Upload_date" Datelimit
β³ Running Status Monitoring
Since this task involves automated browser operations, it may take several minutes. The script will continuously output status logs with timestamps (e.g.,[14:30:05] Task Status: running).
Agent guidelines:
Post-Extraction Workflow
After the script completes and returns transcript data, the Agent must proceed with two additional steps:Step 1: Present Video Metadata β Display the extracted metadata to the user. *(Note: Do NOT output the full raw transcript text in your response, as it is too long. Use it internally for your analysis.)*
Step 2: Perform Concise 8-Dimension Analysis β Analyze the transcript across the 8 dimensions. β οΈ CRITICAL: The analysis MUST be extremely concise, bullet-point driven, and free of filler words. Directly state the facts, evidence, and actionable insights without verbose explanations. Use the same language as the user's request.
π Data Output
After successful execution, the output includes two parts:Part 1: Video Metadata
The script returns the following fields for each video:video_title: The title of the YouTube videovideo_url: The direct link to the original videopublisher: The name of the channel publishing the videochannel_link: The URL of the publisher's YouTube channelvideo_likes_count: The number of likes the video has receivedtranscript: The complete extracted transcript/subtitles of the video (used internally for analysis, do not display full text)Part 2: 8-Dimension Analysis
After presenting raw data, the Agent must produce structured analysis on the transcript content across the following 8 dimensions:#### Dimension 1: Content Structure & Hook Analyze the video's narrative architecture:
#### Dimension 2: Core Messaging Extract the central message:
#### Dimension 3: Audience Persona & Intent Identify the intended viewer and their mindset:
#### Dimension 4: Pain Points & Emotional Arc Map the emotional journey and problems addressed:
#### Dimension 5: Viral & Engagement Drivers Analyze the spreading mechanism:
#### Dimension 6: Evidence & Credibility Evaluate trust-building elements:
#### Dimension 7: Business Model & Conversion Deconstruct the monetization and CTA strategy:
#### Dimension 8: Categorized Content Gaps Identify strategic opportunities by splitting gaps into three layers:
Output Format
For Single Video Analysis:
## Video Metadata
[Present video metadata. DO NOT print full transcript]Concise Deep Analysis
*(Output in extremely brief bullet points, max 1-2 short sentences per point)*1. Content Structure & Hook
[Concise bullets]2. Core Messaging
[Concise bullets]3. Audience Persona & Intent
[Concise bullets]4. Pain Points & Emotional Arc
[Concise bullets]5. Viral & Engagement Drivers
[Concise bullets]6. Evidence & Credibility
[Concise bullets]7. Business Model & Conversion
[Concise bullets]8. Categorized Content Gaps
[Concise bullets]Key Takeaways
[3 short, actionable strategic insights]
For Batch Video Analysis:
## Video Metadata
[Present all video metadata. DO NOT print full transcripts]Concise Individual Analysis
[Repeat the concise 8-dimension analysis for EACH video using brief bullet points]Cross-Video Comparative Analysis
[After analyzing all videos individually, provide a comparative summary]:
Common value propositions: What themes appear across multiple videos?
Shared target audience: Is there a consistent audience profile?
Recurring pain points: Which problems are mentioned most frequently?
Dominant content strategies: What narrative structures and CTA patterns are most common?
Competitive differentiation: How do different creators/brands position themselves differently?
Industry content gaps: What topics are consistently missing across all analyzed videos?
β οΈ Error Handling & Retry
If an error occurs during script execution (e.g., network fluctuations or task failure), the Agent should follow this logic:1. Check Output Content:
- If the output contains "Invalid authorization", it means the API Key is invalid or expired. Do not retry; guide the user to re-check and provide the correct API Key.
- If the output contains "concurrent" or "too many running tasks" or similar concurrency limit messages, it means the current subscription plan's concurrent task limit has been reached. Do not retry; guide the user to upgrade their plan.
Agent must inform the user:
> "The current task cannot be executed because your BrowserAct account has reached the limit of concurrent tasks. Please go to the BrowserAct Plan Upgrade Page to upgrade your subscription plan and enjoy more concurrent task benefits."
- If the output does not contain the above error keywords but the task failed (e.g., output starts with Error: or returns empty results), the Agent should automatically try to re-execute the script once.
2. Retry Limit: - Automatic retry is limited to one time. If the second attempt fails, stop retrying and report the specific error information to the user.
3. Analysis Phase Notes: - If the transcript is too short (fewer than 50 words), note this and provide analysis only on available content. - If the transcript appears to be auto-generated and contains many errors, note this caveat at the beginning of the analysis.