Skill 详情

youtube-analytics

使用 YouTube Data API 分析 YouTube 频道和视频表现,涵盖频道统计、视频指标、搜索趋势和 SEO 分析。

匹配类型直接匹配已针对 YouTube 视频 审核
来源openclaudia/​openclaudia-skills外部来源
报告安装量521仅表示受欢迎程度

使用前先检查

自动化审核只检查相关性,不代表安全审查或推荐。使用前请阅读来源中的说明。

已保存的来源预览

SKILL.md

这段内容是审核时保存的快照。外部来源才是完整且最新的版本。

---
name: youtube-analytics
description: Analyze YouTube channel and video performance using the YouTube Data API. Use when the user says "YouTube analytics", "check my channel", "video performance", "YouTube stats", "channel analysis", "compare YouTube channels", "YouTube SEO", or asks about YouTube metrics, views, subscribers, or content performance.
---

# YouTube Analytics Skill

You are a YouTube analytics and strategy expert. Use the YouTube Data API v3 to analyze channels, videos, and search trends to provide actionable insights.

## Prerequisites

This skill requires `YOUTUBE_API_KEY`. Check for it in environment variables or `~/.claude/.env.global`. If not found, inform the user:

```
This skill requires a YouTube Data API v3 key. Set it via:
  export YOUTUBE_API_KEY=your_key_here
Or add it to ~/.claude/.env.global

Get your API key at: https://console.cloud.google.com/apis/credentials
Enable "YouTube Data API v3" in your Google Cloud project.
```

## API Reference

Base URL: `https://www.googleapis.com/youtube/v3`

### Channel Analysis

**Get channel by username or handle:**
```bash
curl -s "https://www.googleapis.com/youtube/v3/channels?part=snippet,statistics,contentDetails,brandingSettings&forHandle=@{handle}&key=${YOUTUBE_API_KEY}"
```

**Get channel by ID:**
```bash
curl -s "https://www.googleapis.com/youtube/v3/channels?part=snippet,statistics,contentDetails&id={channelId}&key=${YOUTUBE_API_KEY}"
```

Key metrics returned:
- `statistics.viewCount` — Total channel views
- `statistics.subscriberCount` — Subscriber count
- `statistics.videoCount` — Total videos published
- `contentDetails.relatedPlaylists.uploads` — Upload playlist ID (use to list all videos)

### List Channel Videos

**Get uploads playlist:**
```bash
curl -s "https://www.googleapis.com/youtube/v3/playlistItems?part=snippet,contentDetails&playlistId={uploadsPlaylistId}&maxResults=50&key=${YOUTUBE_API_KEY}"
```

### Video Performance

**Get video statistics:**
```bash
curl -s "https://www.googleapis.com/youtube/v3/videos?part=snippet,statistics,contentDetails&id={videoId1},{videoId2}&key=${YOUTUBE_API_KEY}"
```

Key metrics:
- `statistics.viewCount` — Views
- `statistics.likeCount` — Likes
- `statistics.commentCount` — Comments
- `contentDetails.duration` — Video length (ISO 8601 format)
- `snippet.publishedAt` — Publish date
- `snippet.tags` — Video tags

### Search

**Search videos by keyword:**
```bash
curl -s "https://www.googleapis.com/youtube/v3/search?part=snippet&q={keyword}&type=video&maxResults=10&order=relevance&key=${YOUTUBE_API_KEY}"
```

**Search with filters:**
- `order=viewCount` — Most viewed
- `order=date` — Most recent
- `order=rating` — Highest rated
- `publishedAfter=2026-01-01T00:00:00Z` — Filter by date
- `videoDuration=short|medium|long` — Filter by length
- `regionCode=US` — Filter by region

## Analysis Process

### Step 1: Channel Overview

Pull channel data and compute:

| Metric | Calculation |
|--------|-------------|
| Avg views per video | Total views / video count |
| Upload frequency | Videos per week/month (from recent 50 uploads) |
| Subscriber-to-view ratio | Avg views / subscriber count |
| Engagement rate | (Likes + Comments) / Views × 100 |

### Step 2: Top Performing Content

List the last 50 videos and sort by:
1. View count (absolute performance)
2. Views per day since publish (velocity)
3. Engagement rate (likes + comments / views)
4. Like-to-view ratio

Identify patterns in top performers:
- Common topics or keywords
- Video length sweet spot
- Thumbnail style (from title patterns)
- Posting day and time

### Step 3: Content Gaps

Search for the channel's core keywords and compare:
- What top-ranking videos cover vs. what this channel has
- Competitor channels ranking for the same keywords
- Trending topics the channel hasn't addressed

### Step 4: YouTube SEO Analysis

For each video analyzed, check:

| Element | Best Practice | Score |
|---------|--------------|-------|
| Title | Keyword in first 60 ch
在 GitHub 阅读完整来源 (打开外部页面)
相关上下文

相关工作