Token导航 LogoToken导航

Agent Skill · 开发

youtube-analytics-cli(youtube 分析 CLI)

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。它适合让 Agent 清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。使用时需要确认数据来源、字段含义和时间范围,避免把样本数据当全量事实;涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。

youtube-analytics-cli 是开发类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为接触敏感数据;许可证为 MIT-0,第三方扫描有提醒项,按安装量在开发类的 21,746 个 Skill 里排第 7,665。

总安装 3,622周安装 154GitHub Stars 公开资料未说明下载 1,269核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
1.0.0

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:youtube-analytics-cli(youtube 分析 CLI)
来源仓库:https://github.com/bin-huang/youtube-analytics-cli
安装命令:
openclaw skills install youtube-analytics-cli
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install youtube-analytics-cli

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

youtube-analytics-cli 用于获取 YouTube 频道统计、视频性能与详细分析报告。适合在 OpenClaw 中监控指标变化、对比不同时段数据或生成可视化素材时使用。支持命令行调用,便于集成到报表自动化流程中。

安装命令:openclaw skills install youtube-analytics-cli;需 OAuth 认证。注意数据时效性与采样偏差,避免将局部样本当作全局结论。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install youtube-analytics-cli;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

youtube-analytics-cli 怎么安装?

在终端执行 openclaw skills install youtube-analytics-cli。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

youtube-analytics-cli 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

youtube-analytics-cli 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

youtube-analytics-cli 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

youtube-analytics-cli 用的人多吗?

公开数据是累计安装 3,622 次,近一周安装 154 次,下载 1,269 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

youtube-analytics-cli 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
youtube-analytics-cli

youtube 分析 CLI · 本页

3,622—接触敏感数据MIT-0有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
youtube-analytics-cli
description
>
Triggers
YouTube Analytics", "YouTube", "channel stats", "video views", "subscribers",

YouTube Analytics CLI Skill

You have access to youtube-analytics-cli, a read-only CLI for the YouTube Data API v3 and YouTube Analytics API v2. Use it to fetch channel and video details, run analytics reports, and manage analytics groups.

Quick start

# Check if the CLI is available
youtube-analytics-cli --help

# Get a channel's public data (API key sufficient)
youtube-analytics-cli channels UCxxxxxxxxxxxxxx

# Get your own channel (OAuth required)
youtube-analytics-cli channels

If the CLI is not installed, install it:

npm install -g youtube-analytics-cli

Authentication

The CLI supports two authentication methods:

MethodUse caseCommands
API keyPublic data (channels, videos)channels <id>, videos
OAuth 2.0Private data + analyticsAll commands (required for report, groups, group-items, channels without ID)

Credentials are resolved in this order:

  1. --credentials <path> flag (per-command)
  2. YOUTUBE_API_KEY, YOUTUBE_CLIENT_ID, YOUTUBE_CLIENT_SECRET, YOUTUBE_REFRESH_TOKEN env vars
  3. ~/.config/youtube-analytics-cli/credentials.json (auto-detected)

The credentials JSON file supports these fields:

{
  "api_key": "YOUR_API_KEY",
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "refresh_token": "YOUR_REFRESH_TOKEN"
}

The file must contain at least api_key or client_id. OAuth commands require all three OAuth fields (client_id, client_secret, refresh_token).

Important: Service accounts do NOT work with YouTube APIs. You must use OAuth 2.0 with a refresh token. Required scopes:

  • https://www.googleapis.com/auth/youtube.readonly
  • https://www.googleapis.com/auth/yt-analytics.readonly
  • https://www.googleapis.com/auth/yt-analytics-monetary.readonly (for revenue metrics -- note: revenue metrics may only be available for content owner reports, not standard channel reports)

Before running analytics commands, verify OAuth credentials by running youtube-analytics-cli channels (no ID). If it fails, ask the user to set up OAuth 2.0 credentials.

Output format

All commands output pretty-printed JSON by default. Use --format compact for single-line JSON.

Global options:

  • --format <format> -- json (default, pretty-printed) or compact (single-line)
  • --credentials <path> -- path to credentials JSON file

Errors are written to stderr as JSON with an error field and a non-zero exit code.

Commands reference

channels

Get channel details. Omit the channel ID to get the authenticated user's own channel (requires OAuth).

# Get a specific channel by ID (API key sufficient)
youtube-analytics-cli channels UCxxxxxxxxxxxxxx

# Get your own channel (OAuth required)
youtube-analytics-cli channels

# Request specific parts
youtube-analytics-cli channels UCxxxxxxxxxxxxxx --part snippet,statistics,brandingSettings

Options:

  • --part <parts> -- parts to include (default: snippet,statistics,contentDetails)

When no channel ID is provided, the command uses mine=true which requires OAuth authentication.

videos

Get video details by IDs. Accepts one or more comma-separated video IDs.

# Single video
youtube-analytics-cli videos dQw4w9WgXcQ

# Multiple videos
youtube-analytics-cli videos dQw4w9WgXcQ,jNQXAC9IVRw

# Request specific parts
youtube-analytics-cli videos dQw4w9WgXcQ --part snippet,statistics,contentDetails

Options:

  • --part <parts> -- parts to include (default: snippet,statistics,contentDetails)

report

Run a YouTube Analytics report. Requires OAuth.

youtube-analytics-cli report \
  --metrics <metrics> \
  --start-date <YYYY-MM-DD> \
  --end-date <YYYY-MM-DD> \
  [--dimensions <dims>] \
  [--filters <filters>] \
  [--sort <sort>] \
  [--max-results <n>] \
  [--ids <ids>] \
  [--currency <code>]

Required options:

  • --metrics <metrics> -- metrics to retrieve (e.g. views,likes,subscribersGained)
  • --start-date <date> -- start date in YYYY-MM-DD format
  • --end-date <date> -- end date in YYYY-MM-DD format

Optional options:

  • --dimensions <dims> -- dimensions (e.g. day, video, country)
  • --filters <filters> -- filters (e.g. video==VIDEO_ID;country==US)
  • --sort <sort> -- sort order (e.g. -views for descending)
  • --max-results <n> -- max rows to return
  • --ids <ids> -- channel or content owner (default: channel==MINE)
  • --currency <code> -- currency code (e.g. USD)
Report examples

Daily views and engagement for the last 30 days:

youtube-analytics-cli report \
  --metrics views,likes,subscribersGained \
  --start-date 2026-02-17 \
  --end-date 2026-03-19 \
  --dimensions day

Top videos by views:

youtube-analytics-cli report \
  --metrics views,estimatedMinutesWatched,averageViewDuration \
  --start-date 2026-01-01 \
  --end-date 2026-03-19 \
  --dimensions video \
  --sort -views \
  --max-results 10

Country breakdown:

youtube-analytics-cli report \
  --metrics views,likes,estimatedMinutesWatched \
  --start-date 2026-01-01 \
  --end-date 2026-03-19 \
  --dimensions country \
  --sort -views \
  --max-results 20

Country breakdown for a specific video:

youtube-analytics-cli report \
  --metrics views,likes \
  --start-date 2026-01-01 \
  --end-date 2026-03-19 \
  --dimensions country \
  --filters video==dQw4w9WgXcQ

Traffic source breakdown:

youtube-analytics-cli report \
  --metrics views,estimatedMinutesWatched \
  --start-date 2026-01-01 \
  --end-date 2026-03-19 \
  --dimensions insightTrafficSourceType \
  --sort -views

Device type breakdown:

youtube-analytics-cli report \
  --metrics views,estimatedMinutesWatched \
  --start-date 2026-01-01 \
  --end-date 2026-03-19 \
  --dimensions deviceType \
  --sort -views

Subscriber changes by day:

youtube-analytics-cli report \
  --metrics subscribersGained,subscribersLost \
  --start-date 2026-02-17 \
  --end-date 2026-03-19 \
  --dimensions day

Revenue report (content owner reports only -- may not work with channel==MINE):

youtube-analytics-cli report \
  --metrics estimatedRevenue,estimatedAdRevenue,grossRevenue \
  --start-date 2026-01-01 \
  --end-date 2026-03-19 \
  --dimensions day \
  --currency USD

groups

List YouTube Analytics groups. Requires OAuth. Supports pagination via --next-page-token.

# List all your groups
youtube-analytics-cli groups

# Get a specific group by ID
youtube-analytics-cli groups --id GROUP_ID

# Paginate through results
youtube-analytics-cli groups --next-page-token TOKEN

Options:

  • --id <id> -- group ID(s) to retrieve (comma-separated)
  • --next-page-token <token> -- pagination token

When no --id is provided, the command uses mine=true to list the authenticated user's groups.

group-items

List items in a YouTube Analytics group. Requires OAuth. Supports pagination via --next-page-token.

# List items in a group
youtube-analytics-cli group-items GROUP_ID

# Paginate through results
youtube-analytics-cli group-items GROUP_ID --next-page-token TOKEN

Options:

  • --next-page-token <token> -- pagination token

Common YouTube Analytics dimensions

Time: day, month

Content: video, playlist, channel (content owner reports only)

Geography: country, province, continent (filter-only), subContinent (filter-only)

Traffic source: insightTrafficSourceType, insightTrafficSourceDetail

Device: deviceType, operatingSystem

Playback: liveOrOnDemand, subscribedStatus, youtubeProduct

Demographics: ageGroup, gender

Sharing: sharingService

Annotations (deprecated since 2019): annotationType, annotationId

Cards: cardType, cardId

End screens: endScreenElementType, endScreenElementId

Common YouTube Analytics metrics

Views and engagement: views, likes, dislikes, comments, shares

Watch time: estimatedMinutesWatched, averageViewDuration, averageViewPercentage

Subscribers: subscribersGained, subscribersLost

Revenue (monetized channels): estimatedRevenue, estimatedAdRevenue, grossRevenue, estimatedRedPartnerRevenue, monetizedPlaybacks, adImpressions, cpm

Cards: cardImpressions, cardClicks, cardClickRate

Annotations (deprecated -- historical data only, annotations removed from YouTube in 2019): annotationImpressions, annotationClicks, annotationClickThroughRate, annotationClosableImpressions, annotationCloseRate

End screens: endScreenElementImpressions, endScreenElementClicks, endScreenElementClickRate

Workflow guidance

Quick channel overview

  1. Run youtube-analytics-cli channels to get your channel's current stats
  2. Run a report with --dimensions day and key metrics (views,likes,subscribersGained,estimatedMinutesWatched) for the last 30 days
  3. Run a per-video breakdown to find top-performing content

Deep video analysis

  1. Start broad: per-video views and watch time for the period
  2. Drill down: pick a specific video and break down by country, insightTrafficSourceType, or deviceType
  3. Use --filters video==VIDEO_ID to isolate a single video
  4. Compare date ranges by running the same report for different periods

Audience analysis

  1. Run a report with --dimensions country to see geographic distribution
  2. Use --dimensions ageGroup,gender for demographics
  3. Use --dimensions subscribedStatus to compare subscriber vs non-subscriber engagement

Content strategy

  1. Get per-video stats with --dimensions video --sort -views --max-results 20
  2. Check traffic sources with --dimensions insightTrafficSourceType
  3. Compare estimatedMinutesWatched across videos to identify engaging content
  4. Track subscribersGained to see which content drives subscriptions

Error handling

  • OAuth credentials required -- the command needs client_id, client_secret, and refresh_token. API key alone is not sufficient for analytics commands.
  • Token refresh failed -- the refresh token may be expired or revoked. The user needs to re-authorize and obtain a new refresh token.
  • No credentials found -- provide credentials via --credentials, environment variables, or ~/.config/youtube-analytics-cli/credentials.json.
  • HTTP 403 Forbidden -- the OAuth scopes may be insufficient, or the YouTube Analytics API may not be enabled in the Google Cloud project.
  • Empty results -- check date range, metrics/dimensions compatibility, and whether the channel has data for the requested period.

API documentation references

平台分布

OpenClaw

82.69%
按下载量换算1,049

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills