# Send YouTube Analytics to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "youtube-analytics",
    "name": "YouTube Analytics",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/adamkristopher/youtube-analytics",
    "canonicalUrl": "https://clawhub.ai/adamkristopher/youtube-analytics",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/youtube-analytics",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=youtube-analytics",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "references/api-reference.md",
      "scripts/package-lock.json",
      "scripts/package.json",
      "scripts/setup.sh",
      "scripts/src/api/channels.ts"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "youtube-analytics",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-11T08:22:54.559Z",
      "expiresAt": "2026-05-18T08:22:54.559Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=youtube-analytics",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=youtube-analytics",
        "contentDisposition": "attachment; filename=\"youtube-analytics-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "youtube-analytics"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/youtube-analytics"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/youtube-analytics",
    "downloadUrl": "https://openagent3.xyz/downloads/youtube-analytics",
    "agentUrl": "https://openagent3.xyz/skills/youtube-analytics/agent",
    "manifestUrl": "https://openagent3.xyz/skills/youtube-analytics/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/youtube-analytics/agent.md"
  }
}
```
## Documentation

### 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 gathersanalyzeChannel(channelId)Full channel analysisChannel info, recent videos, avg views per videocompareChannels(channelIds)Compare multiple channelsSide-by-side subscribers, views, video countsanalyzeVideo(videoId)Video performance analysisViews, likes, comments, like rate, comment ratesearchAndAnalyze(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

FunctionPurposegetChannel(channelId)Get full channel detailsgetChannelStats(channelId)Get simplified stats (subscribers, views, videoCount)getMultipleChannels(channelIds)Batch fetch multiple channels

### Video Functions

FunctionPurposegetVideo(videoId)Get full video detailsgetVideoStats(videoId)Get simplified stats (views, likes, comments)getMultipleVideos(videoIds)Batch fetch multiple videosgetChannelVideos(channelId)Get recent uploads from a channel

### Search Functions

FunctionPurposesearchVideos(query, options?)Search for videossearchChannels(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

Use channel IDs — Channel IDs start with UC (e.g., UCxxxxxxxx). You can find them in the channel URL or page source.
Request summaries — After pulling data, ask for a markdown summary with tables and insights.
Compare channels — Use compareChannels() to benchmark competitors side by side.
Batch requests — Use getMultipleChannels() or getMultipleVideos() for efficient batch lookups.
Search + analyze — searchAndAnalyze() combines search with full video stats in one call.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: adamkristopher
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-11T08:22:54.559Z
- Expires at: 2026-05-18T08:22:54.559Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/youtube-analytics)
- [Send to Agent page](https://openagent3.xyz/skills/youtube-analytics/agent)
- [JSON manifest](https://openagent3.xyz/skills/youtube-analytics/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/youtube-analytics/agent.md)
- [Download page](https://openagent3.xyz/downloads/youtube-analytics)