YouTube Analytics

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.

MIT-0 · Free to use, modify, and redistribute. No attribution required.
5 · 2.2k · 6 current installs · 6 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
high confidence
!
Purpose & Capability
The skill's name, description, SKILL.md and code all match: it's a YouTube Data API v3 toolkit that needs a YOUTUBE_API_KEY and performs channel/video/search queries. However the registry metadata claims 'Required env vars: none' and 'Primary credential: none', which contradicts the code (scripts/src/config/settings.ts and core/client.ts enforce and use YOUTUBE_API_KEY). That mismatch is incoherent and could lead to missing prompts or accidental credential exposure.
Instruction Scope
SKILL.md instructs running npm install in scripts/, creating a .env with YOUTUBE_API_KEY and optional max results, then calling exported TypeScript functions or running with npx tsx. Runtime behavior is scoped to calling the YouTube API and saving results as JSON under results/{category}/; there are no instructions to read unrelated system files or send data to external endpoints other than Google's YouTube API. Be aware it will write files to the current working directory (results/).
Install Mechanism
There is no custom installer or remote URL; install is standard npm install using package.json (dependencies: dotenv, googleapis, tsx, typescript). No downloads from obscure hosts or archive extracts are present in the manifest. Running npm install will fetch npm packages from the registry (normal but has the usual supply-chain considerations).
!
Credentials
The code requires YOUTUBE_API_KEY (and optionally YOUTUBE_DEFAULT_MAX_RESULTS) but the skill metadata does not declare any required environment variables or primary credential. Requiring a YouTube API key is proportional for the stated purpose, but the missing declaration is an inconsistency that affects consent and credential-handling policies. The API key is a sensitive secret and should be declared and scoped (restrict referer/IP/usage) before use.
Persistence & Privilege
The skill does not ask for permanent platform-wide presence (always:false) and does not modify other skills or global agent settings. Its persistent action is local auto-saving of JSON results into results/ — expected for an analytics toolkit.
What to consider before installing
This skill appears to implement a legitimate YouTube Data API toolkit, but the registry metadata failing to declare the required YOUTUBE_API_KEY is an important inconsistency. Before installing: (1) confirm the platform will ask you to provide the API key (it is required by the code); (2) create a dedicated API key restricted to the YouTube Data API and limit its usage (IP, HTTP referrer, quotas) to reduce risk; (3) run npm install and execute the code in a sandbox or isolated environment because it will install npm packages and write JSON files to a results/ directory in the project root; (4) inspect the code yourself (or request the publisher/source) if you need assurance there are no hidden endpoints — the code here only calls googleapis and writes local files; and (5) ask the skill author/registry maintainer to update the metadata to list YOUTUBE_API_KEY as a required credential so consent and prompting behave correctly.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
latestvk978hdkych08wp5bebp7cnv2td7zz1ya

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

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.

Files

13 total
Select a file
Select a file to preview.

Comments

Loading comments…