skills$openclaw/youtube-analytics
adamkristopher2.5k

by adamkristopher

youtube-analytics – OpenClaw Skill

youtube-analytics is an OpenClaw Skills integration for data analytics workflows. YouTube Data API v3 analytics toolkit. Analyze YouTube channels, videos, and search results. Use when the user asks to: check YouTube channel stats, analyze video performance, compare channels, search for videos, get subscriber counts, view engagement metrics, find trending videos, get channel uploads, or analyze YouTube competition. Requires a YouTube Data API v3 key from Google Cloud Console.

2.5k stars1.4k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026data analytics

Skill Snapshot

nameyoutube-analytics
descriptionYouTube Data API v3 analytics toolkit. Analyze YouTube channels, videos, and search results. Use when the user asks to: check YouTube channel stats, analyze video performance, compare channels, search for videos, get subscriber counts, view engagement metrics, find trending videos, get channel uploads, or analyze YouTube competition. Requires a YouTube Data API v3 key from Google Cloud Console. OpenClaw Skills integration.
owneradamkristopher
repositoryadamkristopher/youtube-analytics
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @adamkristopher/youtube-analytics
last updatedFeb 7, 2026

Maintainer

adamkristopher

adamkristopher

Maintains youtube-analytics in the OpenClaw Skills directory.

View GitHub profile
File Explorer
20 files
.
references
api-reference.md
7.8 KB
scripts
src
api
channels.ts
3.8 KB
search.ts
4.3 KB
videos.ts
5.1 KB
config
settings.ts
1.2 KB
core
client.ts
1.1 KB
storage.ts
4.5 KB
index.ts
7.7 KB
package-lock.json
54.8 KB
package.json
246 B
setup.sh
48 B
tsconfig.json
490 B
_meta.json
294 B
SKILL.md
4.9 KB
SKILL.md

name: youtube-analytics description: "YouTube Data API v3 analytics toolkit. Analyze YouTube channels, videos, and search results. Use when the user asks to: check YouTube channel stats, analyze video performance, compare channels, search for videos, get subscriber counts, view engagement metrics, find trending videos, get channel uploads, or analyze YouTube competition. Requires a YouTube Data API v3 key from Google Cloud Console."

YouTube Analytics Toolkit

Setup

Install dependencies:

cd scripts && npm install

Configure credentials by creating a .env file in the project root:

YOUTUBE_API_KEY=AIzaSy...your-api-key
YOUTUBE_DEFAULT_MAX_RESULTS=50

Prerequisites: A Google Cloud project with the YouTube Data API v3 enabled. Get your API key from the Google Cloud Console.

Quick Start

User saysFunction to call
"Analyze this YouTube channel"analyzeChannel(channelId)
"Compare these two channels"compareChannels([id1, id2])
"How is this video performing?"analyzeVideo(videoId)
"Search YouTube for [topic]"searchAndAnalyze(query)
"Get stats for this channel"getChannelStats(channelId)
"Get this video's view count"getVideoStats(videoId)
"Find channels about [topic]"searchChannels(query)
"Show recent uploads from this channel"getChannelVideos(channelId)

Execute functions by importing from scripts/src/index.ts:

import { analyzeChannel, searchAndAnalyze } from './scripts/src/index.js';

const analysis = await analyzeChannel('UCxxxxxxxx');

Or run directly with tsx:

npx tsx scripts/src/index.ts

Workflow Pattern

Every analysis follows three phases:

1. Analyze

Run API functions. Each call hits the YouTube Data API and returns structured data.

2. Auto-Save

All results automatically save as JSON files to results/{category}/. File naming patterns:

  • Named results: {sanitized_name}.json
  • Auto-generated: YYYYMMDD_HHMMSS__{operation}.json

3. Summarize

After analysis, read the saved JSON files and create a markdown summary in results/summaries/ with data tables, comparisons, and insights.

High-Level Functions

FunctionPurposeWhat it gathers
analyzeChannel(channelId)Full channel analysisChannel info, recent videos, avg views per video
compareChannels(channelIds)Compare multiple channelsSide-by-side subscribers, views, video counts
analyzeVideo(videoId)Video performance analysisViews, likes, comments, like rate, comment rate
searchAndAnalyze(query, maxResults?)Search + statsSearch results with full video statistics

Individual API Functions

For granular control, import specific functions from the API modules. See references/api-reference.md for the complete list of 13 API functions with parameters, types, and examples.

Channel Functions

FunctionPurpose
getChannel(channelId)Get full channel details
getChannelStats(channelId)Get simplified stats (subscribers, views, videoCount)
getMultipleChannels(channelIds)Batch fetch multiple channels

Video Functions

FunctionPurpose
getVideo(videoId)Get full video details
getVideoStats(videoId)Get simplified stats (views, likes, comments)
getMultipleVideos(videoIds)Batch fetch multiple videos
getChannelVideos(channelId)Get recent uploads from a channel

Search Functions

FunctionPurpose
searchVideos(query, options?)Search for videos
searchChannels(query, options?)Search for channels

Results Storage

Results auto-save to results/ with this structure:

results/
├── channels/       # Channel data and comparisons
├── videos/         # Video data and analyses
├── search/         # Search results
└── summaries/      # Human-readable markdown summaries

Managing Results

import { listResults, loadResult, getLatestResult } from './scripts/src/index.js';

// List recent results
const files = listResults('channels', 10);

// Load a specific result
const data = loadResult(files[0]);

// Get most recent result for an operation
const latest = getLatestResult('channels', 'channel_analysis');

Tips

  1. Use channel IDs — Channel IDs start with UC (e.g., UCxxxxxxxx). You can find them in the channel URL or page source.
  2. Request summaries — After pulling data, ask for a markdown summary with tables and insights.
  3. Compare channels — Use compareChannels() to benchmark competitors side by side.
  4. Batch requests — Use getMultipleChannels() or getMultipleVideos() for efficient batch lookups.
  5. Search + analyzesearchAndAnalyze() combines search with full video stats in one call.
README.md

No README available.

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

Requirements

  • OpenClaw CLI installed and configured.
  • Language: Markdown
  • License: MIT
  • Topics:

FAQ

How do I install youtube-analytics?

Run openclaw add @adamkristopher/youtube-analytics in your terminal. This installs youtube-analytics into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/adamkristopher/youtube-analytics. Review commits and README documentation before installing.